任务
POST /tasks.add_or_update_artifacts
描述
更新现有工件(按键/模式搜索)并添加新工件
参数
Type | Name | Description | Schema |
---|---|---|---|
Body | request required | request body | request |
请求
Name | Description | Schema |
---|---|---|
artifacts required | Artifacts to add or update | < tasks.artifact > array |
force optional | If set to True then both new and running task artifacts can be edited. Otherwise only the new task ones. Default is False | boolean |
task required | Task ID | string |
响应
HTTP Code | Schema |
---|---|
200 | Response 200 |
响应 200
Name | Description | Schema |
---|---|---|
updated optional | Indicates if the task was updated successfully | integer |
POST /tasks.add_or_update_model
描述
添加或更新任务模型
参数
Type | Name | Description | Schema |
---|---|---|---|
Body | request required | request body | request |
请求
Name | Description | Schema |
---|---|---|
iteration optional | Iteration (used to update task statistics) | integer |
model required | The model ID | string |
name required | The task model name | string |
task required | ID of the task | string |
type required | The task model type | tasks.model_type_enum |
响应
HTTP Code | Schema |
---|---|
200 | Response 200 |
响应 200
Name | Description | Schema |
---|---|---|
updated optional | Number of tasks updated (0 or 1) | integer |
POST /tasks.archive
描述
归档任务。如果任务在队列中,它将首先被移出队列,然后被归档。
参数
Type | Name | Description | Schema |
---|---|---|---|
Body | request required | request body | request |
请求
Name | Description | Schema |
---|---|---|
include_pipeline_steps optional | If set then for the passed pipeline controller tasks also archive the pipeline steps Default : false | boolean |
status_message optional | Extra information regarding status change | string |
status_reason optional | Reason for status change | string |
tasks required | List of task ids | < string > array |
响应
HTTP Code | Schema |
---|---|
200 | Response 200 |
响应 200
Name | Description | Schema |
---|---|---|
archived optional | Indicates number of archived tasks | integer |
POST /tasks.archive_many
描述
归档任务
参数
Type | Name | Description | Schema |
---|---|---|---|
Body | request required | request body | request |
请求
Name | Description | Schema |
---|---|---|
ids required | IDs of the tasks to archive | < string > array |
include_pipeline_steps optional | If set then for the passed pipeline controller tasks also archive the pipeline steps Default : false | boolean |
status_message optional | Extra information regarding status change | string |
status_reason optional | Reason for status change | string |
响应
HTTP Code | Schema |
---|---|
200 | Response 200 |
响应 200
Name | Schema |
---|---|
failed optional | < failed > array |
succeeded optional | < succeeded > array |
失败
Name | Description | Schema |
---|---|---|
error optional | Error info | error |
id optional | ID of the failed entity | string |
错误
Name | Schema |
---|---|
codes optional | < integer > array |
data optional | object |
msg optional | string |
成功
Name | Description | Schema |
---|---|---|
archived optional | Indicates whether the task was archived | boolean |
id optional | ID of the succeeded entity | string |
POST /tasks.clone
描述
克隆一个现有的任务
参数
Type | Name | Description | Schema |
---|---|---|---|
Body | request required | request body | request |
请求
Name | Description | Schema |
---|---|---|
execution_overrides optional | The execution params for the cloned task. The params not specified are taken from the original task | tasks.execution |
new_project_name optional | Clone task to a new project by this name (only if new_task_project is not provided). If a project by this name already exists, task will be cloned to existing project. | string |
new_task_comment optional | The comment of the cloned task. If not provided then taken from the original task | string |
new_task_configuration optional | The configuration for the new task. If not provided then taken from the original task | < string, tasks.configuration_item > map |
new_task_container optional | The docker container properties for the new task. If not provided then taken from the original task | < string, string > map |
new_task_hyperparams optional | The hyper params for the new task. If not provided then taken from the original task | < string, tasks.section_params > map |
new_task_input_models optional | The list of input models for the cloned task. If not specifed then copied from the original task | < tasks.task_model_item > array |
new_task_name optional | The name of the cloned task. If not provided then taken from the original task | string |
new_task_parent optional | The parent of the cloned task. If not provided then taken from the original task | string |
new_task_project optional | The project of the cloned task. If not provided then taken from the original task | string |
new_task_system_tags optional | The system tags of the cloned task. If not provided then empty | < string > array |
new_task_tags optional | The user-defined tags of the cloned task. If not provided then taken from the original task | < string > array |
task required | ID of the task | string |
validate_references optional | If set to 'false' then the task fields that are copied from the original task are not validated. The default is false. | boolean |
响应
HTTP Code | Schema |
---|---|
200 | Response 200 |
响应 200
Name | Description | Schema |
---|---|---|
id optional | ID of the new task | string |
new_project optional | In case the new_project_name was specified returns the target project details | new_project |
new_project
Name | Description | Schema |
---|---|---|
id optional | The ID of the target project | string |
name optional | The name of the target project | string |
POST /tasks.close
描述
表示任务已关闭
参数
Type | Name | Description | Schema |
---|---|---|---|
Body | request required | request body | request |
请求
Name | Description | Schema |
---|---|---|
force optional | Allows forcing state change even if transition is not supported Default : false | boolean |
status_message optional | Extra information regarding status change | string |
status_reason optional | Reason for status change | string |
task required | Task ID | string |
响应
HTTP Code | Schema |
---|---|
200 | Response 200 |
响应 200
Name | Description | Schema |
---|---|---|
fields optional | Updated fields names and values | object |
updated optional | Number of tasks updated (0 or 1) | integer |
POST /tasks.completed
描述
信号任务已完成
参数
Type | Name | Description | Schema |
---|---|---|---|
Body | request required | request body | request |
请求
Name | Description | Schema |
---|---|---|
force optional | If not true, call fails if the task status is not in_progress/stopped Default : false | boolean |
publish optional | If set and the task is completed successfully then it is published Default : false | boolean |
status_message optional | Extra information regarding status change | string |
status_reason optional | Reason for status change | string |
task required | Task ID | string |
响应
HTTP Code | Schema |
---|---|
200 | Response 200 |
响应 200
Name | Description | Schema |
---|---|---|
fields optional | Updated fields names and values | object |
published optional | Number of tasks published (0 or 1) | integer |
updated optional | Number of tasks updated (0 or 1) | integer |
POST /tasks.create
描述
创建一个新任务
参数
Type | Name | Description | Schema |
---|---|---|---|
Body | request required | request body | request |
请求
Name | Description | Schema |
---|---|---|
comment optional | Free text comment | string |
configuration optional | Task configuration params | < string, tasks.configuration_item > map |
container optional | Docker container parameters | < string, string > map |
execution optional | Task execution params | tasks.execution |
hyperparams optional | Task hyper params per section | < string, tasks.section_params > map |
models optional | Task models | tasks.task_models |
name required | Task name. Unique within the company. | string |
output_dest optional | Output storage id Must be a reference to an existing storage. | string |
parent optional | Parent task id Must be a completed task. | string |
project optional | Project ID of the project to which this task is assigned Must exist[ab] | string |
script optional | Script info | tasks.script |
system_tags optional | System tags list. This field is reserved for system use, please don't use it. | < string > array |
tags optional | User-defined tags list | < string > array |
type required | Type of task | tasks.task_type_enum |
响应
HTTP Code | Schema |
---|---|
200 | Response 200 |
响应 200
Name | Description | Schema |
---|---|---|
id optional | ID of the task | string |
POST /tasks.delete
描述
删除一个任务及其存储的任何信息(统计信息、帧更新等)。除非提供了强制标志,否则如果任务有关联的对象(即子任务和项目),操作将失败。引用已删除任务的模型将更新为指示已删除任务的任务ID。
参数
Type | Name | Description | Schema |
---|---|---|---|
Body | request required | request body | request |
请求
Name | Description | Schema |
---|---|---|
delete_external_artifacts optional | If set to 'true' then BE will try to delete the extenal artifacts associated with the task from the fileserver (if configured to do so) Default : true | boolean |
delete_output_models optional | If set to 'true' then delete output models of this task that are not referenced by other tasks. Default value is 'true' | boolean |
force optional | If not true, call fails if the task status is 'in_progress' Default : false | boolean |
include_pipeline_steps optional | If set then and the passed task is a pipeline controller then delete the pipeline tasks too Default : false | boolean |
move_to_trash optional | Move task to trash instead of deleting it. For internal use only, tasks in the trash are not visible from the API and cannot be restored! Default : false | boolean |
return_file_urls optional | If set to 'true' then return the urls of the files that were uploaded by this task. Default value is 'false' | boolean |
status_message optional | Extra information regarding status change | string |
status_reason optional | Reason for status change | string |
task required | Task ID | string |
响应
HTTP Code | Schema |
---|---|
200 | Response 200 |
响应 200
Name | Description | Schema |
---|---|---|
deleted optional | Indicates whether the task was deleted | boolean |
events optional | Response from events.delete_for_task | object |
updated_children optional | Number of child tasks whose parent property was updated | integer |
updated_models optional | Number of models whose task property was updated | integer |
urls optional | The urls of the files that were uploaded by this task. Returned if the 'return_file_urls' was set to 'true' | tasks.task_urls |
POST /tasks.delete_artifacts
描述
删除现有的工件(按关键字/模式搜索)
参数
Type | Name | Description | Schema |
---|---|---|---|
Body | request required | request body | request |
请求
Name | Description | Schema |
---|---|---|
artifacts required | Artifacts to delete | < tasks.artifact_id > array |
force optional | If set to True then both new and running task artifacts can be deleted. Otherwise only the new task ones. Default is False | boolean |
task required | Task ID | string |
响应
HTTP Code | Schema |
---|---|
200 | Response 200 |
响应 200
Name | Description | Schema |
---|---|---|
deleted optional | Indicates if the task was updated successfully | integer |
POST /tasks.delete_configuration
描述
删除任务配置项
参数
Type | Name | Description | Schema |
---|---|---|---|
Body | request required | request body | request |
请求
Name | Description | Schema |
---|---|---|
configuration required | List of configuration itemss to delete | < string > array |
force optional | If set to True then both new and running task configuration can be deleted. Otherwise only the new task ones. Default is False | boolean |
task required | Task ID | string |
响应
HTTP Code | Schema |
---|---|
200 | Response 200 |
响应 200
Name | Description | Schema |
---|---|---|
deleted optional | Indicates if the task was updated successfully | integer |
POST /tasks.delete_hyper_params
描述
删除任务超参数
参数
Type | Name | Description | Schema |
---|---|---|---|
Body | request required | request body | request |
请求
Name | Description | Schema |
---|---|---|
force optional | If set to True then both new and running task hyper params can be deleted. Otherwise only the new task ones. Default is False | boolean |
hyperparams required | List of hyper parameters to delete. In case a parameter with an empty name is passed all the section will be deleted | < tasks.param_key > array |
task required | Task ID | string |
响应
HTTP Code | Schema |
---|---|
200 | Response 200 |
响应 200
Name | Description | Schema |
---|---|---|
deleted optional | Indicates if the task was updated successfully | integer |
POST /tasks.delete_many
描述
删除任务
参数
Type | Name | Description | Schema |
---|---|---|---|
Body | request required | request body | request |
请求
Name | Description | Schema |
---|---|---|
delete_external_artifacts optional | If set to 'true' then BE will try to delete the extenal artifacts associated with the tasks from the fileserver (if configured to do so) Default : true | boolean |
delete_output_models optional | If set to 'true' then delete output models of the tasks that are not referenced by other tasks. Default value is 'true' | boolean |
force optional | If not true, call fails if the task status is 'in_progress' Default : false | boolean |
ids required | IDs of the tasks to delete | < string > array |
include_pipeline_steps optional | If set then for the passed pipeline controller tasks the pipeline steps will be also deleted Default : false | boolean |
move_to_trash optional | Move task to trash instead of deleting it. For internal use only, tasks in the trash are not visible from the API and cannot be restored! Default : false | boolean |
return_file_urls optional | If set to 'true' then return the urls of the files that were uploaded by the tasks. Default value is 'false' | boolean |
响应
HTTP Code | Schema |
---|---|
200 | Response 200 |
响应 200
Name | Schema |
---|---|
failed optional | < failed > array |
succeeded optional | < succeeded > array |
失败
Name | Description | Schema |
---|---|---|
error optional | Error info | error |
id optional | ID of the failed entity | string |
错误
Name | Schema |
---|---|
codes optional | < integer > array |
data optional | object |
msg optional | string |
成功
Name | Description | Schema |
---|---|---|
deleted optional | Indicates whether the task was deleted | boolean |
deleted_models optional | Number of deleted output models | integer |
id optional | ID of the succeeded entity | string |
updated_children optional | Number of child tasks whose parent property was updated | integer |
updated_models optional | Number of models whose task property was updated | integer |
urls optional | The urls of the files that were uploaded by the task. Returned if the 'return_file_urls' was set to 'true' | tasks.task_urls |
POST /tasks.delete_models
描述
从任务中删除模型
参数
Type | Name | Description | Schema |
---|---|---|---|
Body | request required | request body | request |
请求
Name | Description | Schema |
---|---|---|
models required | The list of models to delete | < models > array |
task required | ID of the task | string |
模型
Name | Description | Schema |
---|---|---|
name required | The task model name | string |
type required | The task model type | tasks.model_type_enum |
响应
HTTP Code | Schema |
---|---|
200 | Response 200 |
响应 200
Name | Description | Schema |
---|---|---|
updated optional | Number of tasks updated (0 or 1) | integer |
POST /tasks.dequeue
描述
从队列中移除一个任务。如果任务状态不是排队中,则操作失败。
参数
Type | Name | Description | Schema |
---|---|---|---|
Body | request required | request body | request |
请求
Name | Description | Schema |
---|---|---|
new_status optional | The new status to assign to the task after the dequeue instead of the default one | string |
remove_from_all_queues optional | If set to 'true' then the task is searched and removed from all the queues. Otherwise only from the queue stored in the task execution parameters Default : false | boolean |
status_message optional | Extra information regarding status change | string |
status_reason optional | Reason for status change | string |
task required | Task ID | string |
响应
HTTP Code | Schema |
---|---|
200 | Response 200 |
响应 200
Name | Description | Schema |
---|---|---|
dequeued optional | Number of tasks dequeued (0 or 1) | integer |
fields optional | Updated fields names and values | object |
updated optional | Number of tasks updated (0 or 1) | integer |
POST /tasks.dequeue_many
描述
出队任务
参数
Type | Name | Description | Schema |
---|---|---|---|
Body | request required | request body | request |
请求
Name | Description | Schema |
---|---|---|
ids required | IDs of the tasks to dequeue | < string > array |
new_status optional | The new status to assign to the task after the dequeue instead of the default one | string |
remove_from_all_queues optional | If set to 'true' then the tasks are searched and removed from all the queues. Otherwise only from the queue stored in the task execution parameters Default : false | boolean |
status_message optional | Extra information regarding status change | string |
status_reason optional | Reason for status change | string |
响应
HTTP Code | Schema |
---|---|
200 | Response 200 |
响应 200
Name | Schema |
---|---|
failed optional | < failed > array |
succeeded optional | < succeeded > array |
失败
Name | Description | Schema |
---|---|---|
error optional | Error info | error |
id optional | ID of the failed entity | string |
错误
Name | Schema |
---|---|
codes optional | < integer > array |
data optional | object |
msg optional | string |
成功
Name | Description | Schema |
---|---|---|
dequeued optional | Indicates whether the task was dequeued | boolean |
fields optional | Updated fields names and values | object |
id optional | ID of the succeeded entity | string |
updated optional | Number of tasks updated (0 or 1) | integer |
POST /tasks.edit
描述
编辑任务的详细信息。
参数
Type | Name | Description | Schema |
---|---|---|---|
Body | request required | request body | request |
请求
Name | Description | Schema |
---|---|---|
comment optional | Free text comment | string |
configuration optional | Task configuration params | < string, tasks.configuration_item > map |
container optional | Docker container parameters | < string, string > map |
execution optional | Task execution params | tasks.execution |
force optional | If not true, call fails if the task status is not 'created' Default : false | boolean |
hyperparams optional | Task hyper params per section | < string, tasks.section_params > map |
models optional | Task models | tasks.task_models |
name optional | Task name Unique within the company. | string |
output_dest optional | Output storage id Must be a reference to an existing storage. | string |
parent optional | Parent task id Must be a completed task. | string |
project optional | Project ID of the project to which this task is assigned Must exist[ab] | string |
runtime optional | Task runtime mapping | object |
script optional | Script info | tasks.script |
system_tags optional | System tags list. This field is reserved for system use, please don't use it. | < string > array |
tags optional | User-defined tags list | < string > array |
task required | ID of the task | string |
type optional | Type of task | tasks.task_type_enum |
响应
HTTP Code | Schema |
---|---|
200 | Response 200 |
响应 200
Name | Description | Schema |
---|---|---|
fields optional | Updated fields names and values | object |
updated optional | Number of tasks updated (0 or 1) | integer |
POST /tasks.edit_configuration
描述
添加或更新任务配置
参数
Type | Name | Description | Schema |
---|---|---|---|
Body | request required | request body | request |
请求
Name | Description | Schema |
---|---|---|
configuration required | Task configuration items. The new ones will be added and the already existing ones will be updated | < tasks.configuration_item > array |
force optional | If set to True then both new and running task configuration can be edited. Otherwise only the new task ones. Default is False | boolean |
replace_configuration optional | If set then the all the configuration items will be replaced with the provided ones. Otherwise only the provided configuration items will be updated or added | boolean |
task required | Task ID | string |
响应
HTTP Code | Schema |
---|---|
200 | Response 200 |
响应 200
Name | Description | Schema |
---|---|---|
updated optional | Indicates if the task was updated successfully | integer |
POST /tasks.edit_hyper_params
描述
添加或更新任务超参数
参数
Type | Name | Description | Schema |
---|---|---|---|
Body | request required | request body | request |
请求
Name | Description | Schema |
---|---|---|
force optional | If set to True then both new and running task hyper params can be edited. Otherwise only the new task ones. Default is False | boolean |
hyperparams required | Task hyper parameters. The new ones will be added and the already existing ones will be updated | < tasks.params_item > array |
replace_hyperparams optional | Can be set to one of the following: 'all' - all the hyper parameters will be replaced with the provided ones 'section' - the sections that present in the new parameters will be replaced with the provided parameters 'none' (the default value) - only the specific parameters will be updated or added | tasks.replace_hyperparams_enum |
task required | Task ID | string |
响应
HTTP Code | Schema |
---|---|
200 | Response 200 |
响应 200
Name | Description | Schema |
---|---|---|
updated optional | Indicates if the task was updated successfully | integer |
POST /tasks.enqueue
描述
将任务添加到队列中。
如果任务状态不是'created',则失败。
如果任务中的以下参数未填写,则失败:
- 执行脚本仓库
- execution.script.entrypoint
参数
Type | Name | Description | Schema |
---|---|---|---|
Body | request required | request body | request |
请求
Name | Description | Schema |
---|---|---|
queue optional | Queue id. If not provided and no queue name is passed then task is added to the default queue. | string |
queue_name optional | The name of the queue. If the queue does not exist then it is auto-created. Cannot be used together with the queue id | string |
status_message optional | Extra information regarding status change | string |
status_reason optional | Reason for status change | string |
task required | Task ID | string |
update_execution_queue optional | If set to Falsethen the task 'execution.queue' is not updated. This can be done only for the task that is already enqueued Default : true | boolean |
verify_watched_queue optional | If passed then check wheter there are any workers watiching the queue Default : false | boolean |
响应
HTTP Code | Schema |
---|---|
200 | Response 200 |
响应 200
Name | Description | Schema |
---|---|---|
fields optional | Updated fields names and values | object |
queue_watched optional | Returns Trueif there are workers or autscalers working with the queue | boolean |
queued optional | Number of tasks queued (0 or 1) | integer |
updated optional | Number of tasks updated (0 or 1) | integer |
POST /tasks.enqueue_many
描述
入队任务
参数
Type | Name | Description | Schema |
---|---|---|---|
Body | request required | request body | request |
请求
Name | Description | Schema |
---|---|---|
ids required | IDs of the tasks to enqueue | < string > array |
queue optional | Queue id. If not provided and no queue name is passed then tasks are added to the default queue. | string |
queue_name optional | The name of the queue. If the queue does not exist then it is auto-created. Cannot be used together with the queue id | string |
status_message optional | Extra information regarding status change | string |
status_reason optional | Reason for status change | string |
validate_tasks optional | If set then tasks are validated before enqueue Default : false | boolean |
verify_watched_queue optional | If passed then check wheter there are any workers watiching the queue Default : false | boolean |
响应
HTTP Code | Schema |
---|---|
200 | Response 200 |
响应 200
Name | Description | Schema |
---|---|---|
failed optional | < failed > array | |
queue_watched optional | Returns Trueif there are workers or autscalers working with the queue | boolean |
succeeded optional | < succeeded > array |
失败
Name | Description | Schema |
---|---|---|
error optional | Error info | error |
id optional | ID of the failed entity | string |
错误
Name | Schema |
---|---|
codes optional | < integer > array |
data optional | object |
msg optional | string |
成功
Name | Description | Schema |
---|---|---|
fields optional | Updated fields names and values | object |
id optional | ID of the succeeded entity | string |
queued optional | Indicates whether the task was queued | boolean |
updated optional | Number of tasks updated (0 or 1) | integer |
POST /tasks.failed
描述
表示任务已失败
参数
Type | Name | Description | Schema |
---|---|---|---|
Body | request required | request body | request |
请求
Name | Description | Schema |
---|---|---|
force optional | Allows forcing state change even if transition is not supported Default : false | boolean |
status_message optional | Extra information regarding status change | string |
status_reason optional | Reason for status change | string |
task required | Task ID | string |
响应
HTTP Code | Schema |
---|---|
200 | Response 200 |
响应 200
Name | Description | Schema |
---|---|---|
fields optional | Updated fields names and values | object |
updated optional | Number of tasks updated (0 or 1) | integer |
POST /tasks.get_all
描述
获取公司的所有任务和所有公共任务
参数
Type | Name | Description | Schema |
---|---|---|---|
Body | request required | request body | request |
请求
Name | Description | Schema |
---|---|---|
all optional | Multi-field pattern condition (all fields match pattern) | tasks.multi_field_pattern_data |
any optional | Multi-field pattern condition (any field matches pattern) | tasks.multi_field_pattern_data |
id optional | List of IDs to filter by | < string > array |
include_subprojects optional | If set to 'true' and project field is set then tasks from the subprojects are searched too Default : false | boolean |
name optional | Get only tasks whose name matches this pattern (python regular expression syntax) | string |
only_fields optional | List of task field names (nesting is supported using '.', e.g. execution.model_labels). If provided, this list defines the query's projection (only these fields will be returned for each result entry) | < string > array |
order_by optional | List of field names to order by. When search_text is used, '@text_score' can be used as a field representing the text score of returned documents. Use '-' prefix to specify descending order. Optional, recommended when using page. If the first order field is a hyper parameter or metric then string values are ordered according to numeric ordering rules where applicable | < string > array |
page optional | Page number, returns a specific page out of the resulting list of tasks Minimum value : 0 | integer |
page_size optional | Page size, specifies the number of results returned in each page (last page may contain fewer results) Minimum value : 1 | integer |
parent optional | Parent ID | string |
project optional | List of project IDs | < string > array |
refresh_scroll optional | If set then all the data received with this scroll will be requeried | boolean |
scroll_id optional | Scroll ID returned from the previos calls to get_all | string |
search_hidden optional | If set to 'true' then hidden tasks are included in the search results Default : false | boolean |
search_text optional | Free text search query | string |
size optional | The number of tasks to retrieve Minimum value : 1 | integer |
status optional | List of task status. | < tasks.task_status_enum > array |
status_changed optional | List of status changed constraint strings (utcformat, epoch) with an optional prefix modifier (>, >=, <, <=) | < string > array |
system_tags optional | List of task system tags. Use '-' prefix to exclude system tags | < string > array |
tags optional | List of task user-defined tags. Use '-' prefix to exclude tags | < string > array |
type optional | List of task types. One or more of: 'import', 'annotation', 'training' or 'testing' (case insensitive) | < string > array |
user optional | List of user IDs used to filter results by the task's creating user | < string > array |
响应
HTTP Code | Schema |
---|---|
200 | Response 200 |
响应 200
Name | Description | Schema |
---|---|---|
scroll_id optional | Scroll ID that can be used with the next calls to get_all to retrieve more data | string |
tasks optional | List of tasks | < tasks.task > array |
POST /tasks.get_all_ex
描述
获取公司的所有任务和所有公共任务
参数
Type | Name | Description | Schema |
---|---|---|---|
Body | request required | request body | request |
请求
Name | Description | Schema |
---|---|---|
all optional | Multi-field pattern condition (all fields match pattern) | tasks.multi_field_pattern_data |
any optional | Multi-field pattern condition (any field matches pattern) | tasks.multi_field_pattern_data |
allow_public optional | Allow public tasks to be returned in the results Default : true | boolean |
filters optional | < string, filters > map | |
id optional | List of IDs to filter by | < string > array |
include_subprojects optional | If set to 'true' and project field is set then tasks from the subprojects are searched too Default : false | boolean |
name optional | Get only tasks whose name matches this pattern (python regular expression syntax) | string |
only_fields optional | List of task field names (nesting is supported using '.', e.g. execution.model_labels). If provided, this list defines the query's projection (only these fields will be returned for each result entry) | < string > array |
order_by optional | List of field names to order by. When search_text is used, '@text_score' can be used as a field representing the text score of returned documents. Use '-' prefix to specify descending order. Optional, recommended when using page. If the first order field is a hyper parameter or metric then string values are ordered according to numeric ordering rules where applicable | < string > array |
page optional | Page number, returns a specific page out of the resulting list of tasks Minimum value : 0 | integer |
page_size optional | Page size, specifies the number of results returned in each page (last page may contain fewer results) Minimum value : 1 | integer |
parent optional | Parent ID | string |
project optional | List of project IDs | < string > array |
refresh_scroll optional | If set then all the data received with this scroll will be requeried | boolean |
scroll_id optional | Scroll ID returned from the previos calls to get_all_ex | string |
search_hidden optional | If set to 'true' then hidden tasks are included in the search results Default : false | boolean |
search_text optional | Free text search query | string |
size optional | The number of tasks to retrieve Minimum value : 1 | integer |
status optional | List of task status. | < tasks.task_status_enum > array |
status_changed optional | List of status changed constraint strings (utcformat, epoch) with an optional prefix modifier (>, >=, <, <=) | < string > array |
system_tags optional | List of task system tags. Use '-' prefix to exclude system tags | < string > array |
tags optional | List of task user-defined tags. Use '-' prefix to exclude tags | < string > array |
type optional | List of task types. One or more of: 'import', 'annotation', 'training' or 'testing' (case insensitive) | < string > array |
user optional | List of user IDs used to filter results by the task's creating user | < string > array |
过滤器
Name | Description | Schema |
---|---|---|
all optional | All the terms in 'all' condition are combined with 'and' operation | all |
any optional | All the terms in 'any' condition are combined with 'or' operation | any |
op optional | The operation between 'any' and 'all' parts of the filter if both are provided Default : "and" | enum (and, or) |
全部
Name | Schema |
---|---|
exclude optional | < string > array |
include optional | < string > array |
任意
Name | Schema |
---|---|
exclude optional | < string > array |
include optional | < string > array |
响应
HTTP Code | Schema |
---|---|
200 | Response 200 |
响应 200
Name | Description | Schema |
---|---|---|
scroll_id optional | Scroll ID that can be used with the next calls to get_all_ex to retrieve more data | string |
tasks optional | List of tasks | < tasks.task > array |
POST /tasks.get_by_id
描述
获取任务信息
参数
Type | Name | Description | Schema |
---|---|---|---|
Body | request required | request body | request |
请求
Name | Description | Schema |
---|---|---|
task required | Task ID | string |
响应
HTTP Code | Schema |
---|---|
200 | Response 200 |
响应 200
Name | Description | Schema |
---|---|---|
task optional | Task info | tasks.task |
POST /tasks.get_by_id_ex
描述
获取公司的所有任务和所有公共任务
参数
Type | Name | Description | Schema |
---|---|---|---|
Body | request required | request body | request |
请求
Name | Description | Schema |
---|---|---|
all optional | Multi-field pattern condition (all fields match pattern) | tasks.multi_field_pattern_data |
any optional | Multi-field pattern condition (any field matches pattern) | tasks.multi_field_pattern_data |
id optional | List of IDs to filter by | < string > array |
name optional | Get only tasks whose name matches this pattern (python regular expression syntax) | string |
only_fields optional | List of task field names (nesting is supported using '.', e.g. execution.model_labels). If provided, this list defines the query's projection (only these fields will be returned for each result entry) | < string > array |
order_by optional | List of field names to order by. When search_text is used, '@text_score' can be used as a field representing the text score of returned documents. Use '-' prefix to specify descending order. Optional, recommended when using page. If the first order field is a hyper parameter or metric then string values are ordered according to numeric ordering rules where applicable | < string > array |
page optional | Page number, returns a specific page out of the resulting list of tasks Minimum value : 0 | integer |
page_size optional | Page size, specifies the number of results returned in each page (last page may contain fewer results) Minimum value : 1 | integer |
parent optional | Parent ID | string |
project optional | List of project IDs | < string > array |
search_text optional | Free text search query | string |
status optional | List of task status. | < tasks.task_status_enum > array |
status_changed optional | List of status changed constraint strings (utcformat, epoch) with an optional prefix modifier (>, >=, <, <=) | < string > array |
system_tags optional | List of task system tags. Use '-' prefix to exclude system tags | < string > array |
tags optional | List of task user-defined tags. Use '-' prefix to exclude tags | < string > array |
type optional | List of task types. One or more of: 'import', 'annotation', 'training' or 'testing' (case insensitive) | < string > array |
user optional | List of user IDs used to filter results by the task's creating user | < string > array |
响应
HTTP Code | Schema |
---|---|
200 | Response 200 |
响应 200
Name | Description | Schema |
---|---|---|
tasks optional | List of tasks | < tasks.task > array |
POST /tasks.get_configuration_names
描述
获取任务配置项名称列表
参数
Type | Name | Description | Schema |
---|---|---|---|
Body | request required | request body | request |
请求
Name | Description | Schema |
---|---|---|
skip_empty optional | If set to 'true' then the names for configurations with missing values are not returned Default : true | boolean |
tasks required | Task IDs | < string > array |
响应
HTTP Code | Schema |
---|---|
200 | Response 200 |
响应 200
Name | Description | Schema |
---|---|---|
configurations optional | Names of task configuration items (keyed by task ID) | configurations |
配置
Name | Description | Schema |
---|---|---|
names optional | Configuration names | < string > array |
task optional | Task ID | string |
POST /tasks.get_configurations
描述
获取任务配置列表
参数
Type | Name | Description | Schema |
---|---|---|---|
Body | request required | request body | request |
请求
Name | Description | Schema |
---|---|---|
names optional | Names of the configuration items to retreive. If not passed or empty then all the configurations will be retreived. | < string > array |
tasks required | Task IDs | < string > array |
响应
HTTP Code | Schema |
---|---|
200 | Response 200 |
响应 200
Name | Description | Schema |
---|---|---|
configurations optional | Configurations (keyed by task ID) | < configurations > array |
配置
Name | Description | Schema |
---|---|---|
configuration optional | Configuration list | < tasks.configuration_item > array |
task optional | Task ID | string |
POST /tasks.get_hyper_params
描述
获取任务超参数列表
参数
Type | Name | Description | Schema |
---|---|---|---|
Body | request required | request body | request |
请求
Name | Description | Schema |
---|---|---|
tasks required | Task IDs | < string > array |
响应
HTTP Code | Schema |
---|---|
200 | Response 200 |
响应 200
Name | Description | Schema |
---|---|---|
params optional | Hyper parameters (keyed by task ID) | < params > array |
参数
Name | Description | Schema |
---|---|---|
hyperparams optional | Hyper parameters | < tasks.params_item > array |
task optional | Task ID | string |
POST /tasks.get_types
描述
获取指定项目中使用的任务类型列表
参数
Type | Name | Description | Schema |
---|---|---|---|
Body | request required | request body | request |
请求
Name | Description | Schema |
---|---|---|
projects optional | The list of projects which tasks will be analyzed. If not passed or empty then all the company and public tasks will be analyzed | < string > array |
响应
HTTP Code | Schema |
---|---|
200 | Response 200 |
响应 200
Name | Description | Schema |
---|---|---|
types optional | Unique list of the task types used in the requested projects | < string > array |
POST /tasks.make_private
描述
将公共任务转换为私有
参数
Type | Name | Description | Schema |
---|---|---|---|
Body | request required | request body | request |
请求
Name | Description | Schema |
---|---|---|
ids optional | Ids of the tasks to convert. Only the tasks originated by the company can be converted | < string > array |
响应
HTTP Code | Schema |
---|---|
200 | Response 200 |
响应 200
Name | Description | Schema |
---|---|---|
updated optional | Number of tasks updated | integer |
POST /tasks.make_public
描述
将公司任务转换为公开
参数
Type | Name | Description | Schema |
---|---|---|---|
Body | request required | request body | request |
请求
Name | Description | Schema |
---|---|---|
ids optional | Ids of the tasks to convert | < string > array |
响应
HTTP Code | Schema |
---|---|
200 | Response 200 |
响应 200
Name | Description | Schema |
---|---|---|
updated optional | Number of tasks updated | integer |
POST /tasks.move
描述
将任务移动到项目
参数
Type | Name | Description | Schema |
---|---|---|---|
Body | request required | request body | request |
请求
Name | Description | Schema |
---|---|---|
ids required | Tasks to move | < string > array |
project optional | Target project ID. If not provided, project_name must be provided. Use null for the root project | string |
project_name optional | Target project name. If provided and a project with this name does not exist, a new project will be created. If not provided, project must be provided. | string |
响应
HTTP Code | Schema |
---|---|
200 | object |
POST /tasks.ping
描述
刷新任务的上次更新时间
参数
Type | Name | Description | Schema |
---|---|---|---|
Body | request required | request body | request |
请求
Name | Description | Schema |
---|---|---|
task required | Task ID | string |
响应
HTTP Code | Schema |
---|---|
200 | object |
POST /tasks.publish
描述
将任务状态标记为已发布。
对于注释任务 - 如果此任务提交了任何更改,
将在数据集中创建一个新版本以及一个输出视图。
对于训练任务 - 如果创建了模型,则应将其设置为就绪状态。
参数
Type | Name | Description | Schema |
---|---|---|---|
Body | request required | request body | request |
请求
Name | Description | Schema |
---|---|---|
force optional | If not true, call fails if the task status is not 'stopped' Default : false | boolean |
publish_model optional | Indicates that the task output model (if exists) should be published. Optional, the default value is True. | boolean |
status_message optional | Extra information regarding status change | string |
status_reason optional | Reason for status change | string |
task required | Task ID | string |
响应
HTTP Code | Schema |
---|---|
200 | Response 200 |
响应 200
Name | Description | Schema |
---|---|---|
fields optional | Updated fields names and values | object |
updated optional | Number of tasks updated (0 or 1) | integer |
POST /tasks.publish_many
描述
发布任务
参数
Type | Name | Description | Schema |
---|---|---|---|
Body | request required | request body | request |
请求
Name | Description | Schema |
---|---|---|
force optional | If not true, call fails if the task status is not 'stopped' Default : false | boolean |
ids required | IDs of the tasks to publish | < string > array |
publish_model optional | Indicates that the task output model (if exists) should be published. Optional, the default value is True. | boolean |
status_message optional | Extra information regarding status change | string |
status_reason optional | Reason for status change | string |
响应
HTTP Code | Schema |
---|---|
200 | Response 200 |
响应 200
Name | Schema |
---|---|
failed optional | < failed > array |
succeeded optional | < succeeded > array |
失败
Name | Description | Schema |
---|---|---|
error optional | Error info | error |
id optional | ID of the failed entity | string |
错误
Name | Schema |
---|---|
codes optional | < integer > array |
data optional | object |
msg optional | string |
成功
Name | Description | Schema |
---|---|---|
fields optional | Updated fields names and values | object |
id optional | ID of the succeeded entity | string |
updated optional | Number of tasks updated (0 or 1) | integer |
POST /tasks.reset
描述
将任务重置为其初始状态,以及为其存储的任何信息
(统计信息、帧更新等)。
参数
Type | Name | Description | Schema |
---|---|---|---|
Body | request required | request body | request |
请求
Name | Description | Schema |
---|---|---|
clear_all optional | Clear script and execution sections completely Default : false | boolean |
delete_external_artifacts optional | If set to 'true' then BE will try to delete the extenal artifacts associated with the task from the fileserver (if configured to do so) Default : true | boolean |
delete_output_models optional | If set to 'true' then delete output models of this task that are not referenced by other tasks. Default value is 'true' | boolean |
force optional | If not true, call fails if the task status is 'completed' Default : false | boolean |
return_file_urls optional | If set to 'true' then return the urls of the files that were uploaded by this task. Default value is 'false' | boolean |
status_message optional | Extra information regarding status change | string |
status_reason optional | Reason for status change | string |
task required | Task ID | string |
响应
HTTP Code | Schema |
---|---|
200 | Response 200 |
响应 200
Name | Description | Schema |
---|---|---|
deleted_models optional | Number of output models deleted by the reset | integer |
dequeued optional | Response from queues.remove_task | object |
events optional | Response from events.delete_for_task | object |
fields optional | Updated fields names and values | object |
updated optional | Number of tasks updated (0 or 1) | integer |
urls optional | The urls of the files that were uploaded by this task. Returned if the 'return_file_urls' was set to 'true' | tasks.task_urls |
POST /tasks.reset_many
描述
重置任务
参数
Type | Name | Description | Schema |
---|---|---|---|
Body | request required | request body | request |
请求
Name | Description | Schema |
---|---|---|
clear_all optional | Clear script and execution sections completely Default : false | boolean |
delete_external_artifacts optional | If set to 'true' then BE will try to delete the extenal artifacts associated with the tasks from the fileserver (if configured to do so) Default : true | boolean |
delete_output_models optional | If set to 'true' then delete output models of the tasks that are not referenced by other tasks. Default value is 'true' | boolean |
force optional | If not true, call fails if the task status is 'completed' Default : false | boolean |
ids required | IDs of the tasks to reset | < string > array |
return_file_urls optional | If set to 'true' then return the urls of the files that were uploaded by the tasks. Default value is 'false' | boolean |
响应
HTTP Code | Schema |
---|---|
200 | Response 200 |
响应 200
Name | Schema |
---|---|
failed optional | < failed > array |
succeeded optional | < succeeded > array |
失败
Name | Description | Schema |
---|---|---|
error optional | Error info | error |
id optional | ID of the failed entity | string |
错误
Name | Schema |
---|---|
codes optional | < integer > array |
data optional | object |
msg optional | string |
成功
Name | Description | Schema |
---|---|---|
deleted_models optional | Number of output models deleted by the reset | integer |
dequeued optional | Indicates whether the task was dequeued | boolean |
fields optional | Updated fields names and values | object |
id optional | ID of the succeeded entity | string |
updated optional | Number of tasks updated (0 or 1) | integer |
urls optional | The urls of the files that were uploaded by the task. Returned if the 'return_file_urls' was set to 'true' | tasks.task_urls |
POST /tasks.set_requirements
描述
设置任务的脚本要求
参数
Type | Name | Description | Schema |
---|---|---|---|
Body | request required | request body | request |
请求
Name | Description | Schema |
---|---|---|
requirements required | A JSON object containing requirements strings by key | object |
task required | Task ID | string |
响应
HTTP Code | Schema |
---|---|
200 | Response 200 |
响应 200
Name | Description | Schema |
---|---|---|
fields optional | Updated fields names and values | object |
updated optional | Number of tasks updated (0 or 1) | integer |
POST /tasks.started
描述
将任务状态标记为in_progress。可选地允许设置任务的
执行进度。
参数
Type | Name | Description | Schema |
---|---|---|---|
Body | request required | request body | request |
请求
Name | Description | Schema |
---|---|---|
force optional | If not true, call fails if the task status is not 'not_started' Default : false | boolean |
status_message optional | Extra information regarding status change | string |
status_reason optional | Reason for status change | string |
task required | Task ID | string |
响应
HTTP Code | Schema |
---|---|
200 | Response 200 |
响应 200
Name | Description | Schema |
---|---|---|
fields optional | Updated fields names and values | object |
started optional | Number of tasks started (0 or 1) | integer |
updated optional | Number of tasks updated (0 or 1) | integer |
POST /tasks.stop
描述
请求停止正在运行的任务
参数
Type | Name | Description | Schema |
---|---|---|---|
Body | request required | request body | request |
请求
Name | Description | Schema |
---|---|---|
force optional | If not true, call fails if the task status is not 'in_progress' Default : false | boolean |
include_pipeline_steps optional | If set and the passed task is a pipeline controller then stop all its steps too Default : false | boolean |
status_message optional | Extra information regarding status change | string |
status_reason optional | Reason for status change | string |
task required | Task ID | string |
响应
HTTP Code | Schema |
---|---|
200 | Response 200 |
响应 200
Name | Description | Schema |
---|---|---|
fields optional | Updated fields names and values | object |
updated optional | Number of tasks updated (0 or 1) | integer |
POST /tasks.stop_many
描述
请求停止正在运行的任务
参数
Type | Name | Description | Schema |
---|---|---|---|
Body | request required | request body | request |
请求
Name | Description | Schema |
---|---|---|
force optional | If not true, call fails if the task status is not 'in_progress' Default : false | boolean |
ids required | IDs of the tasks to stop | < string > array |
include_pipeline_steps optional | If set then for all the passed pipeline controller tasks stop their steps too Default : false | boolean |
status_message optional | Extra information regarding status change | string |
status_reason optional | Reason for status change | string |
响应
HTTP Code | Schema |
---|---|
200 | Response 200 |
响应 200
Name | Schema |
---|---|
failed optional | < failed > array |
succeeded optional | < succeeded > array |
失败
Name | Description | Schema |
---|---|---|
error optional | Error info | error |
id optional | ID of the failed entity | string |
错误
Name | Schema |
---|---|
codes optional | < integer > array |
data optional | object |
msg optional | string |
成功
Name | Description | Schema |
---|---|---|
fields optional | Updated fields names and values | object |
id optional | ID of the succeeded entity | string |
updated optional | Number of tasks updated (0 or 1) | integer |
POST /tasks.stopped
描述
发出任务已停止的信号
参数
Type | Name | Description | Schema |
---|---|---|---|
Body | request required | request body | request |
请求
Name | Description | Schema |
---|---|---|
force optional | If not true, call fails if the task status is not 'stopped' Default : false | boolean |
status_message optional | Extra information regarding status change | string |
status_reason optional | Reason for status change | string |
task required | Task ID | string |
响应
HTTP Code | Schema |
---|---|
200 | Response 200 |
响应 200
Name | Description | Schema |
---|---|---|
fields optional | Updated fields names and values | object |
updated optional | Number of tasks updated (0 or 1) | integer |
POST /tasks.unarchive_many
描述
取消归档任务
参数
Type | Name | Description | Schema |
---|---|---|---|
Body | request required | request body | request |
请求
Name | Description | Schema |
---|---|---|
ids required | IDs of the tasks to unarchive | < string > array |
include_pipeline_steps optional | If set then for the passed pipeline controller tasks also archive the pipeline steps Default : false | boolean |
status_message optional | Extra information regarding status change | string |
status_reason optional | Reason for status change | string |
响应
HTTP Code | Schema |
---|---|
200 | Response 200 |
响应 200
Name | Schema |
---|---|
failed optional | < failed > array |
succeeded optional | < succeeded > array |
失败
Name | Description | Schema |
---|---|---|
error optional | Error info | error |
id optional | ID of the failed entity | string |
错误
Name | Schema |
---|---|
codes optional | < integer > array |
data optional | object |
msg optional | string |
成功
Name | Description | Schema |
---|---|---|
id optional | ID of the succeeded entity | string |
unarchived optional | Indicates whether the task was unarchived | boolean |
POST /tasks.update
描述
更新任务的运行时参数
参数
Type | Name | Description | Schema |
---|---|---|---|
Body | request required | request body | request |
请求
Name | Description | Schema |
---|---|---|
comment optional | Free text comment | string |
created optional | Task creation time (UTC) | string (date-time) |
name optional | Task name Unique within the company. | string |
output__error optional | Free text error | string |
project optional | Project ID of the project to which this task is assigned | string |
system_tags optional | System tags list. This field is reserved for system use, please don't use it. | < string > array |
tags optional | User-defined tags list | < string > array |
task required | ID of the task | string |
响应
HTTP Code | Schema |
---|---|
200 | Response 200 |
响应 200
Name | Description | Schema |
---|---|---|
fields optional | Updated fields names and values | object |
updated optional | Number of tasks updated (0 or 1) | integer |
POST /tasks.update_batch
描述
更新一批任务。头部内容类型应为'application/json-
lines'。
参数
Type | Name | Description | Schema |
---|---|---|---|
Body | requests required | Json encoded newline-terminated lines, each representing an event in the batch and uses the same parameters used for tasks.update | < object > array |
响应
HTTP Code | Schema |
---|---|
200 | Response 200 |
响应 200
Name | Description | Schema |
---|---|---|
updated optional | Number of tasks updated (0 or 1) | integer |
POST /tasks.update_tags
描述
添加或删除多个任务的标签
参数
Type | Name | Description | Schema |
---|---|---|---|
Body | request required | request body | request |
请求
Name | Description | Schema |
---|---|---|
add_tags optional | User tags to add | < string > array |
ids optional | IDs of the tasks to update | < string > array |
remove_tags optional | User tags to remove | < string > array |
响应
HTTP Code | Schema |
---|---|
200 | Response 200 |
响应 200
Name | Description | Schema |
---|---|---|
updated optional | The number of updated tasks | integer |
POST /tasks.validate
描述
验证任务属性(在创建之前)
参数
Type | Name | Description | Schema |
---|---|---|---|
Body | request required | request body | request |
请求
Name | Description | Schema |
---|---|---|
comment optional | Free text comment | string |
configuration optional | Task configuration params | < string, tasks.configuration_item > map |
container optional | Docker container parameters | < string, string > map |
execution optional | Task execution params | tasks.execution |
hyperparams optional | Task hyper params per section | < string, tasks.section_params > map |
models optional | Task models | tasks.task_models |
name required | Task name. Unique within the company. | string |
output_dest optional | Output storage id Must be a reference to an existing storage. | string |
parent optional | Parent task id Must be a completed task. | string |
project optional | Project ID of the project to which this task is assigned Must exist[ab] | string |
script optional | Script info | tasks.script |
system_tags optional | System tags list. This field is reserved for system use, please don't use it. | < string > array |
tags optional | User-defined tags list | < string > array |
type required | Type of task | tasks.task_type_enum |
响应
HTTP Code | Schema |
---|---|
200 | object |