mirror of
https://github.com/clearml/clearml
synced 2025-02-07 21:33:25 +00:00
Fix pre-existing pipeline raises an exception
This commit is contained in:
parent
fe791e6e2c
commit
cb36da3ded
@ -2955,9 +2955,15 @@ class PipelineDecorator(PipelineController):
|
||||
kwargs[inspect_func.args[i]] = v
|
||||
|
||||
kwargs_artifacts.update(
|
||||
{k: walk_nested_dict_tuple_list(
|
||||
v, lambda x: x._remoteref() if isinstance(x, LazyEvalWrapper) else x)
|
||||
for k, v in kwargs.items() if isinstance(v, LazyEvalWrapper)}
|
||||
{
|
||||
k: walk_nested_dict_tuple_list(
|
||||
v,
|
||||
lambda x: x._remoteref() if isinstance(x, LazyEvalWrapper) else x,
|
||||
stop_condition=lambda x: isinstance(x, LazyEvalWrapper) and x._remoteref(),
|
||||
)
|
||||
for k, v in kwargs.items()
|
||||
if isinstance(v, LazyEvalWrapper)
|
||||
}
|
||||
)
|
||||
kwargs = {k: deepcopy(v) for k, v in kwargs.items() if not isinstance(v, LazyEvalWrapper)}
|
||||
|
||||
|
@ -221,9 +221,9 @@ def naive_nested_from_flat_dictionary(flat_dict, sep='/'):
|
||||
}
|
||||
|
||||
|
||||
def walk_nested_dict_tuple_list(dict_list_tuple, callback):
|
||||
def walk_nested_dict_tuple_list(dict_list_tuple, callback, stop_condition=None):
|
||||
nested = (dict, tuple, list)
|
||||
if not isinstance(dict_list_tuple, nested):
|
||||
if not isinstance(dict_list_tuple, nested) or (stop_condition and stop_condition(dict_list_tuple)):
|
||||
return callback(dict_list_tuple)
|
||||
|
||||
if isinstance(dict_list_tuple, dict):
|
||||
|
Loading…
Reference in New Issue
Block a user