Train a surrogate: a deterministic MLP distilled from a dataset (G6 slice 1)
curl --request POST \
--url https://api.eddy.engineer/v1/train.run \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"spec": {
"dataset_id": "<string>",
"activation": "softsign",
"epochs": 500,
"hidden": [
16,
16
],
"l2": 0,
"learning_rate": 0.05,
"name": "surrogate",
"seed": 42
}
}
'import requests
url = "https://api.eddy.engineer/v1/train.run"
payload = { "spec": {
"dataset_id": "<string>",
"activation": "softsign",
"epochs": 500,
"hidden": [16, 16],
"l2": 0,
"learning_rate": 0.05,
"name": "surrogate",
"seed": 42
} }
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>',
activation: 'softsign',
epochs: 500,
hidden: [16, 16],
l2: 0,
learning_rate: 0.05,
name: 'surrogate',
seed: 42
}
})
};
fetch('https://api.eddy.engineer/v1/train.run', 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.run",
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>',
'activation' => 'softsign',
'epochs' => 500,
'hidden' => [
16,
16
],
'l2' => 0,
'learning_rate' => 0.05,
'name' => 'surrogate',
'seed' => 42
]
]),
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.run"
payload := strings.NewReader("{\n \"spec\": {\n \"dataset_id\": \"<string>\",\n \"activation\": \"softsign\",\n \"epochs\": 500,\n \"hidden\": [\n 16,\n 16\n ],\n \"l2\": 0,\n \"learning_rate\": 0.05,\n \"name\": \"surrogate\",\n \"seed\": 42\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.run")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"spec\": {\n \"dataset_id\": \"<string>\",\n \"activation\": \"softsign\",\n \"epochs\": 500,\n \"hidden\": [\n 16,\n 16\n ],\n \"l2\": 0,\n \"learning_rate\": 0.05,\n \"name\": \"surrogate\",\n \"seed\": 42\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eddy.engineer/v1/train.run")
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 \"activation\": \"softsign\",\n \"epochs\": 500,\n \"hidden\": [\n 16,\n 16\n ],\n \"l2\": 0,\n \"learning_rate\": 0.05,\n \"name\": \"surrogate\",\n \"seed\": 42\n }\n}"
response = http.request(request)
puts response.read_body{
"blob_uri": "<string>",
"doc": {},
"train_run_blob_id": "<string>"
}{
"error": {
"code": "INVALID_GEOMETRY",
"message": "<string>"
}
}Training
Train a surrogate: a deterministic MLP distilled from a dataset (G6 slice 1)
A pure-Rust f64 MLP with platform-exact numerics: softsign/relu activations (no transcendental libm calls), SplitMix64 weight init seeded from the spec, full-batch gradient descent in fixed row order. Training is a pure function of (dataset bytes, spec): the checkpoint and run document are content-addressed and byte-identical across engine instances - retraining the same spec returns the identical run id. A surrogate never enters the result path; it is a product distilled from the corpus.
POST
/
v1
/
train.run
Train a surrogate: a deterministic MLP distilled from a dataset (G6 slice 1)
curl --request POST \
--url https://api.eddy.engineer/v1/train.run \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"spec": {
"dataset_id": "<string>",
"activation": "softsign",
"epochs": 500,
"hidden": [
16,
16
],
"l2": 0,
"learning_rate": 0.05,
"name": "surrogate",
"seed": 42
}
}
'import requests
url = "https://api.eddy.engineer/v1/train.run"
payload = { "spec": {
"dataset_id": "<string>",
"activation": "softsign",
"epochs": 500,
"hidden": [16, 16],
"l2": 0,
"learning_rate": 0.05,
"name": "surrogate",
"seed": 42
} }
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>',
activation: 'softsign',
epochs: 500,
hidden: [16, 16],
l2: 0,
learning_rate: 0.05,
name: 'surrogate',
seed: 42
}
})
};
fetch('https://api.eddy.engineer/v1/train.run', 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.run",
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>',
'activation' => 'softsign',
'epochs' => 500,
'hidden' => [
16,
16
],
'l2' => 0,
'learning_rate' => 0.05,
'name' => 'surrogate',
'seed' => 42
]
]),
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.run"
payload := strings.NewReader("{\n \"spec\": {\n \"dataset_id\": \"<string>\",\n \"activation\": \"softsign\",\n \"epochs\": 500,\n \"hidden\": [\n 16,\n 16\n ],\n \"l2\": 0,\n \"learning_rate\": 0.05,\n \"name\": \"surrogate\",\n \"seed\": 42\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.run")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"spec\": {\n \"dataset_id\": \"<string>\",\n \"activation\": \"softsign\",\n \"epochs\": 500,\n \"hidden\": [\n 16,\n 16\n ],\n \"l2\": 0,\n \"learning_rate\": 0.05,\n \"name\": \"surrogate\",\n \"seed\": 42\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eddy.engineer/v1/train.run")
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 \"activation\": \"softsign\",\n \"epochs\": 500,\n \"hidden\": [\n 16,\n 16\n ],\n \"l2\": 0,\n \"learning_rate\": 0.05,\n \"name\": \"surrogate\",\n \"seed\": 42\n }\n}"
response = http.request(request)
puts response.read_body{
"blob_uri": "<string>",
"doc": {},
"train_run_blob_id": "<string>"
}{
"error": {
"code": "INVALID_GEOMETRY",
"message": "<string>"
}
}