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
Hi! If There Are Several Tasks Running Concurrently, Which Task Should

Hi! If there are several tasks running concurrently, which task should Task.current_task() return?

  
  
Posted 3 years ago
Votes Newest

Answers 7


GiganticTurtle0 , then I'd guess that's the task that would be returned 🙂

Did you try?

  
  
Posted 3 years ago

Are you referring to the pipeline task?

  
  
Posted 3 years ago

GiganticTurtle0 let me check up on that for you then, thanks for the info 🙂

  
  
Posted 3 years ago

Yes

  
  
Posted 3 years ago

Great, thank you very much for the info! I just spotted the get_logger classmethod. As for the initial question, that's just the behavior I expected!

  
  
Posted 3 years ago

I have tried it and it depends on the context. When I call the method inside a function decorated with PipelineDecorator.component , I get the component task, while if I call it inside PipelineDecorator.pipeline , I get the task corresponding to the pipeline. However, as you said that is not the expected behavior, although I think it makes sense.

  
  
Posted 3 years ago

GiganticTurtle0

If there are several tasks running concurrently, which task should 

Task.current_task()

 return? (

How could you have that ?
Per process, there is one Main current Task (until you close it).
Are you referring to a pipeline with multiple steps ?
If this is the case, task.current_task will return the Task of the component (if executed form the component) and the pipeline (if called from the pipeline logic function).
Notice we added the ability to send metrics/artifacts directly to the Pipeline Task from any of the pipeline components:
https://github.com/allegroai/clearml/blob/0f2eef3ef4c0dacf980bf6243b910fe16539eb78/clearml/automation/controller.py#L741
https://github.com/allegroai/clearml/blob/0f2eef3ef4c0dacf980bf6243b910fe16539eb78/clearml/automation/controller.py#L755

There is also a way to do that automatically with "monitor_artifacts"/"monitor_metrics"
https://github.com/allegroai/clearml/blob/0f2eef3ef4c0dacf980bf6243b910fe16539eb78/clearml/automation/controller.py#L2497

  
  
Posted 3 years ago