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
So, I Did A Slew Of Pretrainings, Then Finetuned Those Pretrained Models. Is There A Way To Go Backwards From The Finetuning Task Id To The Pretraining Task Id? What I Tried Was:

So, I did a slew of pretrainings, then finetuned those pretrained models. Is there a way to go backwards from the finetuning Task ID to the pretraining Task ID?

What I tried was:
retrieved_task = Task.get_task(task_id) models = retrieved_task.get_models() print(models) input_model = models["input"][0] print(input_model) input_model.taskWhich gives me an AttributeError: 'str' object has no attribute 'task' .

Full output in comment below

  
  
Posted 2 years ago
Votes Newest

Answers 10


So for example, I'm able to view in the UI that my finetuning task 7725f5bed94848039c68f2a3a573ded6 has an input model, and I can find the creating experiment for that. But how would I do this in code?

  
  
Posted 2 years ago

the parent task ids is what I originally wanted, remember?

ohh I missed it 😄

  
  
Posted 2 years ago

` {'input': ['Input Model #0'], 'output': [<clearml.model.Model object at 0x7f6d7d6a2750>,
...omitted some here
<clearml.model.Model object at 0x7f6d7d4b1350>]}
Input Model #0


AttributeError Traceback (most recent call last)

<ipython-input-83-65009a52f91b> in <module>()
22
23
---> 24 pretraining_task_id = input_model.task
25 print(f"pretraining_task_id {pretraining_task_id}")
26 task_dict["pretraining_task_id"] = pretraining_task_id

AttributeError: 'str' object has no attribute 'task' `

  
  
Posted 2 years ago

Thanks SmallDeer34 , I think you are correct, the 'output' model is returned properly, but "input" are returned as model name not model object.
Let me check something

  
  
Posted 2 years ago

Martin I found a different solution (hardcoding the parent tasks by hand), but I'm curious to hear what you discover!

  
  
Posted 2 years ago

the parent task ids is what I originally wanted, remember?

  
  
Posted 2 years ago

This was only a means to that end

  
  
Posted 2 years ago

I did it the hard way

  
  
Posted 2 years ago

¯_(ツ)_/¯

  
  
Posted 2 years ago

SmallDeer34 the function Task.get_models() incorrectly returned the input model "name" instead of the object itself. I'll make sure we push a fix.

I found a different solution (hardcoding the parent tasks by hand),

I have to wonder, how does that solve the issue ?

  
  
Posted 2 years ago
581 Views
10 Answers
2 years ago
one year ago
Tags