Have you triedlogger = Logger.current_logger()
in your code?
Logger is a singleton so you should get the same object from your previously created task
https://clear.ml/docs/latest/docs/references/sdk/logger/#loggercurrent_logger
Great, thank you. I was wondering if it was the recommended way but seems like it is.
That being said it returns none for me when I reload a task but it's probably something on my side.
I did a simple test outside of the pl.LightningModule
and it seems like it's not returning anything even there. I'm probably missing something obvious.
I ended up using
task = Task.init(
continue_last_task
=task_id)
to reload a specific task and it seems to work well so far.
Exactly, this will initialize and auto log the current process into existing task (task_id). Without the argument continue_last_task ` it will just create a new Task and auto log everything to it 🙂
That being said it returns none for me when I reload a task but it's probably something on my side.
MistakenDragonfly51 just making sure, you did call Task.init, correct ?
What duesfrom clearml import Task task = Task.current_task()
returns ?
Notice that you need to create the Task before actually calling Logger.current_logger()
or Task.current_task()
I did not, I assumed that Task.init
was mostly to initialize a new task and Task.get_task
was to load an existing one but it seems I was wrong.
I ended up using task = Task.init(
continue_last_task
=task_id)
to reload a specific task and it seems to work well so far.
Thanks