How can I ensure that additional tasks aren’t created for a notebook unless I really want to?
TrickySheep9 are you saying two Tasks are created in the same notebook without you closing one of them ?
(Also, how is the git diff warning there with the latest clearml, I think there was some fix related to that)
Now do Task.current_task() and it creates a new task
Verified, and already fixed with 1.0.6rc2
I do it to get project name
you can still get it from the task object (even after closing it)
another place I was using was to see if i am in a pipeline task
Yes that makes sense, this is one of the use cases (to see get access to the Task that is currently running). The bug itself will only happen after closing the Task (it needs to clear OS variable).
You can either upgrade to the 1.0.6rc2 or you can hack/fix it with :os.environ.pop('CLEARML_PROC_MASTER_ID', None) os.environ.pop('TRAINS_PROC_MASTER_ID', None)
Is Task.current_task() creating a task?
Hmm it should not, it should return a Task instance if one was already created.
That said, I remember there was a bug (not sure if it was in a released version or an RC) that caused it to create a new Task if there isn't an existing one. Could that be the case ?
Thanks AgitatedDove14 . Have removed Task.current_task() usage for this now. Think I can do without it
How can I ensure that additional tasks aren’t created for a notebook unless I really want to?
btw: any specific reason to call current_task after you closed the main Task ?
and then do Task.current_task() it is None as expected
another place I was using was to see if i am in a pipeline task
Okay that actually makes sense, let me check I think I know what's going on
I have convention of root task for experiments and a sub-project Pipelines
for running “sandboxed” pipeline task. So I do some magic like this