mirror of
https://github.com/clearml/clearml
synced 2025-03-04 19:20:16 +00:00
Fix logger creation guard
This commit is contained in:
parent
7dc27b9a5e
commit
3d9683f290
@ -1557,11 +1557,10 @@ class Task(_Task):
|
|||||||
:return: Logger object
|
:return: Logger object
|
||||||
"""
|
"""
|
||||||
|
|
||||||
# do not recreate logger after task was closed/quit
|
|
||||||
if self._at_exit_called:
|
|
||||||
raise ValueError("Cannot use Task Logger after task was closed")
|
|
||||||
|
|
||||||
if not self._logger:
|
if not self._logger:
|
||||||
|
# do not recreate logger after task was closed/quit
|
||||||
|
if self._at_exit_called:
|
||||||
|
raise ValueError("Cannot use Task Logger after task was closed")
|
||||||
# force update of base logger to this current task (this is the main logger task)
|
# force update of base logger to this current task (this is the main logger task)
|
||||||
self._setup_log(replace_existing=self.is_main_task())
|
self._setup_log(replace_existing=self.is_main_task())
|
||||||
# Get a logger object
|
# Get a logger object
|
||||||
|
Loading…
Reference in New Issue
Block a user