Remove redundant kwargs

This commit is contained in:
allegroai 2019-06-15 00:31:28 +03:00
parent f8fa394f43
commit 06a716fe8b

View File

@ -122,7 +122,6 @@ class Task(_Task):
output_uri=None, output_uri=None,
auto_connect_arg_parser=True, auto_connect_arg_parser=True,
auto_connect_frameworks=True, auto_connect_frameworks=True,
**kwargs
): ):
""" """
Return the Task object for the main execution task (task context). Return the Task object for the main execution task (task context).
@ -186,9 +185,7 @@ class Task(_Task):
if task_type is None: if task_type is None:
# Backwards compatibility: if called from Task.current_task and task_type # Backwards compatibility: if called from Task.current_task and task_type
# was not specified, keep legacy default value of TaskTypes.training # was not specified, keep legacy default value of TaskTypes.training
__from_current_task = kwargs.pop("__from_current_task", False) task_type = cls.TaskTypes.training
if __from_current_task:
task_type = cls.TaskTypes.training
try: try:
if not running_remotely(): if not running_remotely():
@ -406,6 +403,8 @@ class Task(_Task):
task.id, task.id,
), ),
) )
# make sure everything is in sync
task.reload()
# make sure we see something in the UI # make sure we see something in the UI
threading.Thread(target=LoggerRoot.flush).start() threading.Thread(target=LoggerRoot.flush).start()
return task return task