curl --request POST \
--url https://api.eddy.engineer/v1/train.field \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"spec": {
"dataset_id": "<string>",
"cfg": {},
"epochs": 100000,
"learning_rate": 0.0005,
"loss": "rel",
"max_hours": 0.5,
"members": 1,
"name": "field-surrogate",
"seed": 0,
"size": "S"
},
"compute": {
"machine": "<string>",
"provider": "<string>",
"region": "<string>"
}
}
'import requests
url = "https://api.eddy.engineer/v1/train.field"
payload = {
"spec": {
"dataset_id": "<string>",
"cfg": {},
"epochs": 100000,
"learning_rate": 0.0005,
"loss": "rel",
"max_hours": 0.5,
"members": 1,
"name": "field-surrogate",
"seed": 0,
"size": "S"
},
"compute": {
"machine": "<string>",
"provider": "<string>",
"region": "<string>"
}
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
spec: {
dataset_id: '<string>',
cfg: {},
epochs: 100000,
learning_rate: 0.0005,
loss: 'rel',
max_hours: 0.5,
members: 1,
name: 'field-surrogate',
seed: 0,
size: 'S'
},
compute: {machine: '<string>', provider: '<string>', region: '<string>'}
})
};
fetch('https://api.eddy.engineer/v1/train.field', 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://api.eddy.engineer/v1/train.field",
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([
'spec' => [
'dataset_id' => '<string>',
'cfg' => [
],
'epochs' => 100000,
'learning_rate' => 0.0005,
'loss' => 'rel',
'max_hours' => 0.5,
'members' => 1,
'name' => 'field-surrogate',
'seed' => 0,
'size' => 'S'
],
'compute' => [
'machine' => '<string>',
'provider' => '<string>',
'region' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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://api.eddy.engineer/v1/train.field"
payload := strings.NewReader("{\n \"spec\": {\n \"dataset_id\": \"<string>\",\n \"cfg\": {},\n \"epochs\": 100000,\n \"learning_rate\": 0.0005,\n \"loss\": \"rel\",\n \"max_hours\": 0.5,\n \"members\": 1,\n \"name\": \"field-surrogate\",\n \"seed\": 0,\n \"size\": \"S\"\n },\n \"compute\": {\n \"machine\": \"<string>\",\n \"provider\": \"<string>\",\n \"region\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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://api.eddy.engineer/v1/train.field")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"spec\": {\n \"dataset_id\": \"<string>\",\n \"cfg\": {},\n \"epochs\": 100000,\n \"learning_rate\": 0.0005,\n \"loss\": \"rel\",\n \"max_hours\": 0.5,\n \"members\": 1,\n \"name\": \"field-surrogate\",\n \"seed\": 0,\n \"size\": \"S\"\n },\n \"compute\": {\n \"machine\": \"<string>\",\n \"provider\": \"<string>\",\n \"region\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eddy.engineer/v1/train.field")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"spec\": {\n \"dataset_id\": \"<string>\",\n \"cfg\": {},\n \"epochs\": 100000,\n \"learning_rate\": 0.0005,\n \"loss\": \"rel\",\n \"max_hours\": 0.5,\n \"members\": 1,\n \"name\": \"field-surrogate\",\n \"seed\": 0,\n \"size\": \"S\"\n },\n \"compute\": {\n \"machine\": \"<string>\",\n \"provider\": \"<string>\",\n \"region\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{}{
"error": {
"code": "INVALID_GEOMETRY",
"message": "<string>"
}
}{
"error": {
"code": "INVALID_GEOMETRY",
"message": "<string>"
}
}{
"error": {
"code": "INVALID_GEOMETRY",
"message": "<string>"
}
}Train a field surrogate (Transolver, MeshGraphNet or U-Net) on a GPU job (G6, field slice)
Queues a training run of one of the DX9 field families on a field dataset and answers 202 with the job reference. On the fleet it runs on a GPU class (compute: {region, machine}; default the deployment’s first GPU pool, the 48 GB class first), billed whole per machine-second and held against the caller’s credit; with no fleet, in this process with the trainer SS_TRAIN_PY names. The runner fetches the cases, trains (PyTorch, ml/dx9/hosted_train.py: the DX9 v2 loop, a per-case relative loss, bf16 on cards that have it, the best val checkpoint kept) under max_hours cut to the job’s own timeout, then finishes the model itself: the confidence reference (the v2 descriptor’s k-nearest-neighbour distance over the training cases), the held-out metrics on val, test and ood (the first 300 cases of each by id) and an ensemble’s spread are computed by the engine’s Rust forward, the one /v1/preview.explore serves. GPU training is not bit-reproducible: the same spec trains different weights; what is pinned is the dataset id, the spec hash, the weights’ content address and metrics that are a pure function of those bytes (GET /v1/train/runs/{id}/verify recomputes them). The finished job (GET /v1/jobs/{job_id}) carries field_train: {train_run_blob_id, model_blob_id, name, family, spec_hash, dataset_id, weights, members, test, val, device, train_s, hours_cap}; the run is listed at /v1/train/runs (summary kind: field) and predicts through /v1/preview.explore with physics: predict and model: <train_run_blob_id>. Refuses typed: FIELD_TRAIN_INVALID (family, size, cfg, members, hours, learning rate), FIELD_DATASET_UNKNOWN, FIELD_DATASET_TOO_SMALL (fewer than 8 train cases, or no val or test case), FIELD_TRAIN_NEEDS_GPU (a CPU class on the fleet, or no GPU pool), TRAINER_NOT_INSTALLED (no fleet and no trainer here), NO_POOL; the job ends in error TRAINER_NOT_INSTALLED / TRAINER_FAILED / TRAINER_TIMEOUT / FIELD_TRAIN_NO_TIME.
curl --request POST \
--url https://api.eddy.engineer/v1/train.field \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"spec": {
"dataset_id": "<string>",
"cfg": {},
"epochs": 100000,
"learning_rate": 0.0005,
"loss": "rel",
"max_hours": 0.5,
"members": 1,
"name": "field-surrogate",
"seed": 0,
"size": "S"
},
"compute": {
"machine": "<string>",
"provider": "<string>",
"region": "<string>"
}
}
'import requests
url = "https://api.eddy.engineer/v1/train.field"
payload = {
"spec": {
"dataset_id": "<string>",
"cfg": {},
"epochs": 100000,
"learning_rate": 0.0005,
"loss": "rel",
"max_hours": 0.5,
"members": 1,
"name": "field-surrogate",
"seed": 0,
"size": "S"
},
"compute": {
"machine": "<string>",
"provider": "<string>",
"region": "<string>"
}
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
spec: {
dataset_id: '<string>',
cfg: {},
epochs: 100000,
learning_rate: 0.0005,
loss: 'rel',
max_hours: 0.5,
members: 1,
name: 'field-surrogate',
seed: 0,
size: 'S'
},
compute: {machine: '<string>', provider: '<string>', region: '<string>'}
})
};
fetch('https://api.eddy.engineer/v1/train.field', 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://api.eddy.engineer/v1/train.field",
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([
'spec' => [
'dataset_id' => '<string>',
'cfg' => [
],
'epochs' => 100000,
'learning_rate' => 0.0005,
'loss' => 'rel',
'max_hours' => 0.5,
'members' => 1,
'name' => 'field-surrogate',
'seed' => 0,
'size' => 'S'
],
'compute' => [
'machine' => '<string>',
'provider' => '<string>',
'region' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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://api.eddy.engineer/v1/train.field"
payload := strings.NewReader("{\n \"spec\": {\n \"dataset_id\": \"<string>\",\n \"cfg\": {},\n \"epochs\": 100000,\n \"learning_rate\": 0.0005,\n \"loss\": \"rel\",\n \"max_hours\": 0.5,\n \"members\": 1,\n \"name\": \"field-surrogate\",\n \"seed\": 0,\n \"size\": \"S\"\n },\n \"compute\": {\n \"machine\": \"<string>\",\n \"provider\": \"<string>\",\n \"region\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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://api.eddy.engineer/v1/train.field")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"spec\": {\n \"dataset_id\": \"<string>\",\n \"cfg\": {},\n \"epochs\": 100000,\n \"learning_rate\": 0.0005,\n \"loss\": \"rel\",\n \"max_hours\": 0.5,\n \"members\": 1,\n \"name\": \"field-surrogate\",\n \"seed\": 0,\n \"size\": \"S\"\n },\n \"compute\": {\n \"machine\": \"<string>\",\n \"provider\": \"<string>\",\n \"region\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eddy.engineer/v1/train.field")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"spec\": {\n \"dataset_id\": \"<string>\",\n \"cfg\": {},\n \"epochs\": 100000,\n \"learning_rate\": 0.0005,\n \"loss\": \"rel\",\n \"max_hours\": 0.5,\n \"members\": 1,\n \"name\": \"field-surrogate\",\n \"seed\": 0,\n \"size\": \"S\"\n },\n \"compute\": {\n \"machine\": \"<string>\",\n \"provider\": \"<string>\",\n \"region\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{}{
"error": {
"code": "INVALID_GEOMETRY",
"message": "<string>"
}
}{
"error": {
"code": "INVALID_GEOMETRY",
"message": "<string>"
}
}{
"error": {
"code": "INVALID_GEOMETRY",
"message": "<string>"
}
}Response
{job_id, phase: queued, poll, events, pool?, job_kind: field_train, result_under: field_train, spec_hash, cfg, family, members, max_hours, dataset_id, note}
The response is of type object.