Fix, multiple experiments in the same session

This commit is contained in:
allegroai 2019-07-04 01:21:34 +03:00
parent 700a927f42
commit f2829e1162
2 changed files with 7 additions and 16 deletions

View File

@ -91,6 +91,12 @@ class Logger(object):
pass
sys.stdout = Logger._stdout_proxy
sys.stderr = Logger._stderr_proxy
elif DevWorker.report_stdout and not running_remotely():
self._task_handler = TaskHandler(self._task.session, self._task.id, capacity=100)
if Logger._stdout_proxy:
Logger._stdout_proxy.connect(self)
if Logger._stderr_proxy:
Logger._stderr_proxy.connect(self)
def console(self, msg, level=logging.INFO, omit_console=False, *args, **kwargs):
"""

View File

@ -597,6 +597,7 @@ class Task(_Task):
Should only be called if you are absolutely sure there is no need for the Task.
"""
self._at_exit()
self._at_exit_called = False
def is_current_task(self):
"""
@ -819,22 +820,6 @@ class Task(_Task):
# Feature turned off
return
# # ToDo: Add support for back-end, currently doing nothing
# script = self.data.script
# if script and script.requirements:
# # We already have predefined requirements
# return
#
# script = ScriptInfo.get(check_uncommitted=True).script or {}
# freeze = pip_freeze()
#
# requirements = {
# "diff": script.get("diff", ""),
# "pip": freeze
# }
#
# self.send(tasks.SetRequirementsRequest(task=self.id, requirements=requirements))
# self.reload()
return
def _dev_mode_task_start(self, model_updated=False):