List TaskStatusEnum in docstrings (#639)

This commit is contained in:
pollfly 2022-04-11 11:33:56 +03:00 committed by GitHub
parent 1edd395c47
commit a9774c3842
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 25 additions and 5 deletions

View File

@ -148,7 +148,8 @@ class BaseJob(object):
def status(self, force=False): def status(self, force=False):
# type: (bool) -> str # type: (bool) -> str
""" """
Return the Job Task current status, see Task.TaskStatusEnum Return the Job Task current status. Options are: "created", "queued", "in_progress", "stopped", "published",
"publishing", "closed", "failed", "completed", "unknown".
:param force: Force status update, otherwise, only refresh state every 1 sec :param force: Force status update, otherwise, only refresh state every 1 sec
@ -667,7 +668,8 @@ class LocalClearmlJob(ClearmlJob):
def status(self, force=False): def status(self, force=False):
# type: (bool) -> str # type: (bool) -> str
""" """
Return the Job Task current status, see Task.TaskStatusEnum Return the Job Task current status. Options are: "created", "queued", "in_progress", "stopped", "published",
"publishing", "closed", "failed", "completed", "unknown".
:param force: Force status update, otherwise, only refresh state every 1 sec :param force: Force status update, otherwise, only refresh state every 1 sec

View File

@ -1534,8 +1534,24 @@ class Task(IdObjectBase, AccessMixin, SetupUploadMixin):
""" """
Set the task_type for the Task. Set the task_type for the Task.
:param task_type: The task_type of the Task (see optional values in TaskTypes). :param task_type: The task_type of the Task.
Valid task types:
- ``TaskTypes.training``
- ``TaskTypes.testing``
- ``TaskTypes.inference``
- ``TaskTypes.data_processing``
- ``TaskTypes.application``
- ``TaskTypes.monitor``
- ``TaskTypes.controller``
- ``TaskTypes.optimizer``
- ``TaskTypes.service``
- ``TaskTypes.qc``
- ``TaskTypes.custom``
:type task_type: str or TaskTypes :type task_type: str or TaskTypes
""" """
if not isinstance(task_type, self.TaskTypes): if not isinstance(task_type, self.TaskTypes):
task_type = self.TaskTypes(task_type) task_type = self.TaskTypes(task_type)

View File

@ -858,7 +858,8 @@ class Task(_Task):
`parent`: (str) filter by parent task-id matching `parent`: (str) filter by parent task-id matching
`search_text`: (str) free text search (in task fields comment/name/id) `search_text`: (str) free text search (in task fields comment/name/id)
`status`: List[str] List of valid statuses `status`: List[str] List of valid statuses
(options are: "created", "queued", "in_progress", "stopped", "published", "completed") (options are: "created", "queued", "in_progress", "stopped", "published", "publishing", "closed", "failed",
"completed", "unknown")
`type`: List[str] List of valid task type `type`: List[str] List of valid task type
(options are: 'training', 'testing', 'inference', 'data_processing', 'application', 'monitor', (options are: 'training', 'testing', 'inference', 'data_processing', 'application', 'monitor',
'controller', 'optimizer', 'service', 'qc'. 'custom') 'controller', 'optimizer', 'service', 'qc'. 'custom')
@ -917,7 +918,8 @@ class Task(_Task):
`parent`: (str) filter by parent task-id matching `parent`: (str) filter by parent task-id matching
`search_text`: (str) free text search (in task fields comment/name/id) `search_text`: (str) free text search (in task fields comment/name/id)
`status`: List[str] List of valid statuses `status`: List[str] List of valid statuses
(options are: "created", "queued", "in_progress", "stopped", "published", "completed") (options are: "created", "queued", "in_progress", "stopped", "published", "publishing", "closed", "failed",
"completed", "unknown")
`type`: List[str] List of valid task type `type`: List[str] List of valid task type
(options are: 'training', 'testing', 'inference', 'data_processing', 'application', 'monitor', (options are: 'training', 'testing', 'inference', 'data_processing', 'application', 'monitor',
'controller', 'optimizer', 'service', 'qc'. 'custom') 'controller', 'optimizer', 'service', 'qc'. 'custom')