Skip to content

Commit

Permalink
[Runtimes] Fix MLClientCtx to persist the job handler (#1466)
Browse files Browse the repository at this point in the history
  • Loading branch information
yaronha committed Oct 31, 2021
1 parent b30c14b commit 80c55af
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions mlrun/execution.py
Expand Up @@ -100,6 +100,7 @@ def __init__(self, autocommit=False, tmp="", log_stream=None):
self._iteration_results = None
self._children = []
self._parent = None
self._handler = None

def __enter__(self):
return self
Expand Down Expand Up @@ -260,6 +261,7 @@ def from_dict(
self._log_level = spec.get("log_level", self._log_level)
self._function = spec.get("function", self._function)
self._parameters = spec.get("parameters", self._parameters)
self._handler = spec.get("handler", self._handler)
if not self._iteration:
self._hyperparams = spec.get("hyperparams", self._hyperparams)
self._hyper_param_options = spec.get(
Expand Down Expand Up @@ -850,6 +852,7 @@ def set_if_valid(struct, key, val):
"function": self._function,
"log_level": self._log_level,
"parameters": self._parameters,
"handler": self._handler,
"outputs": self._outputs,
run_keys.output_path: self.artifact_path,
run_keys.inputs: {k: v.artifact_url for k, v in self._inputs.items()},
Expand Down

0 comments on commit 80c55af

Please sign in to comment.