事件
POST /events.add
描述
添加单个事件
参数
Type | Name | Description | Schema |
---|---|---|---|
Body | request required | request body | request |
请求
Name | Description | Schema |
---|---|---|
allow_locked optional | Allow adding events to published tasks or models Default : false | boolean |
model_event optional | If set then the event is for a model. Otherwise for a task. Cannot be used with task log events. If used in batch then all the events should be marked the same Default : false | boolean |
响应
HTTP Code | Schema |
---|---|
200 | object |
POST /events.add_batch
描述
在单次调用中添加一批事件(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 events.add | < object > array |
响应
HTTP Code | Schema |
---|---|
200 | Response 200 |
响应 200
Name | Schema |
---|---|
added optional | integer |
errors optional | integer |
errors_info optional | object |
POST /events.clear_scroll
描述
清除一个打开的滚动ID
参数
Type | Name | Description | Schema |
---|---|---|---|
Body | request required | request body | request |
请求
Name | Description | Schema |
---|---|---|
scroll_id required | Scroll ID as returned by previous events service calls | string |
响应
HTTP Code | Schema |
---|---|
200 | object |
POST /events.clear_task_log
描述
从任务中移除旧日志
参数
Type | Name | Description | Schema |
---|---|---|---|
Body | request required | request body | request |
请求
Name | Description | Schema |
---|---|---|
allow_locked optional | Allow deleting events even if the task is locked Default : false | boolean |
exclude_metrics optional | If passed then events for these metrics are retained | < string > array |
include_metrics optional | If passed then only events for these metrics are deleted | < string > array |
task required | Task ID | string |
threshold_sec optional | The amount of seconds ago to retain the log records. The older log records will be deleted. If not passed or 0 then all the log records for the task will be deleted | integer |
响应
HTTP Code | Schema |
---|---|
200 | Response 200 |
响应 200
Name | Description | Schema |
---|---|---|
deleted optional | The number of deleted log records | integer |
POST /events.debug_images
描述
获取每个任务在请求的迭代次数中的调试图像事件
参数
Type | Name | Description | Schema |
---|---|---|---|
Body | request required | request body | request |
请求
Name | Description | Schema |
---|---|---|
iters optional | Max number of latest iterations for which to return debug images | integer |
metrics required | List of metrics and variants | < events.task_metric_variants > array |
model_events optional | If set then the retrieving model events. Otherwise task events Default : false | boolean |
navigate_earlier optional | If set then events are retreived from latest iterations to earliest ones. Otherwise from earliest iterations to the latest. The default is True | boolean |
refresh optional | If set then scroll will be moved to the latest iterations. The default is False | boolean |
scroll_id optional | Scroll ID of previous call (used for getting more results) | string |
响应
HTTP Code | Schema |
---|---|
200 | events.debug_images_response |
POST /events.delete_for_model
描述
删除所有模型事件。此操作无法撤销!
参数
Type | Name | Description | Schema |
---|---|---|---|
Body | request required | request body | request |
请求
Name | Description | Schema |
---|---|---|
allow_locked optional | Allow deleting events even if the model is locked Default : false | boolean |
model required | Model ID | string |
响应
HTTP Code | Schema |
---|---|
200 | Response 200 |
响应 200
Name | Description | Schema |
---|---|---|
deleted optional | Number of deleted events | boolean |
POST /events.delete_for_task
描述
删除所有任务事件。此操作无法撤销!
参数
Type | Name | Description | Schema |
---|---|---|---|
Body | request required | request body | request |
请求
Name | Description | Schema |
---|---|---|
allow_locked optional | Allow deleting events even if the task is locked Default : false | boolean |
task required | Task ID | string |
响应
HTTP Code | Schema |
---|---|
200 | Response 200 |
响应 200
Name | Description | Schema |
---|---|---|
deleted optional | Number of deleted events | boolean |
POST /events.download_task_log
描述
获取包含任务日志的附件
参数
Type | Name | Description | Schema |
---|---|---|---|
Body | request required | request body | request |
请求
Name | Description | Schema |
---|---|---|
line_format optional | Line string format. Used if the line type is 'text' Default : "{asctime} {worker} {level} {msg}" | string |
line_type optional | Line format type | enum (json, text) |
task required | Task ID | string |
响应
HTTP Code | Schema |
---|---|
200 | string |
POST /events.get_debug_image_sample
描述
返回提供的迭代中每个指标和变体的调试图像
参数
Type | Name | Description | Schema |
---|---|---|---|
Body | request required | request body | request |
请求
Name | Description | Schema |
---|---|---|
iteration optional | The iteration to bring debug image from. If not specified then the latest reported image is retrieved | integer |
metric required | Metric name | string |
model_events optional | If set then the retrieving model debug images. Otherwise task debug images Default : false | boolean |
navigate_current_metric optional | If set then subsequent navigation with next_debug_image_sample is done on the debug images for the passed metric only. Otherwise for all the metrics Default : true | boolean |
refresh optional | If set then scroll state will be refreshed to reflect the latest changes in the debug images | boolean |
scroll_id optional | Scroll ID from the previous call to get_debug_image_sample or empty | string |
task required | Task ID | string |
variant required | Metric variant | string |
响应
HTTP Code | Schema |
---|---|
200 | events.debug_image_sample_response |
POST /events.get_multi_task_metrics
描述
从指定类型的事件中获取唯一的指标和变体。仅分析为传递的任务或模型ID报告的事件。
参数
Type | Name | Description | Schema |
---|---|---|---|
Body | request required | request body | request |
请求
Name | Description | Schema |
---|---|---|
event_type optional | Event type. If not specified then metrics are collected from the reported events of all types | events.event_type_enum |
model_events optional | If not set or set to Falsethen passed ids are task ids otherwise model ids Default : false | boolean |
tasks required | task ids to get metrics from | < string > array |
响应
HTTP Code | Schema |
---|---|
200 | Response 200 |
响应 200
Name | Description | Schema |
---|---|---|
metrics optional | List of metrics and variants | < events.metric_variants > array |
POST /events.get_multi_task_plots
描述
获取给定任务的'plot'事件
参数
Type | Name | Description | Schema |
---|---|---|---|
Body | request required | request body | request |
请求
Name | Description | Schema |
---|---|---|
iters optional | Max number of latest iterations for which to return plots | integer |
last_iters_per_task_metric optional | If set to 'true' and iters passed then last iterations for each task metrics are retrieved. Otherwise last iterations for the whole task are retrieved Default : true | boolean |
metrics optional | List of metrics and variants | < events.metric_variants > array |
model_events optional | If set then the retrieving model events. Otherwise task events Default : false | boolean |
no_scroll optional | If Truethen no scroll is created. Suitable for one time calls Default : false | boolean |
scroll_id optional | Scroll ID of previous call (used for getting more results) | string |
tasks required | List of task IDs | < string > array |
响应
HTTP Code | Schema |
---|---|
200 | Response 200 |
响应 200
Name | Description | Schema |
---|---|---|
plots optional | Plots mapping (keyed by task name) | object |
returned optional | Number of results returned | integer |
scroll_id optional | Scroll ID for getting more results | string |
total optional | Total number of results available for this query. In case there are more than 10000 results it is set to 10000 | number |
POST /events.get_plot_sample
描述
返回提供的迭代的绘图
参数
Type | Name | Description | Schema |
---|---|---|---|
Body | request required | request body | request |
请求
Name | Description | Schema |
---|---|---|
iteration optional | The iteration to bring plot from. If not specified then the latest reported plot is retrieved | integer |
metric required | Metric name | string |
model_events optional | If set then the retrieving model plots. Otherwise task plots Default : false | boolean |
navigate_current_metric optional | If set then subsequent navigation with next_plot_sample is done on the plots for the passed metric only. Otherwise for all the metrics Default : true | boolean |
refresh optional | If set then scroll state will be refreshed to reflect the latest changes in the plots | boolean |
scroll_id optional | Scroll ID from the previous call to get_plot_sample or empty | string |
task required | Task ID | string |
响应
HTTP Code | Schema |
---|---|
200 | events.plot_sample_response |
POST /events.get_scalar_metric_data
描述
获取任务的标量指标数据
参数
Type | Name | Description | Schema |
---|---|---|---|
Body | request required | request body | request |
请求
Name | Description | Schema |
---|---|---|
metric optional | type of metric | string |
model_events optional | If set then the retrieving model events. Otherwise task events Default : false | boolean |
no_scroll optional | If Truethen no scroll is created. Suitable for one time calls Default : false | boolean |
scroll_id optional | Scroll ID of previous call (used for getting more results) | string |
task optional | task ID | string |
响应
HTTP Code | Schema |
---|---|
200 | Response 200 |
响应 200
Name | Description | Schema |
---|---|---|
events optional | task scalar metric events | < object > array |
returned optional | amount of events returned | integer |
scroll_id optional | Scroll ID for getting more results | string |
total optional | amount of events in task | integer |
POST /events.get_scalar_metrics_and_variants
描述
获取任务标量指标和变体
参数
Type | Name | Description | Schema |
---|---|---|---|
Body | request required | request body | request |
请求
Name | Description | Schema |
---|---|---|
model_events optional | If set then the retrieving model events. Otherwise task events Default : false | boolean |
task required | task ID | string |
响应
HTTP Code | Schema |
---|---|
200 | Response 200 |
响应 200
Name | Schema |
---|---|
metrics optional | object |
POST /events.get_task_events
描述
滚动查看任务事件,按时间戳排序
参数
Type | Name | Description | Schema |
---|---|---|---|
Body | request required | request body | request |
请求
Name | Description | Schema |
---|---|---|
batch_size optional | Number of events to return each time (default 500) | integer |
event_type optional | Return only events of this type | string |
metrics optional | List of metrics and variants | < events.metric_variants > array |
model_events optional | If set then get retrieving model events. Otherwise task events Default : false | boolean |
order optional | 'asc' (default) or 'desc'. | enum (asc, desc) |
scroll_id optional | Pass this value on next call to get next page | string |
task required | Task ID | string |
响应
HTTP Code | Schema |
---|---|
200 | Response 200 |
响应 200
Name | Description | Schema |
---|---|---|
events optional | Events list | < object > array |
returned optional | Number of results returned | integer |
scroll_id optional | Scroll ID for getting more results | string |
total optional | Total number of results available for this query. In case there are more than 10000 results it is set to 10000 | number |
POST /events.get_task_latest_scalar_values
描述
获取任务的最新标量值
参数
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 | Schema |
---|---|
metrics optional | < metrics > array |
指标
Name | Description | Schema |
---|---|---|
name optional | Metric name | string |
variants optional | < variants > array |
变体
Name | Description | Schema |
---|---|---|
last_100_value optional | Average of 100 last reported values | number |
last_value optional | Last reported value | number |
name optional | Variant name | string |
POST /events.get_task_log
描述
获取此任务的 'log' 事件
参数
Type | Name | Description | Schema |
---|---|---|---|
Body | request required | request body | request |
请求
Name | Description | Schema |
---|---|---|
batch_size optional | The amount of log events to return | integer |
from_timestamp optional | Epoch time in UTC ms to use as the navigation start. Optional. If not provided, reference timestamp is determined by the 'navigate_earlier' parameter (if true, reference timestamp is the last timestamp and if false, reference timestamp is the first timestamp) | number |
navigate_earlier optional | If set then log events are retreived from the latest to the earliest ones (in timestamp descending order, unless order='asc'). Otherwise from the earliest to the latest ones (in timestamp ascending order, unless order='desc'). The default is True | boolean |
order optional | If set, changes the order in which log events are returned based on the value of 'navigate_earlier' | enum (asc, desc) |
task required | Task ID | string |
响应
HTTP Code | Schema |
---|---|
200 | Response 200 |
响应 200
Name | Description | Schema |
---|---|---|
events optional | Log items list | < object > array |
returned optional | Number of log events returned | integer |
total optional | Total number of log events available for this query. In case there are more than 10000 events it is set to 10000 | number |
POST /events.get_task_metrics
描述
对于每个任务,获取报告了请求事件类型的指标列表
已报告
参数
Type | Name | Description | Schema |
---|---|---|---|
Body | request required | request body | request |
请求
Name | Description | Schema |
---|---|---|
event_type optional | Event type | events.event_type_enum |
model_events optional | If set then get metrics from model events. Otherwise from task events Default : false | boolean |
tasks required | Task IDs | < string > array |
响应
HTTP Code | Schema |
---|---|
200 | Response 200 |
响应 200
Name | Description | Schema |
---|---|---|
metrics optional | List of task with their metrics | < object > array |
POST /events.get_task_plots
描述
获取此任务的所有'plot'事件
参数
Type | Name | Description | Schema |
---|---|---|---|
Body | request required | request body | request |
请求
Name | Description | Schema |
---|---|---|
iters optional | Max number of latest iterations for which to return plots | integer |
metrics optional | List of metrics and variants | < events.metric_variants > array |
model_events optional | If set then the retrieving model events. Otherwise task events Default : false | boolean |
no_scroll optional | If Truethen no scroll is created. Suitable for one time calls Default : false | boolean |
scroll_id optional | Scroll ID of previous call (used for getting more results) | string |
task required | Task ID | string |
响应
HTTP Code | Schema |
---|---|
200 | Response 200 |
响应 200
Name | Description | Schema |
---|---|---|
plots optional | Plots list | < object > array |
returned optional | Number of results returned | integer |
scroll_id optional | Scroll ID for getting more results | string |
total optional | Total number of results available for this query. In case there are more than 10000 results it is set to 10000 | number |
POST /events.get_task_single_value_metrics
描述
获取传递任务的单一值指标
参数
Type | Name | Description | Schema |
---|---|---|---|
Body | request required | request body | request |
请求
Name | Description | Schema |
---|---|---|
metrics optional | List of metrics and variants | < events.metric_variants > array |
model_events optional | If set then the retrieving model events. Otherwise task events Default : false | boolean |
tasks required | List of task Task IDs | < string > array |
响应
HTTP Code | Schema |
---|---|
200 | events.single_value_metrics_response |
POST /events.get_vector_metrics_and_variants
参数
Type | Name | Description | Schema |
---|---|---|---|
Body | request required | request body | request |
请求
Name | Description | Schema |
---|---|---|
model_events optional | If set then the retrieving model events. Otherwise task events Default : false | boolean |
task required | Task ID | string |
响应
HTTP Code | Schema |
---|---|
200 | Response 200 |
响应 200
Name | Schema |
---|---|
metrics optional | < object > array |
POST /events.multi_task_scalar_metrics_iter_histogram
描述
用于比较多个任务的标量统计直方图
参数
Type | Name | Description | Schema |
---|---|---|---|
Body | request required | request body | request |
请求
Name | Description | Schema |
---|---|---|
key optional | Histogram x axis to use: iter - iteration number iso_time - event time as ISO formatted string timestamp - event timestamp as milliseconds since epoch | events.scalar_key_enum |
metrics optional | List of metrics and variants | < events.metric_variants > array |
model_events optional | If set then the retrieving model events. Otherwise task events Default : false | boolean |
samples optional | The amount of histogram points to return. Optional, the default value is 6000 | integer |
tasks required | List of task Task IDs. Maximum amount of tasks is 100 | < string > array |
响应
HTTP Code | Schema |
---|---|
200 | object |
POST /events.next_debug_image_sample
描述
获取相同迭代或下一次迭代的下一个变体的图像
迭代
参数
Type | Name | Description | Schema |
---|---|---|---|
Body | request required | request body | request |
请求
Name | Description | Schema |
---|---|---|
model_events optional | If set then the retrieving model debug images. Otherwise task debug images Default : false | boolean |
navigate_earlier optional | If set then get the either previous variant event from the current iteration or (if does not exist) the last variant event from the previous iteration. Otherwise next variant event from the current iteration or first variant event from the next iteration | boolean |
next_iteration optional | If set then navigate to the next/previous iteration Default : false | boolean |
scroll_id required | Scroll ID from the previous call to get_debug_image_sample | string |
task required | Task ID | string |
响应
HTTP Code | Schema |
---|---|
200 | events.debug_image_sample_response |
POST /events.next_plot_sample
描述
获取相同迭代或下一次迭代的下一个指标的图表
迭代
参数
Type | Name | Description | Schema |
---|---|---|---|
Body | request required | request body | request |
请求
Name | Description | Schema |
---|---|---|
model_events optional | If set then the retrieving model plots. Otherwise task plots Default : false | boolean |
navigate_earlier optional | If set then get the either previous metric events from the current iteration or (if does not exist) the last metric events from the previous iteration. Otherwise next metric events from the current iteration or first metric events from the next iteration | boolean |
next_iteration optional | If set then navigate to the next/previous iteration Default : false | boolean |
scroll_id required | Scroll ID from the previous call to get_plot_sample | string |
task required | Task ID | string |
响应
HTTP Code | Schema |
---|---|
200 | events.plot_sample_response |
POST /events.plots
描述
获取每个任务在请求的迭代次数中的绘图事件
参数
Type | Name | Description | Schema |
---|---|---|---|
Body | request required | request body | request |
请求
Name | Description | Schema |
---|---|---|
iters optional | Max number of latest iterations for which to return plots | integer |
metrics required | List of metrics and variants | < events.task_metric_variants > array |
model_events optional | If set then the retrieving model plots. Otherwise task plots Default : false | boolean |
navigate_earlier optional | If set then events are retreived from latest iterations to earliest ones. Otherwise from earliest iterations to the latest. The default is True | boolean |
refresh optional | If set then scroll will be moved to the latest iterations. The default is False | boolean |
scroll_id optional | Scroll ID of previous call (used for getting more results) | string |
响应
HTTP Code | Schema |
---|---|
200 | events.plots_response |
POST /events.scalar_metrics_iter_histogram
描述
获取任务中所有向量指标和变体的直方图数据
参数
Type | Name | Description | Schema |
---|---|---|---|
Body | request required | request body | request |
请求
Name | Description | Schema |
---|---|---|
key optional | Histogram x axis to use: iter - iteration number iso_time - event time as ISO formatted string timestamp - event timestamp as milliseconds since epoch | events.scalar_key_enum |
metrics optional | List of metrics and variants | < events.metric_variants > array |
model_events optional | If set then the retrieving model events. Otherwise task events Default : false | boolean |
samples optional | The amount of histogram points to return (0 to return all the points). Optional, the default value is 6000. | integer |
task required | Task ID | string |
响应
HTTP Code | Schema |
---|---|
200 | Response 200 |
响应 200
Name | Schema |
---|---|
images optional | < object > array |
POST /events.scalar_metrics_iter_raw
描述
获取任务中特定指标变体的原始数据
参数
Type | Name | Description | Schema |
---|---|---|---|
Body | request required | request body | request |
请求
Name | Description | Schema |
---|---|---|
batch_size optional | The number of data points to return for this call. Optional, the default value is 10000. Maximum batch size is 200000 | integer |
count_total optional | Count the total number of data points. If false, total number of data points is not counted and null is returned Default : false | boolean |
key optional | Array of x axis to return. Supported values: iter - iteration number timestamp - event timestamp as milliseconds since epoch | events.scalar_key_enum |
metric required | Metric and variants for which to return data points | events.metric_variants |
model_events optional | If set then the retrieving model events. Otherwise task events Default : false | boolean |
scroll_id optional | Optional Scroll ID. Use to get more data points following a previous call | string |
task required | Task ID | string |
响应
HTTP Code | Schema |
---|---|
200 | Response 200 |
响应 200
Name | Description | Schema |
---|---|---|
returned optional | Number of data points returned in this call. If 0 results were returned, no more results are avilable | integer |
scroll_id optional | Scroll ID. Use to get more data points when calling this endpoint again | string |
total optional | Total data points count. If count_total is false, null is returned | integer |
variants optional | Raw data points for each variant | object |
POST /events.vector_metrics_iter_histogram
描述
获取任务中所有标量指标和变体的直方图数据
参数
Type | Name | Description | Schema |
---|---|---|---|
Body | request required | request body | request |
请求
Name | Description | Schema |
---|---|---|
metric required | string | |
model_events optional | If set then the retrieving model events. Otherwise task events Default : false | boolean |
task required | Task ID | string |
variant required | string |
响应
HTTP Code | Schema |
---|---|
200 | Response 200 |
响应 200
Name | Schema |
---|---|
images optional | < object > array |