Unanswered
Are There Any Particular System Dependencies Needed To Enable
Hi @<1523701205467926528:profile|AgitatedDove14> , I've actually hit on something accidentally that might be a clue. I have noticed that when running inside an agent, there is a bug wherein both Task.current_task()
and Logger.current_logger()
return None
. If these are being used by the clearml
package under the hood, this could be the reason we aren't seeing the metrics.
As a workaround, I created this utility function, which works for explicit logging (though it doesn't cause the automatic logging to work):
def get_current_clearml_task() -> Optional[Task]:
# returns the current task object, if running in ClearML, either with local or
# remote execution
if task_id := os.getenv("CLEARML_TASK_ID"):
return Task.get_task(task_id)
return Task.current_task()
And then for logging, logger = task.get_logger()
.
75 Views
0
Answers
7 months ago
7 months ago