diff --git a/trains/backend_interface/task/task.py b/trains/backend_interface/task/task.py index 58060eab..9f196f6b 100644 --- a/trains/backend_interface/task/task.py +++ b/trains/backend_interface/task/task.py @@ -191,7 +191,8 @@ class Task(IdObjectBase, AccessMixin, SetupUploadMixin): latest_version[0]), ) - check_package_update_thread = Thread(target=check_package_update, daemon=True) + check_package_update_thread = Thread(target=check_package_update) + check_package_update_thread.daemon = True check_package_update_thread.start() result = ScriptInfo.get(log=self.log) for msg in result.warning_messages: diff --git a/trains/task.py b/trains/task.py index 82abf928..5c287ba5 100644 --- a/trains/task.py +++ b/trains/task.py @@ -33,7 +33,7 @@ from .utilities.args import argparser_parseargs_called, get_argparser_last_args, from .binding.frameworks.pytorch_bind import PatchPyTorchModelIO from .binding.frameworks.tensorflow_bind import PatchSummaryToEventTransformer, PatchTensorFlowEager, \ PatchKerasModelIO, PatchTensorflowModelIO -# from .utilities.resource_monitor import ResourceMonitor +from .utilities.resource_monitor import ResourceMonitor from .binding.matplotlib_bind import PatchedMatplotlib from .utilities.seed import make_deterministic @@ -226,8 +226,8 @@ class Task(_Task): PatchTensorflowModelIO.update_current_task(task) PatchPyTorchModelIO.update_current_task(task) if auto_resource_monitoring: - # task._resource_monitor = ResourceMonitor(task) - pass # task._resource_monitor.start() + task._resource_monitor = ResourceMonitor(task) + task._resource_monitor.start() # Check if parse args already called. If so, sync task parameters with parser if argparser_parseargs_called(): parser, parsed_args = get_argparser_last_args() @@ -417,7 +417,9 @@ class Task(_Task): # make sure everything is in sync task.reload() # make sure we see something in the UI - threading.Thread(target=LoggerRoot.flush, daemon=True).start() + thread = threading.Thread(target=LoggerRoot.flush) + thread.daemon = True + thread.start() return task @staticmethod diff --git a/trains/utilities/resource_monitor.py b/trains/utilities/resource_monitor.py index 75f016bc..86909d12 100644 --- a/trains/utilities/resource_monitor.py +++ b/trains/utilities/resource_monitor.py @@ -35,7 +35,8 @@ class ResourceMonitor(object): def start(self): self._exit_event.clear() - self._thread = Thread(target=self._daemon, daemon=True) + self._thread = Thread(target=self._daemon) + self._thread.daemon = True self._thread.start() def stop(self):