mirror of
https://github.com/clearml/clearml
synced 2025-02-08 05:43:14 +00:00
Always reload task section before editing parts of it
This commit is contained in:
parent
a2ecb2c75d
commit
4bca5ccf27
@ -452,6 +452,7 @@ class Task(IdObjectBase, AccessMixin, SetupUploadMixin):
|
|||||||
def update_model_desc(self, new_model_desc_file=None):
|
def update_model_desc(self, new_model_desc_file=None):
|
||||||
""" Change the task's model_desc """
|
""" Change the task's model_desc """
|
||||||
with self._edit_lock:
|
with self._edit_lock:
|
||||||
|
self.reload()
|
||||||
execution = self._get_task_property('execution')
|
execution = self._get_task_property('execution')
|
||||||
p = Path(new_model_desc_file)
|
p = Path(new_model_desc_file)
|
||||||
if not p.is_file():
|
if not p.is_file():
|
||||||
@ -571,6 +572,7 @@ class Task(IdObjectBase, AccessMixin, SetupUploadMixin):
|
|||||||
model_id = ''
|
model_id = ''
|
||||||
|
|
||||||
with self._edit_lock:
|
with self._edit_lock:
|
||||||
|
self.reload()
|
||||||
# store model id
|
# store model id
|
||||||
self.data.execution.model = model_id
|
self.data.execution.model = model_id
|
||||||
|
|
||||||
@ -669,6 +671,7 @@ class Task(IdObjectBase, AccessMixin, SetupUploadMixin):
|
|||||||
"""
|
"""
|
||||||
enumeration = enumeration or {}
|
enumeration = enumeration or {}
|
||||||
with self._edit_lock:
|
with self._edit_lock:
|
||||||
|
self.reload()
|
||||||
execution = self.data.execution
|
execution = self.data.execution
|
||||||
if enumeration is None:
|
if enumeration is None:
|
||||||
return
|
return
|
||||||
@ -719,6 +722,7 @@ class Task(IdObjectBase, AccessMixin, SetupUploadMixin):
|
|||||||
|
|
||||||
def _set_model_design(self, design=None):
|
def _set_model_design(self, design=None):
|
||||||
with self._edit_lock:
|
with self._edit_lock:
|
||||||
|
self.reload()
|
||||||
execution = self.data.execution
|
execution = self.data.execution
|
||||||
if design is not None:
|
if design is not None:
|
||||||
execution.model_desc = Model._wrap_design(design)
|
execution.model_desc = Model._wrap_design(design)
|
||||||
|
Loading…
Reference in New Issue
Block a user