dashai_train_model
Train a model on a dataset and get the enqueued job ID. This tool creates the experiment, run, and job in one call, returning immediately so progress can be polled separately.
Instructions
Trains a model on a dataset and returns the id of the enqueued job.
It does NOT wait for it to finish. Training can take minutes or hours, so dashAI enqueues it and this tool returns immediately; progress is polled with dashai_job_status.
Collapses the three calls the raw API demands:
POST /model-session/ creates the experiment (dataset, task, columns, metrics)
POST /run/ creates the run (model, hyperparameters)
POST /job/ enqueues the ModelJob
Args: params (TrainModel): contains: - dataset_id (int), task_name (str), model_name (str) - input_columns / output_columns (List[str]) - metrics (List[str]), goal_metric (str) - parameters (Dict): model hyperparameters - splits (Dict[str, float]): proportions adding up to 1.0 - optimizer_name (str), optimizer_parameters (Dict) - run_name (Optional[str])
Returns: str: JSON {"job_id": str, "run_id": int, "model_session_id": int, "status": "enqueued", "next_step": str} On failure: "Error: ..." stating which parameter dashAI rejected.
Examples: - "Train a random forest on dataset 3 predicting 'species'" - Do not use it to read results: that is dashai_get_run, with the run_id.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| params | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |