Examples: query, "exact match", wildcard*, wild?ard, wild*rd
Fuzzy search: cake~ (finds cakes, bake)
Term boost: "red velvet"^4, chocolate^2
Field grouping: tags:(+work -"fun-stuff")
Escaping: Escape characters +-&|!(){}[]^"~*?:\ with \, e.g. \+
Range search: properties.timestamp:[1587729413488 TO *] (inclusive), properties.title:{A TO Z}(excluding A and Z)
Combinations: chocolate AND vanilla, chocolate OR vanilla, (chocolate OR vanilla) NOT "vanilla pudding"
Field search: properties.title:"The Title" AND text
Answered
Hey, Just A Quick Question. I'M Trying To Create A Pipeline And In One Step I'M Passing A Model From The Previous Step. Is It Possible To Get Model By Name And Not By Index. More Concretely I Can Do

Hey, just a quick question. I'm trying to create a pipeline and in one step I'm passing a model from the previous step. Is it possible to get model by name and not by index. More concretely I can do
"Hydra/model": "${train.models.output.-1.url}",but I am not able to do
"Hydra/model": "${train.models.output.best.url}",
If this is not possible do you maybe have a workaround in mind?

  
  
Posted one year ago
Votes Newest

Answers 3


@<1531445337942659072:profile|OddCentipede48> Looks like this is indeed not supported. What you could do is return the ID of the task that returns the models, then use Task.get_task and get the model from there. Here is an example:

from clearml import PipelineController


def step_one():
    from clearml import Task
    from clearml.binding.frameworks import WeightsFileHandler
    from clearml.model import Framework

    WeightsFileHandler.create_output_model(
        "obj", "filename", Framework.xgboost, Task.current_task(), singlefile=True, model_name="obj"
    )


def step_two(task_id):
    from clearml import Task

    task = Task.get_task(task_id)
    print(task.models.output["filename"].url)



if __name__ == "__main__":
    pipe = PipelineController(
        project="examples",
        name="Pipeline demo",
        version="1.1",
        add_pipeline_tags=False,
    )
    pipe.set_default_execution_queue("Eugene")
    pipe.add_function_step(
        name="step_one",
        function=step_one,
    )
    pipe.add_function_step(
        name="step_two",
        function=step_two,
        function_kwargs={"task_id": "${step_one.id}"}
    )
    pipe.start_locally(run_pipeline_steps_locally=True)
  
  
Posted one year ago

Taking a look

  
  
Posted one year ago

any updates on this issue?

  
  
Posted one year ago