Reasoning Fit
Submit a reasoning fit and return immediately.
Two routing modes share the entry point:
Both modes use the same scheduler-owned submission path — the
router never touches jobs or computation_node, only
compiles + ships.
- Standard path — build the
ReasoningTrainer, compile its ComputationGraph (synth-gen runs synchronously insidecompileto materialize the augmented dataset; the returned DAG is the trainer’s HPO graph plus areasoning/finalizeleaf), pickle the trainer to S3, andputa :class:RequestToComputeGraphcarrying the wire-form graph on the scheduler’s in-process inbox. - DiffModel path — when
teacher_get_grads_urlpoints at this server’s/v1/models/{id}/get_grads, there’s no stage-1 fan-out and noReasoningTrainer: we pickle a :class:DiffModelBundle(dataset + finalize_only_fit args) to S3 and submit a single-node graph (reasoning/diffmodel_finalize). The runner loads the bundle and runs the one Modal finalize call + schema upload; the scheduler’s terminal recording flips the job tocompletedandfinalize_job_resultwrites themodelsrow — same single-writer path as everything else.
Body
POST /v1/reasoning/fit — fit a ReasoningModel against a registered dataset.
When a teacher is set (teacher_model_id or teacher_predict_url),
task becomes evaluation-only — the teacher provides the training
target.
Id of a dataset registered via POST /v1/datasets. The server looks it up and proceeds with the fit pipeline.
A single column comparison, e.g. col("ts") >= "2024-01-01".
value is unused for is_null / is_not_null and is a list for
in / not_in. Timestamps travel as ISO-8601 strings and are coerced
to the column dtype trainer-side.
- Comparison
- BoolExpr
- Not
Predict a continuous target.
- Regression
- Binclass
- Multiclass
- Forecasting
- SequenceRegression
- SequenceBinclass
- SequenceMulticlass
Candidate model-family identifiers. reasoning.fit pins the surrogate via force_model_type, so at most one entry is accepted.
1 <= x <= 200Distill from a same-server trained model identified by id. The synth-gen worker calls the inference worker in-process — no HTTP self-loop. Mutually exclusive with teacher_predict_url.
If set, distil an external teacher at this URL instead of training on labels. Use teacher_model_id for same-server teachers.
Headers to send when calling teacher_predict_url.
If set, the teacher is a DiffModel that exposes a per-sample Jacobian endpoint. Reasoning skips synth-gen and trainer.run and runs finalize directly against this URL plus teacher_predict_url. Requires teacher_predict_url.
Response
Successful Response
POST /v1/reasoning/fit -- async reasoning-fit job submission response.
dataset_id echoes the dataset this fit trained against.