Pass config and task_function as keyword arguments for Hydra's run_job change in parameter order.

This commit is contained in:
Ramon Emiliani 2021-05-12 14:53:46 -05:00 committed by Allegro AI
parent 55b214c23d
commit d93937fc36

View File

@ -118,9 +118,9 @@ class PatchHydra(object):
'Task.init called outside of Hydra-App. For full Hydra multi-run support, ' 'Task.init called outside of Hydra-App. For full Hydra multi-run support, '
'move the Task.init call into the Hydra-App main function') 'move the Task.init call into the Hydra-App main function')
result = PatchHydra._original_run_job( kwargs["config"] = config
config, partial(PatchHydra._patched_task_function, task_function,), kwargs["task_function"] = partial(PatchHydra._patched_task_function, task_function,)
*args, **kwargs) result = PatchHydra._original_run_job(*args, **kwargs)
# if we have Task.init called inside the App, we close it after the app is done. # if we have Task.init called inside the App, we close it after the app is done.
# This will make sure that hydra run will create multiple Tasks # This will make sure that hydra run will create multiple Tasks