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, I Am Running Several Python Scripts But All For The Same Project/Task. Is It Possible To Task.Init To Existing Running/Completed Task And Adding On The Results?

Hi, i am running several python scripts but all for the same project/task. Is it possible to Task.init to existing running/completed task and adding on the results?

  
  
Posted 3 years ago
Votes Newest

Answers 12


Hi SubstantialElk6

If you like a new task, you can clone as HugePelican43 suggested.
You can also continue reporting to your task with continue_last_task parameter in your Task.init call:

from clearml import Task task = Task.init(project_name="YOUR PROJECT NAME", task_name="YOUR TASK NAME", continue_last_task=True)You also can specify the task id to continue (from the docs - https://allegro.ai/clearml/docs/rst/references/clearml_python_ref/task_module/task_task.html?highlight=continue_last_task ):

continue_last_task ( bool ) –
Continue the execution of a previously executed Task (experiment)
Note
When continuing the executing of a previously executed Task, all previous artifacts / models/ logs are intact. New logs will continue iteration/step based on the previous-execution maximum iteration value. For example:

The last train/loss scalar reported was iteration 100, the next report will be iteration 101.

The values are:
True - Continue the the last Task ID. specified explicitly by reuse_last_task_id or implicitly with the same logic as reuse_last_task_id False - Overwrite the execution of previous Task (default). A string - You can also specify a Task ID (string) to be continued. This is equivalent to continue_last_task=True and reuse_last_task_id=a_task_id_string.

  
  
Posted 3 years ago

It didn't work as expected.
` task init
task report iter 10

task init
task report iter 10

The second task pushed the reporting iteration to 20 instead. `

  
  
Posted 3 years ago

Hi, for both of them,  args.lastiter  is the exact same value. But when plotted out, they are 2 actually iterations apart.

  
  
Posted 3 years ago

So you mean args.lastiter is not the last iteration? Can you try replacing it with task.get_last_iteration() ?

  
  
Posted 3 years ago

Just to put a ping for those on this side of the timezone to look at. Thanks.

  
  
Posted 3 years ago

Didnt get that, can you detail a bit?

  
  
Posted 3 years ago

I think you could use Clone task

  
  
Posted 3 years ago

Hi TimelyPenguin76 , i am adding a debug sample to an existing task using the above method. What should i put for the iteration? I do not want to overwrite existing ones but i do not know what's the last count. This is for both scalar and media reporting.

  
  
Posted 3 years ago

Thanks TimelyPenguin76 , let me try it out now.

  
  
Posted 3 years ago

Hi,
basically i run this block first and ended the script.
task = Task.init(project_name="afro-nmt", task_name=args.taskname, continue_last_task=args.taskid) Logger.current_logger().report_scalar(title="BLEU",series="JW300",value=args.jwbleu, iteration=args.lastiter)Then i run another script, with series different.
task = Task.init(project_name="afro-nmt", task_name=args.taskname, continue_last_task=args.taskid) Logger.current_logger().report_scalar(title="BLEU",series="SS900",value=args.ssbleu, iteration=args.lastiter)

  
  
Posted 3 years ago

SubstantialElk6 if you call Task.init with continue_last_task=<task_id> it will automatically add the last_iteration of the previous run, to any logging/report so you never overwrite the previous reports 🙂

  
  
Posted 3 years ago

Hi SubstantialElk6 , you can use task.get_last_iteration() and use it, what do you think?

  
  
Posted 3 years ago
1K Views
12 Answers
3 years ago
one year ago
Tags