mirror of
https://github.com/clearml/clearml
synced 2025-06-23 01:55:38 +00:00
Raise ValueError if Task.get_logger() is called after task was closed
This commit is contained in:
parent
3c4925d605
commit
ab263bb59f
@ -1216,7 +1216,7 @@ class Task(_Task):
|
|||||||
|
|
||||||
# do not recreate logger after task was closed/quit
|
# do not recreate logger after task was closed/quit
|
||||||
if self._at_exit_called:
|
if self._at_exit_called:
|
||||||
return None
|
raise ValueError("Cannot use Task Logger after task was closed")
|
||||||
|
|
||||||
if not self._logger:
|
if not self._logger:
|
||||||
# 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)
|
||||||
|
Loading…
Reference in New Issue
Block a user