Fit Patterns
Submit a pattern-tracker fit through the scheduler as a 1-node graph.
Same lifecycle shape as trainer/reasoning submissions: resolve the
dataset routing + connector bundle on the api side, build the
worker config, ship a :class:RequestToComputeGraph carrying it,
and await the minted job_id on the reply future. The scheduler
INSERTs the jobs row + the one computation_node row in one
transaction; the runner blocks on the Modal call; the terminal
flips the job to completed. The worker no longer writes to
jobs via Supabase REST.
Path Parameters
Body
POST /v1/models/{model_id}/patterns/fit — submit a pattern-tracker fit job.
Carries the fit hyperparameters plus a dataset_id reference.
Register the dataset first via POST /v1/datasets (the SDK
Dataset(...) constructor does this automatically).
(lo, hi) bounds defining the 'rejected' band of predictions. Either side may be null for an open bound; at least one must be set.
Identifier of a dataset previously created via POST /v1/datasets.
cover, discovery Maximum number of target-band rows used to derive patterns. Bounds the per-row rule-extraction step so large datasets stay tractable; null uses every target-band row. Metrics (precision, support, lift, coverage) are always computed over the full dataset.
Seed for the rule-extraction subsample, for reproducible patterns. Only used when the target-band cohort exceeds rule_sample_size.
Optional label column name to drop from the dataset before fitting.
Response
Successful Response
Returned immediately by POST /patterns/fit; the actual artifact is retrieved via GET /patterns/{tracker_id} once the job completes.
job_id is the canonical handle — poll GET /v1/results/{job_id}
for terminal status. model_id + tracker_id are echoed back so
the SDK can subsequently fetch the typed artifact via
GET /v1/models/{model_id}/patterns/{tracker_id}.