mirror of
https://github.com/clearml/clearml
synced 2025-05-12 00:20:40 +00:00
Fix pipeline controller fetching archived Tasks for caching
This commit is contained in:
parent
9b9c81afec
commit
603d74da57
@ -1331,7 +1331,7 @@ class PipelineController(object):
|
|||||||
existing_tasks = Task._query_tasks(
|
existing_tasks = Task._query_tasks(
|
||||||
project=[self._task.project], task_name=exact_match_regex(self._task.name),
|
project=[self._task.project], task_name=exact_match_regex(self._task.name),
|
||||||
type=[str(self._task.task_type)],
|
type=[str(self._task.task_type)],
|
||||||
system_tags=['-{}'.format(Task.archived_tag), self._tag],
|
system_tags=["__$all", self._tag, "__$not", Task.archived_tag],
|
||||||
_all_=dict(fields=['runtime.{}'.format(self._runtime_property_hash)],
|
_all_=dict(fields=['runtime.{}'.format(self._runtime_property_hash)],
|
||||||
pattern=":{}".format(self._version)),
|
pattern=":{}".format(self._version)),
|
||||||
only_fields=['id', 'runtime'],
|
only_fields=['id', 'runtime'],
|
||||||
@ -1350,7 +1350,7 @@ class PipelineController(object):
|
|||||||
existing_tasks = Task._query_tasks(
|
existing_tasks = Task._query_tasks(
|
||||||
project=[self._task.project], task_name=exact_match_regex(self._task.name),
|
project=[self._task.project], task_name=exact_match_regex(self._task.name),
|
||||||
type=[str(self._task.task_type)],
|
type=[str(self._task.task_type)],
|
||||||
system_tags=['-{}'.format(Task.archived_tag), self._tag],
|
system_tags=["__$all", self._tag, "__$not", Task.archived_tag],
|
||||||
only_fields=['id', 'hyperparams', 'runtime'],
|
only_fields=['id', 'hyperparams', 'runtime'],
|
||||||
)
|
)
|
||||||
found_match_version = False
|
found_match_version = False
|
||||||
|
@ -1148,16 +1148,13 @@ class ScriptInfo(object):
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
if ScriptInfo.is_pycharm():
|
if ScriptInfo.is_pycharm():
|
||||||
ide_str = "PyCharm"
|
ide_str = "PyCharm{}".format("_Jupyter" if jupyter_status else "")
|
||||||
elif ScriptInfo.is_vscode():
|
elif ScriptInfo.is_vscode():
|
||||||
ide_str = "VSCode"
|
ide_str = "VSCode{}".format("_Jupyter" if jupyter_status else "")
|
||||||
elif ScriptInfo.is_google_colab():
|
elif ScriptInfo.is_google_colab():
|
||||||
ide_str = "Google Colab"
|
ide_str = "Google_Colab"
|
||||||
else:
|
else:
|
||||||
ide_str = "Other"
|
ide_str = "Jupyter" if jupyter_status else ""
|
||||||
|
|
||||||
if jupyter_status:
|
|
||||||
ide_str = "{} - Jupyter".format(ide_str)
|
|
||||||
|
|
||||||
return ide_str
|
return ide_str
|
||||||
|
|
||||||
|
@ -160,7 +160,7 @@ class Task(IdObjectBase, AccessMixin, SetupUploadMixin):
|
|||||||
self._curr_label_stats = {}
|
self._curr_label_stats = {}
|
||||||
self._raise_on_validation_errors = raise_on_validation_errors
|
self._raise_on_validation_errors = raise_on_validation_errors
|
||||||
self._parameters_allowed_types = tuple(set(
|
self._parameters_allowed_types = tuple(set(
|
||||||
six.string_types + six.integer_types + (six.text_type, float, list, tuple, dict, type(None), Enum)
|
six.string_types + six.integer_types + (six.text_type, float, list, tuple, dict, type(None), Enum) # noqa
|
||||||
))
|
))
|
||||||
self._app_server = None
|
self._app_server = None
|
||||||
self._files_server = None
|
self._files_server = None
|
||||||
@ -350,7 +350,7 @@ class Task(IdObjectBase, AccessMixin, SetupUploadMixin):
|
|||||||
tags = [self._development_tag] if not running_remotely() else []
|
tags = [self._development_tag] if not running_remotely() else []
|
||||||
extra_properties = {'system_tags': tags} if Session.check_min_api_version('2.3') else {'tags': tags}
|
extra_properties = {'system_tags': tags} if Session.check_min_api_version('2.3') else {'tags': tags}
|
||||||
if not Session.check_min_api_version("2.20"):
|
if not Session.check_min_api_version("2.20"):
|
||||||
extra_properties["input"] = {"view": {}}
|
extra_properties["input"] = {"view": {}} # noqa
|
||||||
req = tasks.CreateRequest(
|
req = tasks.CreateRequest(
|
||||||
name=task_name or make_message('Anonymous task (%(user)s@%(host)s %(time)s)'),
|
name=task_name or make_message('Anonymous task (%(user)s@%(host)s %(time)s)'),
|
||||||
type=tasks.TaskTypeEnum(task_type),
|
type=tasks.TaskTypeEnum(task_type),
|
||||||
@ -2358,8 +2358,8 @@ class Task(IdObjectBase, AccessMixin, SetupUploadMixin):
|
|||||||
self.data.script = script
|
self.data.script = script
|
||||||
self._edit(script=script)
|
self._edit(script=script)
|
||||||
|
|
||||||
def _set_configuration(self, name, description=None, config_type=None, config_text=None, config_dict=None,
|
def _set_configuration(
|
||||||
**kwargs):
|
self, name, description=None, config_type=None, config_text=None, config_dict=None, **kwargs):
|
||||||
# type: (str, Optional[str], Optional[str], Optional[str], Optional[Union[Mapping, list]], **Any) -> None
|
# type: (str, Optional[str], Optional[str], Optional[str], Optional[Union[Mapping, list]], **Any) -> None
|
||||||
"""
|
"""
|
||||||
Set Task configuration text/dict. Multiple configurations are supported.
|
Set Task configuration text/dict. Multiple configurations are supported.
|
||||||
|
Loading…
Reference in New Issue
Block a user