$TOKEN and $BASE:
jq is used throughout for readability. Nothing depends on it.
Feature Refinery
Create, upload two files, start, poll, download.1. Create the run
409.
numberOfBuckets must be 4, 10 or 20.
2. Upload both files
The response carries oneuploadTargets entry per file. Each has a url and possibly a
requiredHeader as a single Name:value string.
Authorization header on these. The URL is already signed, and adding one gives 403.
3. Start it
400 means a file did not arrive, or the training file has more than 70 columns. 409 means it
was already started. 429 means you already have 5 runs in flight.
4. Poll
PENDING → SETUP_* → MEASURE_INITIAL_THRESHOLD* → BASELINE_RUN_* →
REFINING_LOOP_* → CREATING_RESULT → REFINEMENT_COMPLETED. Match on the terminal states, not
on the intermediate ones; those can change.
This takes a while. Time scales with columns, not rows.
5. Collect the result
null until the state is REFINEMENT_COMPLETED, and they expire. Fetch the
result again for fresh ones.
You do not need to download anything if the next step is training: hand the key straight over.
Model Crucible
1a. Dataset from a finished refinement
uploadTargets comes back empty. The refined files, the bucket count and the measured target all
come across with the refinement.
1b. Dataset from your own files
/clean is required, and only after both files have landed.
2. Wait for the dataset
FAILED is terminal too. Check for it, and read .errors when it happens.
3. Train
Read the target off the dataset rather than inventing one.4. Poll the run
5. Look at what it offers
falseDecisions. v1 is champion by default.
6. Change the champion, if you want a different trade
attemptNumber must be one the run actually offers, or you get 400. Nothing is rebuilt; a flag
moves. Predictions already run keep the version they ran against.
7. Predict
_file. The underscore is required.
applyColumnStatusFilter=true drops the columns the refinement removed, going by position, so you
can send your original unlabelled file unchanged. It only works where the model’s dataset came from
a refinement; anywhere else it is a 400. A file you already stripped yourself passes through
untouched.
Common problems
Build a CLI or agent from this
The same contract, written for a machine to consume.