mirror of
https://github.com/clearml/clearml
synced 2025-03-03 10:42:00 +00:00
Fix task cloning
This commit is contained in:
parent
c7a687b4a5
commit
b98c821cf9
@ -1705,6 +1705,7 @@ class CreateRequest(Request):
|
||||
|
||||
self.assert_isinstance(value, "project", six.string_types)
|
||||
self._property_project = value
|
||||
|
||||
@schema_property('input')
|
||||
def input(self):
|
||||
return self._property_input
|
||||
|
@ -805,11 +805,17 @@ class Task(IdObjectBase, AccessMixin, SetupUploadMixin):
|
||||
execution = task.execution.to_dict() if task.execution else {}
|
||||
execution = ConfigTree.merge_configs(ConfigFactory.from_dict(execution),
|
||||
ConfigFactory.from_dict(execution_overrides or {}))
|
||||
# clear all artifacts
|
||||
execution['artifacts'] = [e for e in execution['artifacts'] if e.get('mode') != 'output']
|
||||
|
||||
if not tags and task.tags:
|
||||
tags = [t for t in task.tags if t != cls._development_tag]
|
||||
|
||||
req = tasks.CreateRequest(
|
||||
name=name or task.name,
|
||||
type=task.type,
|
||||
input=task.input,
|
||||
tags=tags if tags is not None else task.tags,
|
||||
input=task.input if hasattr(task, 'input') else {'view': {}},
|
||||
tags=tags,
|
||||
comment=comment or task.comment,
|
||||
parent=parent,
|
||||
project=project if project else task.project,
|
||||
|
@ -1252,7 +1252,7 @@ class Task(_Task):
|
||||
tasks.GetAllRequest(
|
||||
project=[project.id],
|
||||
name=exact_match_regex(task_name),
|
||||
only_fields=['id', 'name']
|
||||
only_fields=['id', 'name', 'last_update']
|
||||
)
|
||||
)
|
||||
task = get_single_result(entity='task', query=task_name, results=res.response.tasks)
|
||||
|
Loading…
Reference in New Issue
Block a user