mirror of
https://github.com/clearml/clearml
synced 2025-03-04 02:57:24 +00:00
Fix infinite recursion when updating connected dict remotely
This commit is contained in:
parent
eede2b6155
commit
050d6d8970
@ -3673,14 +3673,14 @@ class Task(_Task):
|
|||||||
# noinspection PyProtectedMember
|
# noinspection PyProtectedMember
|
||||||
task._arguments.copy_from_dict(flatten_dictionary(config_dict), prefix=name)
|
task._arguments.copy_from_dict(flatten_dictionary(config_dict), prefix=name)
|
||||||
|
|
||||||
def _refresh_args_dict(task, config_dict):
|
def _refresh_args_dict(task, config_proxy_dict):
|
||||||
# reread from task including newly added keys
|
# reread from task including newly added keys
|
||||||
# noinspection PyProtectedMember
|
# noinspection PyProtectedMember
|
||||||
a_flat_dict = task._arguments.copy_to_dict(flatten_dictionary(config_dict), prefix=name)
|
a_flat_dict = task._arguments.copy_to_dict(flatten_dictionary(config_proxy_dict), prefix=name)
|
||||||
# noinspection PyProtectedMember
|
# noinspection PyProtectedMember
|
||||||
nested_dict = config_dict._to_dict()
|
nested_dict = config_proxy_dict._to_dict()
|
||||||
config_dict.clear()
|
config_proxy_dict.clear()
|
||||||
config_dict.update(nested_from_flat_dictionary(nested_dict, a_flat_dict))
|
config_proxy_dict._do_update(nested_from_flat_dictionary(nested_dict, a_flat_dict))
|
||||||
|
|
||||||
def _check_keys(dict_, warning_sent=False):
|
def _check_keys(dict_, warning_sent=False):
|
||||||
if warning_sent:
|
if warning_sent:
|
||||||
|
@ -39,10 +39,14 @@ class ProxyDictPostWrite(dict):
|
|||||||
return a_dict
|
return a_dict
|
||||||
|
|
||||||
def update(self, E=None, **F):
|
def update(self, E=None, **F):
|
||||||
|
res = self._do_update(E, **F)
|
||||||
|
self._set_callback()
|
||||||
|
return res
|
||||||
|
|
||||||
|
def _do_update(self, E=None, **F):
|
||||||
res = super(ProxyDictPostWrite, self).update(
|
res = super(ProxyDictPostWrite, self).update(
|
||||||
ProxyDictPostWrite(self._update_obj, self._set_callback, E) if E is not None else
|
ProxyDictPostWrite(self._update_obj, self._set_callback, E) if E is not None else
|
||||||
ProxyDictPostWrite(self._update_obj, self._set_callback, **F))
|
ProxyDictPostWrite(self._update_obj, self._set_callback, **F))
|
||||||
self._set_callback()
|
|
||||||
return res
|
return res
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user