데이터셋 임포트 세션 생성
curl --request POST \
--url https://distillation.training.wandb.ai/v1/tasks/{alias}/dataset-imports \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"idempotency_key": "<string>",
"name": "<string>",
"file": {
"name": "<string>",
"size_bytes": 123
},
"split_policy": {
"mode": "preserve"
},
"duplicate_policy": {
"split_overlap": "reject"
}
}
'import requests
url = "https://distillation.training.wandb.ai/v1/tasks/{alias}/dataset-imports"
payload = {
"idempotency_key": "<string>",
"name": "<string>",
"file": {
"name": "<string>",
"size_bytes": 123
},
"split_policy": { "mode": "preserve" },
"duplicate_policy": { "split_overlap": "reject" }
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
idempotency_key: '<string>',
name: '<string>',
file: {name: '<string>', size_bytes: 123},
split_policy: {mode: 'preserve'},
duplicate_policy: {split_overlap: 'reject'}
})
};
fetch('https://distillation.training.wandb.ai/v1/tasks/{alias}/dataset-imports', 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}/dataset-imports",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'idempotency_key' => '<string>',
'name' => '<string>',
'file' => [
'name' => '<string>',
'size_bytes' => 123
],
'split_policy' => [
'mode' => 'preserve'
],
'duplicate_policy' => [
'split_overlap' => 'reject'
]
]),
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}/dataset-imports"
payload := strings.NewReader("{\n \"idempotency_key\": \"<string>\",\n \"name\": \"<string>\",\n \"file\": {\n \"name\": \"<string>\",\n \"size_bytes\": 123\n },\n \"split_policy\": {\n \"mode\": \"preserve\"\n },\n \"duplicate_policy\": {\n \"split_overlap\": \"reject\"\n }\n}")
req, _ := http.NewRequest("POST", 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.post("https://distillation.training.wandb.ai/v1/tasks/{alias}/dataset-imports")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"idempotency_key\": \"<string>\",\n \"name\": \"<string>\",\n \"file\": {\n \"name\": \"<string>\",\n \"size_bytes\": 123\n },\n \"split_policy\": {\n \"mode\": \"preserve\"\n },\n \"duplicate_policy\": {\n \"split_overlap\": \"reject\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://distillation.training.wandb.ai/v1/tasks/{alias}/dataset-imports")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"idempotency_key\": \"<string>\",\n \"name\": \"<string>\",\n \"file\": {\n \"name\": \"<string>\",\n \"size_bytes\": 123\n },\n \"split_policy\": {\n \"mode\": \"preserve\"\n },\n \"duplicate_policy\": {\n \"split_overlap\": \"reject\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"task_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"dataset_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"split_policy": {},
"duplicate_policy": {},
"state": "uploading",
"total_bytes": 2,
"counters": {
"staged_rows": 1,
"rejected_rows": 1,
"validation_errors": 1,
"errors_by_code": {},
"rows_by_split": {}
},
"error": "<string>",
"expires_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"file": {
"name": "<string>",
"size_bytes": 2,
"part_size_bytes": 2,
"part_count": 2,
"state": "pending",
"uploaded_bytes": 1,
"parts": [
{
"part_number": 2,
"size_bytes": 1,
"etag": "<string>"
}
]
},
"validation": {
"validation_state": "pending",
"validated_bytes": 1,
"validated_lines": 1,
"validated_rows": 1,
"raw_sha256": "<string>",
"error_count": 1,
"errors_truncated": true,
"errors": [
{
"physical_line": 2,
"source_byte_offset": 1,
"code": "<string>",
"message": "<string>"
}
]
}
}{
"error": {
"message": "Task 'missing' not found in entity 'your-team'",
"type": "not_found"
}
}데이터셋 임포트 세션 생성
POST
/
tasks
/
{alias}
/
dataset-imports
데이터셋 임포트 세션 생성
curl --request POST \
--url https://distillation.training.wandb.ai/v1/tasks/{alias}/dataset-imports \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"idempotency_key": "<string>",
"name": "<string>",
"file": {
"name": "<string>",
"size_bytes": 123
},
"split_policy": {
"mode": "preserve"
},
"duplicate_policy": {
"split_overlap": "reject"
}
}
'import requests
url = "https://distillation.training.wandb.ai/v1/tasks/{alias}/dataset-imports"
payload = {
"idempotency_key": "<string>",
"name": "<string>",
"file": {
"name": "<string>",
"size_bytes": 123
},
"split_policy": { "mode": "preserve" },
"duplicate_policy": { "split_overlap": "reject" }
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
idempotency_key: '<string>',
name: '<string>',
file: {name: '<string>', size_bytes: 123},
split_policy: {mode: 'preserve'},
duplicate_policy: {split_overlap: 'reject'}
})
};
fetch('https://distillation.training.wandb.ai/v1/tasks/{alias}/dataset-imports', 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}/dataset-imports",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'idempotency_key' => '<string>',
'name' => '<string>',
'file' => [
'name' => '<string>',
'size_bytes' => 123
],
'split_policy' => [
'mode' => 'preserve'
],
'duplicate_policy' => [
'split_overlap' => 'reject'
]
]),
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}/dataset-imports"
payload := strings.NewReader("{\n \"idempotency_key\": \"<string>\",\n \"name\": \"<string>\",\n \"file\": {\n \"name\": \"<string>\",\n \"size_bytes\": 123\n },\n \"split_policy\": {\n \"mode\": \"preserve\"\n },\n \"duplicate_policy\": {\n \"split_overlap\": \"reject\"\n }\n}")
req, _ := http.NewRequest("POST", 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.post("https://distillation.training.wandb.ai/v1/tasks/{alias}/dataset-imports")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"idempotency_key\": \"<string>\",\n \"name\": \"<string>\",\n \"file\": {\n \"name\": \"<string>\",\n \"size_bytes\": 123\n },\n \"split_policy\": {\n \"mode\": \"preserve\"\n },\n \"duplicate_policy\": {\n \"split_overlap\": \"reject\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://distillation.training.wandb.ai/v1/tasks/{alias}/dataset-imports")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"idempotency_key\": \"<string>\",\n \"name\": \"<string>\",\n \"file\": {\n \"name\": \"<string>\",\n \"size_bytes\": 123\n },\n \"split_policy\": {\n \"mode\": \"preserve\"\n },\n \"duplicate_policy\": {\n \"split_overlap\": \"reject\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"task_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"dataset_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"split_policy": {},
"duplicate_policy": {},
"state": "uploading",
"total_bytes": 2,
"counters": {
"staged_rows": 1,
"rejected_rows": 1,
"validation_errors": 1,
"errors_by_code": {},
"rows_by_split": {}
},
"error": "<string>",
"expires_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"file": {
"name": "<string>",
"size_bytes": 2,
"part_size_bytes": 2,
"part_count": 2,
"state": "pending",
"uploaded_bytes": 1,
"parts": [
{
"part_number": 2,
"size_bytes": 1,
"etag": "<string>"
}
]
},
"validation": {
"validation_state": "pending",
"validated_bytes": 1,
"validated_lines": 1,
"validated_rows": 1,
"raw_sha256": "<string>",
"error_count": 1,
"errors_truncated": true,
"errors": [
{
"physical_line": 2,
"source_byte_offset": 1,
"code": "<string>",
"message": "<string>"
}
]
}
}{
"error": {
"message": "Task 'missing' not found in entity 'your-team'",
"type": "not_found"
}
}인증
W&B API 키.
헤더
액세스 가능한 개인 또는 팀 entity. 인증된 사용자의 기본 entity를 사용하려면 생략하세요.
경로 매개변수
Pattern:
^[a-z0-9-]{1,64}$본문
application/json
응답
지속형 멀티파트 업로드 세션입니다.
대상 데이터셋 ID로, 데이터셋 생성이 시작될 때 부여됩니다. 데이터셋을 사용하기 전에 ready 상태가 될 때까지 기다리세요. 생성 전이나 데이터셋이 삭제된 후에는 Null입니다.
임포트 작업이 생성될 때 수락된 분할 정책입니다.
임포트 작업이 생성될 때 승인된 중복 정책.
사용 가능한 옵션:
uploading, queued, validating, auditing, committing, ready, failed, cancelled, expired 필수 범위:
x >= 1사용 가능한 경우 검증 합계; 그렇지 않으면 null.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
마지막 수정일 2026년 9월 30일
이 페이지가 도움이 되었나요?