Where experiments come from

An experiment records one training attempt. Two things create them: a workflow run (an experiment is created unless the run names an existing one), and the training route POST /models/<project_id>/train.

The training route needs you to be signed in and to own the project. Body fields: name, description, model_type, config, script_path (default scripts/train.py), competition_id and competition_title. It runs the script in a background thread in the project environment and sends the Socket.IO events training_complete and training_progress to the room project_<id>. After a successful run the stored metrics are only {"status": "completed"}. GET /models/<project_id>/list lists the project's models.

Statuses

pending, running, completed, failed and cancelled. A cloned experiment starts as draft. A run still marked running after 2 hours is marked failed when its status is read.

The experiment pages

The web pages are the experiment list, a comparison view, the detail page at /experiments/<id> and a data profile page.

Find experiments

GET /api/v1/experiments needs you to be signed in.

ParameterMeaning
statusFilter by status.
project_idOnly one project.
competition_idOnly one competition.
searchUp to 200 characters. Matches name, description, model_type and tags.
date_from, date_toISO dates. The range may be at most 3650 days.
sort_byid, name, status, model_type, created_at, updated_at or competition_score.
sort_orderasc or desc.
page, per_pageper_page defaults to 20, maximum 100.
{
  "success": true,
  "experiments": [],
  "total": 0,
  "page": 1,
  "per_page": 20,
  "pages": 0
}

Experiment routes

All routes are under /api/v1 and check that you are signed in.

RouteWhat it does
GET /experiments/<id>Read one. Includes up to 20 workflow runs.
GET /experiments/<id>/workflow-runsRuns of this experiment. The limit parameter is 1 to 500, default 20.
GET /experiments/<id>/statusCurrent status.
POST /experiments/<id>/cancelCancel. If a workflow run is linked, the cancel goes to the run. If the experiment is not running the answer is success false.
POST /experiments/cleanup-stuckAdministrators only. Marks runs older than 1 hour as failed.
PUT /experiments/<id>/tagsReplace tags. Body {"tags": [...]}.
POST /experiments/<id>/tagsAdd one tag. Body {"tag": "..."}.
DELETE /experiments/<id>/tags/<tag>Remove a tag. At most 100 tags per experiment, each up to 100 characters.
POST /experiments/<id>/favoriteToggle the favourite mark.
POST /experiments/<id>/set-bestMark as the best experiment. Only completed experiments qualify. Others in the project lose the mark.
POST /experiments/<id>/unset-bestRemove the best mark.
POST /experiments/<id>/cloneCopy an experiment.
PATCH /experiments/<id>Change name (up to 200 characters), description or notes.
DELETE /experiments/<id>Delete.
POST /experiments/bulk-deleteBody {"ids": [...]}, at most 500.
POST /experiments/bulk-exportBody {"ids": [...]}, at most 500.
POST /experiments/compareBody {"ids": [...]}, at least 2. Returns experiments, metric_diffs and hyperparam_diffs.

Downloads

RouteFile
GET /experiments/<id>/download-modelThe model (pkl).
GET /experiments/<id>/download-predictionsPredictions (csv).
GET /experiments/<id>/download-logsLogs (txt).
GET /experiments/<id>/download-codeGenerated code (py).

What an experiment record holds

id, project_id, name, description, model_type, model_config, dataset_path, train_size, metrics, model_path, scoring_script_path, workflow_id, workflow_run_id, pipeline_signature, workflow_snapshot_hash, dependency_snapshot, plugin_snapshot, execution_environment_name and mode, runtime_environment_identifier, artifact_manifest, failure_stage, status, error_message, stdout, stderr, training_logs, generated_code, predictions_file_path, hyperparameters, environment_info, notes, data_profile, parent_experiment_id, tags, is_favorite, is_best, competition fields and timestamps.

Competition scores

POST /api/v1/experiments/<id>/scoring-result takes {score, rank} and an X-API-Key header. It stores the competition score and rank on the experiment. The Community server calls it after scoring a submission.