Create or replace task Automation
curl --request PUT \
--url https://distillation.training.wandb.ai/v1/tasks/{alias}/automation \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"dataset": {
"source": "task",
"after": "2023-11-07T05:31:56Z",
"before": "2023-11-07T05:31:56Z",
"task_version": 123,
"min_train_examples": 123,
"relabel": {
"model_ref": "<string>",
"use_original_output": false
},
"publish_to_weave": true,
"publish_relabel_to_weave": true
},
"models": [
{
"base_model": "<string>",
"model_name": "<string>",
"model_config": {
"max_examples": 123,
"config": {
"batch_size": "auto",
"learning_rate": 1,
"metric_logging": {}
},
"experimental_config": {}
}
}
],
"teacher": "<string>",
"eval": {
"sample_size": 123,
"export_eval": true
},
"rollout": {
"task_version": 123,
"min_win_rate": 0.5,
"winner_traffic": 0
}
}
'import requests
url = "https://distillation.training.wandb.ai/v1/tasks/{alias}/automation"
payload = {
"dataset": {
"source": "task",
"after": "2023-11-07T05:31:56Z",
"before": "2023-11-07T05:31:56Z",
"task_version": 123,
"min_train_examples": 123,
"relabel": {
"model_ref": "<string>",
"use_original_output": False
},
"publish_to_weave": True,
"publish_relabel_to_weave": True
},
"models": [
{
"base_model": "<string>",
"model_name": "<string>",
"model_config": {
"max_examples": 123,
"config": {
"batch_size": "auto",
"learning_rate": 1,
"metric_logging": {}
},
"experimental_config": {}
}
}
],
"teacher": "<string>",
"eval": {
"sample_size": 123,
"export_eval": True
},
"rollout": {
"task_version": 123,
"min_win_rate": 0.5,
"winner_traffic": 0
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
dataset: {
source: 'task',
after: '2023-11-07T05:31:56Z',
before: '2023-11-07T05:31:56Z',
task_version: 123,
min_train_examples: 123,
relabel: {model_ref: '<string>', use_original_output: false},
publish_to_weave: true,
publish_relabel_to_weave: true
},
models: [
{
base_model: '<string>',
model_name: '<string>',
model_config: {
max_examples: 123,
config: {batch_size: 'auto', learning_rate: 1, metric_logging: {}},
experimental_config: {}
}
}
],
teacher: '<string>',
eval: {sample_size: 123, export_eval: true},
rollout: {task_version: 123, min_win_rate: 0.5, winner_traffic: 0}
})
};
fetch('https://distillation.training.wandb.ai/v1/tasks/{alias}/automation', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://distillation.training.wandb.ai/v1/tasks/{alias}/automation",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'dataset' => [
'source' => 'task',
'after' => '2023-11-07T05:31:56Z',
'before' => '2023-11-07T05:31:56Z',
'task_version' => 123,
'min_train_examples' => 123,
'relabel' => [
'model_ref' => '<string>',
'use_original_output' => false
],
'publish_to_weave' => true,
'publish_relabel_to_weave' => true
],
'models' => [
[
'base_model' => '<string>',
'model_name' => '<string>',
'model_config' => [
'max_examples' => 123,
'config' => [
'batch_size' => 'auto',
'learning_rate' => 1,
'metric_logging' => [
]
],
'experimental_config' => [
]
]
]
],
'teacher' => '<string>',
'eval' => [
'sample_size' => 123,
'export_eval' => true
],
'rollout' => [
'task_version' => 123,
'min_win_rate' => 0.5,
'winner_traffic' => 0
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://distillation.training.wandb.ai/v1/tasks/{alias}/automation"
payload := strings.NewReader("{\n \"dataset\": {\n \"source\": \"task\",\n \"after\": \"2023-11-07T05:31:56Z\",\n \"before\": \"2023-11-07T05:31:56Z\",\n \"task_version\": 123,\n \"min_train_examples\": 123,\n \"relabel\": {\n \"model_ref\": \"<string>\",\n \"use_original_output\": false\n },\n \"publish_to_weave\": true,\n \"publish_relabel_to_weave\": true\n },\n \"models\": [\n {\n \"base_model\": \"<string>\",\n \"model_name\": \"<string>\",\n \"model_config\": {\n \"max_examples\": 123,\n \"config\": {\n \"batch_size\": \"auto\",\n \"learning_rate\": 1,\n \"metric_logging\": {}\n },\n \"experimental_config\": {}\n }\n }\n ],\n \"teacher\": \"<string>\",\n \"eval\": {\n \"sample_size\": 123,\n \"export_eval\": true\n },\n \"rollout\": {\n \"task_version\": 123,\n \"min_win_rate\": 0.5,\n \"winner_traffic\": 0\n }\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://distillation.training.wandb.ai/v1/tasks/{alias}/automation")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"dataset\": {\n \"source\": \"task\",\n \"after\": \"2023-11-07T05:31:56Z\",\n \"before\": \"2023-11-07T05:31:56Z\",\n \"task_version\": 123,\n \"min_train_examples\": 123,\n \"relabel\": {\n \"model_ref\": \"<string>\",\n \"use_original_output\": false\n },\n \"publish_to_weave\": true,\n \"publish_relabel_to_weave\": true\n },\n \"models\": [\n {\n \"base_model\": \"<string>\",\n \"model_name\": \"<string>\",\n \"model_config\": {\n \"max_examples\": 123,\n \"config\": {\n \"batch_size\": \"auto\",\n \"learning_rate\": 1,\n \"metric_logging\": {}\n },\n \"experimental_config\": {}\n }\n }\n ],\n \"teacher\": \"<string>\",\n \"eval\": {\n \"sample_size\": 123,\n \"export_eval\": true\n },\n \"rollout\": {\n \"task_version\": 123,\n \"min_win_rate\": 0.5,\n \"winner_traffic\": 0\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://distillation.training.wandb.ai/v1/tasks/{alias}/automation")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"dataset\": {\n \"source\": \"task\",\n \"after\": \"2023-11-07T05:31:56Z\",\n \"before\": \"2023-11-07T05:31:56Z\",\n \"task_version\": 123,\n \"min_train_examples\": 123,\n \"relabel\": {\n \"model_ref\": \"<string>\",\n \"use_original_output\": false\n },\n \"publish_to_weave\": true,\n \"publish_relabel_to_weave\": true\n },\n \"models\": [\n {\n \"base_model\": \"<string>\",\n \"model_name\": \"<string>\",\n \"model_config\": {\n \"max_examples\": 123,\n \"config\": {\n \"batch_size\": \"auto\",\n \"learning_rate\": 1,\n \"metric_logging\": {}\n },\n \"experimental_config\": {}\n }\n }\n ],\n \"teacher\": \"<string>\",\n \"eval\": {\n \"sample_size\": 123,\n \"export_eval\": true\n },\n \"rollout\": {\n \"task_version\": 123,\n \"min_win_rate\": 0.5,\n \"winner_traffic\": 0\n }\n}"
response = http.request(request)
puts response.read_body{
"config": {},
"revision": 123,
"started_by": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"run": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "collecting",
"dataset_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"eval_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"error": "<string>"
}
}{
"config": {},
"revision": 123,
"started_by": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"run": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "collecting",
"dataset_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"eval_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"error": "<string>"
}
}{
"error": {
"message": "Task 'missing' not found in entity 'your-team'",
"type": "not_found"
}
}Create or replace task Automation
Starts a run from task traffic or an existing dataset. Replacement is rejected after an active run passes collection.
PUT
/
tasks
/
{alias}
/
automation
Create or replace task Automation
curl --request PUT \
--url https://distillation.training.wandb.ai/v1/tasks/{alias}/automation \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"dataset": {
"source": "task",
"after": "2023-11-07T05:31:56Z",
"before": "2023-11-07T05:31:56Z",
"task_version": 123,
"min_train_examples": 123,
"relabel": {
"model_ref": "<string>",
"use_original_output": false
},
"publish_to_weave": true,
"publish_relabel_to_weave": true
},
"models": [
{
"base_model": "<string>",
"model_name": "<string>",
"model_config": {
"max_examples": 123,
"config": {
"batch_size": "auto",
"learning_rate": 1,
"metric_logging": {}
},
"experimental_config": {}
}
}
],
"teacher": "<string>",
"eval": {
"sample_size": 123,
"export_eval": true
},
"rollout": {
"task_version": 123,
"min_win_rate": 0.5,
"winner_traffic": 0
}
}
'import requests
url = "https://distillation.training.wandb.ai/v1/tasks/{alias}/automation"
payload = {
"dataset": {
"source": "task",
"after": "2023-11-07T05:31:56Z",
"before": "2023-11-07T05:31:56Z",
"task_version": 123,
"min_train_examples": 123,
"relabel": {
"model_ref": "<string>",
"use_original_output": False
},
"publish_to_weave": True,
"publish_relabel_to_weave": True
},
"models": [
{
"base_model": "<string>",
"model_name": "<string>",
"model_config": {
"max_examples": 123,
"config": {
"batch_size": "auto",
"learning_rate": 1,
"metric_logging": {}
},
"experimental_config": {}
}
}
],
"teacher": "<string>",
"eval": {
"sample_size": 123,
"export_eval": True
},
"rollout": {
"task_version": 123,
"min_win_rate": 0.5,
"winner_traffic": 0
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
dataset: {
source: 'task',
after: '2023-11-07T05:31:56Z',
before: '2023-11-07T05:31:56Z',
task_version: 123,
min_train_examples: 123,
relabel: {model_ref: '<string>', use_original_output: false},
publish_to_weave: true,
publish_relabel_to_weave: true
},
models: [
{
base_model: '<string>',
model_name: '<string>',
model_config: {
max_examples: 123,
config: {batch_size: 'auto', learning_rate: 1, metric_logging: {}},
experimental_config: {}
}
}
],
teacher: '<string>',
eval: {sample_size: 123, export_eval: true},
rollout: {task_version: 123, min_win_rate: 0.5, winner_traffic: 0}
})
};
fetch('https://distillation.training.wandb.ai/v1/tasks/{alias}/automation', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://distillation.training.wandb.ai/v1/tasks/{alias}/automation",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'dataset' => [
'source' => 'task',
'after' => '2023-11-07T05:31:56Z',
'before' => '2023-11-07T05:31:56Z',
'task_version' => 123,
'min_train_examples' => 123,
'relabel' => [
'model_ref' => '<string>',
'use_original_output' => false
],
'publish_to_weave' => true,
'publish_relabel_to_weave' => true
],
'models' => [
[
'base_model' => '<string>',
'model_name' => '<string>',
'model_config' => [
'max_examples' => 123,
'config' => [
'batch_size' => 'auto',
'learning_rate' => 1,
'metric_logging' => [
]
],
'experimental_config' => [
]
]
]
],
'teacher' => '<string>',
'eval' => [
'sample_size' => 123,
'export_eval' => true
],
'rollout' => [
'task_version' => 123,
'min_win_rate' => 0.5,
'winner_traffic' => 0
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://distillation.training.wandb.ai/v1/tasks/{alias}/automation"
payload := strings.NewReader("{\n \"dataset\": {\n \"source\": \"task\",\n \"after\": \"2023-11-07T05:31:56Z\",\n \"before\": \"2023-11-07T05:31:56Z\",\n \"task_version\": 123,\n \"min_train_examples\": 123,\n \"relabel\": {\n \"model_ref\": \"<string>\",\n \"use_original_output\": false\n },\n \"publish_to_weave\": true,\n \"publish_relabel_to_weave\": true\n },\n \"models\": [\n {\n \"base_model\": \"<string>\",\n \"model_name\": \"<string>\",\n \"model_config\": {\n \"max_examples\": 123,\n \"config\": {\n \"batch_size\": \"auto\",\n \"learning_rate\": 1,\n \"metric_logging\": {}\n },\n \"experimental_config\": {}\n }\n }\n ],\n \"teacher\": \"<string>\",\n \"eval\": {\n \"sample_size\": 123,\n \"export_eval\": true\n },\n \"rollout\": {\n \"task_version\": 123,\n \"min_win_rate\": 0.5,\n \"winner_traffic\": 0\n }\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://distillation.training.wandb.ai/v1/tasks/{alias}/automation")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"dataset\": {\n \"source\": \"task\",\n \"after\": \"2023-11-07T05:31:56Z\",\n \"before\": \"2023-11-07T05:31:56Z\",\n \"task_version\": 123,\n \"min_train_examples\": 123,\n \"relabel\": {\n \"model_ref\": \"<string>\",\n \"use_original_output\": false\n },\n \"publish_to_weave\": true,\n \"publish_relabel_to_weave\": true\n },\n \"models\": [\n {\n \"base_model\": \"<string>\",\n \"model_name\": \"<string>\",\n \"model_config\": {\n \"max_examples\": 123,\n \"config\": {\n \"batch_size\": \"auto\",\n \"learning_rate\": 1,\n \"metric_logging\": {}\n },\n \"experimental_config\": {}\n }\n }\n ],\n \"teacher\": \"<string>\",\n \"eval\": {\n \"sample_size\": 123,\n \"export_eval\": true\n },\n \"rollout\": {\n \"task_version\": 123,\n \"min_win_rate\": 0.5,\n \"winner_traffic\": 0\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://distillation.training.wandb.ai/v1/tasks/{alias}/automation")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"dataset\": {\n \"source\": \"task\",\n \"after\": \"2023-11-07T05:31:56Z\",\n \"before\": \"2023-11-07T05:31:56Z\",\n \"task_version\": 123,\n \"min_train_examples\": 123,\n \"relabel\": {\n \"model_ref\": \"<string>\",\n \"use_original_output\": false\n },\n \"publish_to_weave\": true,\n \"publish_relabel_to_weave\": true\n },\n \"models\": [\n {\n \"base_model\": \"<string>\",\n \"model_name\": \"<string>\",\n \"model_config\": {\n \"max_examples\": 123,\n \"config\": {\n \"batch_size\": \"auto\",\n \"learning_rate\": 1,\n \"metric_logging\": {}\n },\n \"experimental_config\": {}\n }\n }\n ],\n \"teacher\": \"<string>\",\n \"eval\": {\n \"sample_size\": 123,\n \"export_eval\": true\n },\n \"rollout\": {\n \"task_version\": 123,\n \"min_win_rate\": 0.5,\n \"winner_traffic\": 0\n }\n}"
response = http.request(request)
puts response.read_body{
"config": {},
"revision": 123,
"started_by": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"run": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "collecting",
"dataset_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"eval_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"error": "<string>"
}
}{
"config": {},
"revision": 123,
"started_by": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"run": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "collecting",
"dataset_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"eval_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"error": "<string>"
}
}{
"error": {
"message": "Task 'missing' not found in entity 'your-team'",
"type": "not_found"
}
}Authorizations
A personal or service-account W&B API key.
Headers
Accessible personal or team entity. Omit to use the API key's default entity.
Path Parameters
Pattern:
^[a-z0-9-]{1,64}$Body
application/json
Last modified on August 25, 2026
Was this page helpful?
⌘I