MLflow tracking

MLflow tracking

Point any MLflow client at Kaimei: experiments, runs, metrics, params, tags, inputs, logged models and artifacts, over MLflow's own REST API.

Kaimei answers MLflow's tracking API, so code that logs to MLflow, mlflow.autolog() included, records Kaimei runs with no change but two environment variables (below).

The routes take and return MLflow's JSON (see MLflow's REST API); below, each says what Kaimei does with it. Tested with the MLflow 2 and MLflow 3 clients. API keys need the runs scope; a POST …/search is a read, and viewers and reviewers read only. Errors are MLflow's: {"error_code", "message"}.

  • An experiment is a project. Experiment "0" (Default) is the project default, made when first used, and also shows runs that have no project. Other experiment ids are project ids; a name is looked up as a project's name, then its slug. Experiment names are at most 120 characters.
  • An MLflow run is a Kaimei run (source: "mlflow"), one id for both APIs, so the dashboard, health checks, alerts and the training record work on it. RUNNING, FINISHED, FAILED and KILLED are running, finished, failed and stopped. An MLflow client sends no heartbeats, so its runs are never marked crashed.
  • Metrics are series, stored as a batch is, so the plan's points, points a second, storage and 10,000 series a run apply, and values are 32-bit floats. Params go into the config as text, and logging one again with another value is INVALID_PARAMETER_VALUE. Tags are kept as sent; mlflow.runName, mlflow.note.content and mlflow.parentRunId are the run's name, notes and parent, and your own tags also show among its tags as key:value.
  • Inputs and models. log-inputs adds the datasets to the run's declared datasets (the training record lists them); log-model and MLflow 3's logged models record checkpoint events.
  • Artifacts are run files of kind artifact, at most 16 MB each, uploaded and downloaded through the artifacts proxy; no multipart or presigned transfers.
  • Sizes. Keys hold at most 250 characters, a param's value 6,000, a run tag's 8,000 and an experiment tag's 20,000. A run's tags take 1 MB together, as do an experiment's tags, a logged model's tags and its params; a run's inputs take 4 MB and its outputs name at most 10,000 logged models; log-batch takes 1,000 metrics, 100 params and 100 tags. All of it counts in the training storage, past which writes are QUOTA_EXCEEDED. Searches' LIKE and ILIKE patterns hold at most 500 characters and 64 wildcards (% and _ together); longer ones are INVALID_PARAMETER_VALUE.
  • Deleting is MLflow's soft delete: hidden from MLflow's searches and restorable; the run stays in Kaimei until deleted there.
  • Not served: the model registry, traces, prompts and other MLflow routes answer 404 ENDPOINT_NOT_FOUND.

#Point MLflow at Kaimei

Set the tracking URI to Kaimei's /mlflow and the token to a Kaimei API key. MLflow sends the token as a bearer token; a key given as basic auth's password works too. Nothing else changes: mlflow.start_run, log_metric, log_artifact and mlflow.autolog() record Kaimei runs, which the dashboard draws and the health checks read as they arrive.

Runs logged to another MLflow server or an mlruns folder come over with kaimei import mlflow; see moving to Kaimei.

shell
export MLFLOW_TRACKING_URI=https://api.kaimei.ai/mlflow
export MLFLOW_TRACKING_TOKEN=$KAIMEI_API_KEY
python train.py

#Create an experiment

POST/mlflow/api/2.0/mlflow/experiments/createAPI key or session

Makes a project with the experiment's name, within the plan's projects. A name in use is RESOURCE_ALREADY_EXISTS.

curl -X POST https://api.kaimei.ai/mlflow/api/2.0/mlflow/experiments/create \
  -H "Authorization: Bearer $KAIMEI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name": "fraud-models"}'
200 OKResponse
{
  "experiment_id": "prj_a82aa8dfcbeb66871420"
}

#Get an experiment

GET/mlflow/api/2.0/mlflow/experiments/getAPI key or session

By experiment_id.

curl "https://api.kaimei.ai/mlflow/api/2.0/mlflow/experiments/get?experiment_id=prj_a82aa8dfcbeb66871420" \
  -H "Authorization: Bearer $KAIMEI_API_KEY"
200 OKResponse
{
  "experiment": {
    "experiment_id": "prj_a82aa8dfcbeb66871420",
    "name": "fraud-models",
    "artifact_location": "mlflow-artifacts:/prj_a82aa8dfcbeb66871420",
    "lifecycle_stage": "active",
    "last_update_time": 1796472061080,
    "creation_time": 1796472061078,
    "tags": []
  }
}

#Get an experiment by name

GET/mlflow/api/2.0/mlflow/experiments/get-by-nameAPI key or session

By experiment_name: a project's name, then its slug.

curl "https://api.kaimei.ai/mlflow/api/2.0/mlflow/experiments/get-by-name?experiment_name=nope" \
  -H "Authorization: Bearer $KAIMEI_API_KEY"
404 Not FoundResponse
{
  "error_code": "RESOURCE_DOES_NOT_EXIST",
  "message": "Could not find experiment with name 'nope'"
}

#Search experiments (GET)

GET/mlflow/api/2.0/mlflow/experiments/searchAPI key or session

The same search with the parameters in the query string, as older clients send it.

curl "https://api.kaimei.ai/mlflow/api/2.0/mlflow/experiments/search?max_results=100" \
  -H "Authorization: Bearer $KAIMEI_API_KEY"

#Rename an experiment

POST/mlflow/api/2.0/mlflow/experiments/updateAPI key or session

Renames the project.

curl -X POST https://api.kaimei.ai/mlflow/api/2.0/mlflow/experiments/update \
  -H "Authorization: Bearer $KAIMEI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"experiment_id": "prj_a82aa8dfcbeb66871420", "new_name": "fraud-models-2027"}'
200 OKResponse
{}

#Delete an experiment

POST/mlflow/api/2.0/mlflow/experiments/deleteAPI key or session

Marks it deleted for MLflow: hidden from searches, restorable, and the project stays. Experiment "0" can't be deleted.

curl -X POST https://api.kaimei.ai/mlflow/api/2.0/mlflow/experiments/delete \
  -H "Authorization: Bearer $KAIMEI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"experiment_id": "prj_a82aa8dfcbeb66871420"}'
200 OKResponse
{}

#Restore an experiment

POST/mlflow/api/2.0/mlflow/experiments/restoreAPI key or session

Undoes a delete.

curl -X POST https://api.kaimei.ai/mlflow/api/2.0/mlflow/experiments/restore \
  -H "Authorization: Bearer $KAIMEI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"experiment_id": "prj_a82aa8dfcbeb66871420"}'
200 OKResponse
{}

#Tag an experiment

POST/mlflow/api/2.0/mlflow/experiments/set-experiment-tagAPI key or session

Kept beside the project; mlflow.note.content is its description.

curl -X POST https://api.kaimei.ai/mlflow/api/2.0/mlflow/experiments/set-experiment-tag \
  -H "Authorization: Bearer $KAIMEI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"experiment_id": "prj_a82aa8dfcbeb66871420", "key": "team", "value": "fraud"}'
200 OKResponse
{}

#Untag an experiment

POST/mlflow/api/2.0/mlflow/experiments/delete-experiment-tagAPI key or session

Removes the tag.

curl -X POST https://api.kaimei.ai/mlflow/api/2.0/mlflow/experiments/delete-experiment-tag \
  -H "Authorization: Bearer $KAIMEI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"experiment_id": "prj_a82aa8dfcbeb66871420", "key": "team"}'
200 OKResponse
{}

#Create a run

POST/mlflow/api/2.0/mlflow/runs/createAPI key or session

Starts a Kaimei run in the experiment's project, counted like any run start. A nested run (mlflow.parentRunId) is not one more live run.

curl -X POST https://api.kaimei.ai/mlflow/api/2.0/mlflow/runs/create \
  -H "Authorization: Bearer $KAIMEI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"experiment_id": "prj_a82aa8dfcbeb66871420", "run_name": "xgb-depth-6", "start_time": 1796472000000,
       "tags": [{"key": "mlflow.source.name", "value": "train.py"}]}'
200 OKResponse
{
  "run": {
    "info": {
      "run_id": "run_799a8be2d318cb056edb",
      "run_uuid": "run_799a8be2d318cb056edb",
      "run_name": "xgb-depth-6",
      "experiment_id": "prj_a82aa8dfcbeb66871420",
      "user_id": "ada",
      "status": "RUNNING",
      "start_time": 1796472000000,
      "artifact_uri": "mlflow-artifacts:/prj_a82aa8dfcbeb66871420/run_799a8be2d318cb056edb/artifacts",
      "lifecycle_stage": "active"
    },
    "data": {
      "metrics": [],
      "params": [],
      "tags": [
        {"key": "mlflow.runName", "value": "xgb-depth-6"},
        {"key": "mlflow.source.name", "value": "train.py"}
      ]
    },
    "inputs": {
      "dataset_inputs": [],
      "model_inputs": []
    },
    "outputs": {
      "model_outputs": []
    }
  }
}

#Get a run

GET/mlflow/api/2.0/mlflow/runs/getAPI key or session

With its latest metrics, params, tags, inputs and outputs.

curl "https://api.kaimei.ai/mlflow/api/2.0/mlflow/runs/get?run_id=run_799a8be2d318cb056edb" \
  -H "Authorization: Bearer $KAIMEI_API_KEY"
200 OKResponse
{
  "run": {
    "info": {
      "run_id": "run_799a8be2d318cb056edb",
      "run_uuid": "run_799a8be2d318cb056edb",
      "run_name": "xgb-depth-6",
      "experiment_id": "prj_a82aa8dfcbeb66871420",
      "user_id": "ada",
      "status": "RUNNING",
      "start_time": 1796472000000,
      "artifact_uri": "mlflow-artifacts:/prj_a82aa8dfcbeb66871420/run_799a8be2d318cb056edb/artifacts",
      "lifecycle_stage": "active"
    },
    "data": {
      "metrics": [
        {
          "key": "val_auc",
          "value": 0.91,
          "timestamp": 1796472060000,
          "step": 10,
          "run_id": "run_799a8be2d318cb056edb"
        }
      ],
      "params": [
        {"key": "max_depth", "value": "6"}
      ],
      "tags": [
        {"key": "mlflow.runName", "value": "xgb-depth-6"},
        {"key": "mlflow.source.name", "value": "train.py"},
        {"key": "team", "value": "fraud"}
      ]
    },
    "inputs": {
      "dataset_inputs": [],
      "model_inputs": []
    },
    "outputs": {
      "model_outputs": []
    }
  }
}

#Update a run

POST/mlflow/api/2.0/mlflow/runs/updateAPI key or session
status, end_time and run_name. A status other than RUNNING finishes the Kaimei run.
curl -X POST https://api.kaimei.ai/mlflow/api/2.0/mlflow/runs/update \
  -H "Authorization: Bearer $KAIMEI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"run_id": "run_799a8be2d318cb056edb", "status": "FINISHED", "end_time": 1796472900000}'
200 OKResponse
{
  "run_info": {
    "run_id": "run_799a8be2d318cb056edb",
    "run_uuid": "run_799a8be2d318cb056edb",
    "run_name": "xgb-depth-6",
    "experiment_id": "prj_a82aa8dfcbeb66871420",
    "user_id": "ada",
    "status": "FINISHED",
    "start_time": 1796472000000,
    "artifact_uri": "mlflow-artifacts:/prj_a82aa8dfcbeb66871420/run_799a8be2d318cb056edb/artifacts",
    "lifecycle_stage": "active",
    "end_time": 1796472900000
  }
}

#Delete a run

POST/mlflow/api/2.0/mlflow/runs/deleteAPI key or session

Hidden from MLflow's searches and restorable; the run stays in Kaimei until deleted there.

curl -X POST https://api.kaimei.ai/mlflow/api/2.0/mlflow/runs/delete \
  -H "Authorization: Bearer $KAIMEI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"run_id": "run_799a8be2d318cb056edb"}'
200 OKResponse
{}

#Restore a run

POST/mlflow/api/2.0/mlflow/runs/restoreAPI key or session

Undoes a delete.

curl -X POST https://api.kaimei.ai/mlflow/api/2.0/mlflow/runs/restore \
  -H "Authorization: Bearer $KAIMEI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"run_id": "run_799a8be2d318cb056edb"}'
200 OKResponse
{}

#Log a metric

POST/mlflow/api/2.0/mlflow/runs/log-metricAPI key or session

One point of a series, with its step and timestamp.

curl -X POST https://api.kaimei.ai/mlflow/api/2.0/mlflow/runs/log-metric \
  -H "Authorization: Bearer $KAIMEI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"run_id": "run_799a8be2d318cb056edb", "key": "val_auc", "value": 0.91, "timestamp": 1796472060000, "step": 10}'
200 OKResponse
{}

#Log a param

POST/mlflow/api/2.0/mlflow/runs/log-parameterAPI key or session

Into the run's config, as text.

curl -X POST https://api.kaimei.ai/mlflow/api/2.0/mlflow/runs/log-parameter \
  -H "Authorization: Bearer $KAIMEI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"run_id": "run_799a8be2d318cb056edb", "key": "max_depth", "value": "6"}'
200 OKResponse
{}

#Set a tag

POST/mlflow/api/2.0/mlflow/runs/set-tagAPI key or session

Kept as sent.

curl -X POST https://api.kaimei.ai/mlflow/api/2.0/mlflow/runs/set-tag \
  -H "Authorization: Bearer $KAIMEI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"run_id": "run_799a8be2d318cb056edb", "key": "team", "value": "fraud"}'
200 OKResponse
{}

#Delete a tag

POST/mlflow/api/2.0/mlflow/runs/delete-tagAPI key or session

Removes it.

curl -X POST https://api.kaimei.ai/mlflow/api/2.0/mlflow/runs/delete-tag \
  -H "Authorization: Bearer $KAIMEI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"run_id": "run_799a8be2d318cb056edb", "key": "team"}'
200 OKResponse
{}

#Log a batch

POST/mlflow/api/2.0/mlflow/runs/log-batchAPI key or session

Up to 1,000 metrics, 100 params and 100 tags at once.

curl -X POST https://api.kaimei.ai/mlflow/api/2.0/mlflow/runs/log-batch \
  -H "Authorization: Bearer $KAIMEI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"run_id": "run_799a8be2d318cb056edb", "params": [{"key": "max_depth", "value": "6"}],
       "metrics": [{"key": "val_auc", "value": 0.91, "timestamp": 1796472060000, "step": 10}]}'
200 OKResponse
{}

#Log a model

POST/mlflow/api/2.0/mlflow/runs/log-modelAPI key or session

MLflow 2's log_model: kept in the mlflow.log-model.history tag, with a checkpoint event.

curl -X POST https://api.kaimei.ai/mlflow/api/2.0/mlflow/runs/log-model \
  -H "Authorization: Bearer $KAIMEI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"run_id": "run_799a8be2d318cb056edb", "model_json": "{…}"}'
200 OKResponse
{}

#Log inputs

POST/mlflow/api/2.0/mlflow/runs/log-inputsAPI key or session

Datasets (and MLflow 3's models) the run used. Each dataset joins the run's declared datasets as {name, fingerprint: digest, context, source_type}.

curl -X POST https://api.kaimei.ai/mlflow/api/2.0/mlflow/runs/log-inputs \
  -H "Authorization: Bearer $KAIMEI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"run_id": "run_799a8be2d318cb056edb", "datasets": [{"dataset": {"name": "train", "digest": "9c1e0b", "source_type": "local"}, "tags": [{"key": "mlflow.data.context", "value": "training"}]}]}'
200 OKResponse
{}

#Log outputs

POST/mlflow/api/2.0/mlflow/runs/outputsAPI key or session

MLflow 3's logged models a run produced, each recorded as a checkpoint event.

curl -X POST https://api.kaimei.ai/mlflow/api/2.0/mlflow/runs/outputs \
  -H "Authorization: Bearer $KAIMEI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"run_id": "run_799a8be2d318cb056edb", "models": [{"model_id": "m-cca3fc61efd08a5fe509f27aead561eb", "step": 10}]}'
200 OKResponse
{}

#Get a metric's history

GET/mlflow/api/2.0/mlflow/metrics/get-historyAPI key or session

Every point of one metric, by step: max_results up to 100,000 (default 25,000) and page_token.

curl "https://api.kaimei.ai/mlflow/api/2.0/mlflow/metrics/get-history?run_id=run_799a8be2d318cb056edb&metric_key=val_auc" \
  -H "Authorization: Bearer $KAIMEI_API_KEY"
200 OKResponse
{
  "metrics": [
    {
      "key": "val_auc",
      "value": 0.91,
      "timestamp": 1796472060000,
      "step": 10,
      "run_id": "run_799a8be2d318cb056edb"
    }
  ]
}

#List a run's artifacts

GET/mlflow/api/2.0/mlflow/artifacts/listAPI key or session

The files and folders at path in the run's artifacts.

curl "https://api.kaimei.ai/mlflow/api/2.0/mlflow/artifacts/list?run_id=run_799a8be2d318cb056edb" \
  -H "Authorization: Bearer $KAIMEI_API_KEY"
200 OKResponse
{
  "files": [
    {"path": "model", "is_dir": true}
  ]
}

#Create a logged model

POST/mlflow/api/2.0/mlflow/logged-modelsAPI key or session

MLflow 3's model of a run. Its artifacts are kept with the run that logged it.

curl -X POST https://api.kaimei.ai/mlflow/api/2.0/mlflow/logged-models \
  -H "Authorization: Bearer $KAIMEI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"experiment_id": "prj_a82aa8dfcbeb66871420", "name": "model", "source_run_id": "run_799a8be2d318cb056edb"}'
200 OKResponse
{
  "model": {
    "info": {
      "model_id": "m-cca3fc61efd08a5fe509f27aead561eb",
      "experiment_id": "prj_a82aa8dfcbeb66871420",
      "name": "model",
      "creation_timestamp_ms": 1796472061188,
      "last_updated_timestamp_ms": 1796472061188,
      "artifact_uri": "mlflow-artifacts:/prj_a82aa8dfcbeb66871420/models/m-cca3fc61efd08a5fe509f27aead561eb/artifacts",
      "status": "LOGGED_MODEL_PENDING",
      "tags": [],
      "source_run_id": "run_799a8be2d318cb056edb"
    },
    "data": {
      "params": [],
      "metrics": []
    }
  }
}

#Get a logged model

GET/mlflow/api/2.0/mlflow/logged-models/{model_id}API key or session

One logged model.

curl https://api.kaimei.ai/mlflow/api/2.0/mlflow/logged-models/m-cca3fc61efd08a5fe509f27aead561eb \
  -H "Authorization: Bearer $KAIMEI_API_KEY"
200 OKResponse
{
  "model": {
    "info": {
      "model_id": "m-cca3fc61efd08a5fe509f27aead561eb",
      "experiment_id": "prj_a82aa8dfcbeb66871420",
      "name": "model",
      "creation_timestamp_ms": 1796472061188,
      "last_updated_timestamp_ms": 1796472061188,
      "artifact_uri": "mlflow-artifacts:/prj_a82aa8dfcbeb66871420/models/m-cca3fc61efd08a5fe509f27aead561eb/artifacts",
      "status": "LOGGED_MODEL_PENDING",
      "tags": [],
      "source_run_id": "run_799a8be2d318cb056edb"
    },
    "data": {
      "params": [],
      "metrics": []
    }
  }
}

#Finalize a logged model

PATCH/mlflow/api/2.0/mlflow/logged-models/{model_id}API key or session

Sets its status, such as LOGGED_MODEL_READY.

curl -X PATCH https://api.kaimei.ai/mlflow/api/2.0/mlflow/logged-models/m-cca3fc61efd08a5fe509f27aead561eb \
  -H "Authorization: Bearer $KAIMEI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"status": "LOGGED_MODEL_READY"}'

#Delete a logged model

DELETE/mlflow/api/2.0/mlflow/logged-models/{model_id}API key or session

Marks it deleted.

curl -X DELETE https://api.kaimei.ai/mlflow/api/2.0/mlflow/logged-models/m-cca3fc61efd08a5fe509f27aead561eb \
  -H "Authorization: Bearer $KAIMEI_API_KEY"
200 OKResponse
{}

#Tag a logged model

PATCH/mlflow/api/2.0/mlflow/logged-models/{model_id}/tagsAPI key or session

Sets tags.

curl -X PATCH https://api.kaimei.ai/mlflow/api/2.0/mlflow/logged-models/m-cca3fc61efd08a5fe509f27aead561eb/tags \
  -H "Authorization: Bearer $KAIMEI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"tags": [{"key": "stage", "value": "candidate"}]}'
200 OKResponse
{}

#Untag a logged model

DELETE/mlflow/api/2.0/mlflow/logged-models/{model_id}/tags/{tag_key}API key or session

Removes one tag.

curl -X DELETE https://api.kaimei.ai/mlflow/api/2.0/mlflow/logged-models/m-cca3fc61efd08a5fe509f27aead561eb/tags/stage \
  -H "Authorization: Bearer $KAIMEI_API_KEY"
200 OKResponse
{}

#Log a logged model's params

POST/mlflow/api/2.0/mlflow/logged-models/{model_id}/paramsAPI key or session

Kept with the model.

curl -X POST https://api.kaimei.ai/mlflow/api/2.0/mlflow/logged-models/m-cca3fc61efd08a5fe509f27aead561eb/params \
  -H "Authorization: Bearer $KAIMEI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"params": [{"key": "max_depth", "value": "6"}]}'
200 OKResponse
{}

#List a logged model's artifacts

GET/mlflow/api/2.0/mlflow/logged-models/{model_id}/artifacts/directoriesAPI key or session

The files at artifact_directory_path in the model's artifacts.

curl https://api.kaimei.ai/mlflow/api/2.0/mlflow/logged-models/m-cca3fc61efd08a5fe509f27aead561eb/artifacts/directories \
  -H "Authorization: Bearer $KAIMEI_API_KEY"

#List artifacts

GET/mlflow/api/2.0/mlflow-artifacts/artifactsAPI key or session

The files and folders under path (<experiment id>/<run id>/artifacts/…).

curl "https://api.kaimei.ai/mlflow/api/2.0/mlflow-artifacts/artifacts?path=prj_a82aa8dfcbeb66871420/run_799a8be2d318cb056edb/artifacts" \
  -H "Authorization: Bearer $KAIMEI_API_KEY"
200 OKResponse
{
  "files": [
    {"path": "model", "is_dir": true}
  ]
}

#Download an artifact

GET/mlflow/api/2.0/mlflow-artifacts/artifacts/{path}API key or session

The file's bytes.

curl https://api.kaimei.ai/mlflow/api/2.0/mlflow-artifacts/artifacts/prj_a82aa8dfcbeb66871420/run_799a8be2d318cb056edb/artifacts/model/MLmodel \
  -H "Authorization: Bearer $KAIMEI_API_KEY"

#Upload an artifact

PUT/mlflow/api/2.0/mlflow-artifacts/artifacts/{path}API key or session

The request body is the file, at most 16 MB. A path written again replaces the file.

curl -X PUT https://api.kaimei.ai/mlflow/api/2.0/mlflow-artifacts/artifacts/prj_a82aa8dfcbeb66871420/run_799a8be2d318cb056edb/artifacts/model/MLmodel \
  -H "Authorization: Bearer $KAIMEI_API_KEY"
200 OKResponse
{}

#Delete an artifact

DELETE/mlflow/api/2.0/mlflow-artifacts/artifacts/{path}API key or session

Deletes the file.

curl -X DELETE https://api.kaimei.ai/mlflow/api/2.0/mlflow-artifacts/artifacts/prj_a82aa8dfcbeb66871420/run_799a8be2d318cb056edb/artifacts/model/MLmodel \
  -H "Authorization: Bearer $KAIMEI_API_KEY"
200 OKResponse
{}

#Server info

GET/mlflow/api/3.0/mlflow/server-infoNo authentication

What the artifact service offers. MLflow 3 asks before it moves files: plain uploads and downloads only.

curl https://api.kaimei.ai/mlflow/api/3.0/mlflow/server-info \
  -H "Authorization: Bearer $KAIMEI_API_KEY"
200 OKResponse
{
  "artifact_serving_enabled": true,
  "multipart_uploads_enabled": false,
  "multipart_downloads_enabled": false,
  "artifacts_presigned_only": false,
  "workspaces_enabled": false
}

#Any other MLflow route

POST/mlflow/api/2.0/{path}No authentication

Routes Kaimei does not serve (the model registry, traces, prompts) answer 404 ENDPOINT_NOT_FOUND with every method, so a client says what is missing instead of failing oddly.

MethodPathAnswers as
GET/mlflow/api/2.0/{path}Any other MLflow route
PUT/mlflow/api/2.0/{path}Any other MLflow route
PATCH/mlflow/api/2.0/{path}Any other MLflow route
DELETE/mlflow/api/2.0/{path}Any other MLflow route
curl -X POST https://api.kaimei.ai/mlflow/api/2.0/mlflow/registered-models/create \
  -H "Authorization: Bearer $KAIMEI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name": "fraud-model"}'
404 Not FoundResponse
{
  "error_code": "ENDPOINT_NOT_FOUND",
  "message": "This server does not serve 'mlflow/registered-models/create'. Kaimei answers MLflow's tracking API: experiments, runs, metrics, params, tags, inputs, logged models and artifacts."
}

#The ajax-api mirror

MLflow's web UI and some clients call the same routes under /mlflow/ajax-api/2.0. Kaimei serves each one there too, answering as the route it mirrors.

MethodPathAnswers as
POST/mlflow/ajax-api/2.0/mlflow/experiments/createCreate an experiment
GET/mlflow/ajax-api/2.0/mlflow/experiments/getGet an experiment
GET/mlflow/ajax-api/2.0/mlflow/experiments/get-by-nameGet an experiment by name
POST/mlflow/ajax-api/2.0/mlflow/experiments/searchSearch experiments
GET/mlflow/ajax-api/2.0/mlflow/experiments/searchSearch experiments (GET)
POST/mlflow/ajax-api/2.0/mlflow/experiments/updateRename an experiment
POST/mlflow/ajax-api/2.0/mlflow/experiments/deleteDelete an experiment
POST/mlflow/ajax-api/2.0/mlflow/experiments/restoreRestore an experiment
POST/mlflow/ajax-api/2.0/mlflow/experiments/set-experiment-tagTag an experiment
POST/mlflow/ajax-api/2.0/mlflow/experiments/delete-experiment-tagUntag an experiment
POST/mlflow/ajax-api/2.0/mlflow/runs/createCreate a run
GET/mlflow/ajax-api/2.0/mlflow/runs/getGet a run
POST/mlflow/ajax-api/2.0/mlflow/runs/updateUpdate a run
POST/mlflow/ajax-api/2.0/mlflow/runs/deleteDelete a run
POST/mlflow/ajax-api/2.0/mlflow/runs/restoreRestore a run
POST/mlflow/ajax-api/2.0/mlflow/runs/searchSearch runs
POST/mlflow/ajax-api/2.0/mlflow/runs/log-metricLog a metric
POST/mlflow/ajax-api/2.0/mlflow/runs/log-parameterLog a param
POST/mlflow/ajax-api/2.0/mlflow/runs/set-tagSet a tag
POST/mlflow/ajax-api/2.0/mlflow/runs/delete-tagDelete a tag
POST/mlflow/ajax-api/2.0/mlflow/runs/log-batchLog a batch
POST/mlflow/ajax-api/2.0/mlflow/runs/log-modelLog a model
POST/mlflow/ajax-api/2.0/mlflow/runs/log-inputsLog inputs
POST/mlflow/ajax-api/2.0/mlflow/runs/outputsLog outputs
GET/mlflow/ajax-api/2.0/mlflow/metrics/get-historyGet a metric's history
GET/mlflow/ajax-api/2.0/mlflow/artifacts/listList a run's artifacts
POST/mlflow/ajax-api/2.0/mlflow/logged-modelsCreate a logged model
POST/mlflow/ajax-api/2.0/mlflow/logged-models/searchSearch logged models
GET/mlflow/ajax-api/2.0/mlflow/logged-models/{model_id}Get a logged model
PATCH/mlflow/ajax-api/2.0/mlflow/logged-models/{model_id}Finalize a logged model
DELETE/mlflow/ajax-api/2.0/mlflow/logged-models/{model_id}Delete a logged model
PATCH/mlflow/ajax-api/2.0/mlflow/logged-models/{model_id}/tagsTag a logged model
DELETE/mlflow/ajax-api/2.0/mlflow/logged-models/{model_id}/tags/{tag_key}Untag a logged model
POST/mlflow/ajax-api/2.0/mlflow/logged-models/{model_id}/paramsLog a logged model's params
GET/mlflow/ajax-api/2.0/mlflow/logged-models/{model_id}/artifacts/directoriesList a logged model's artifacts
GET/mlflow/ajax-api/2.0/mlflow-artifacts/artifactsList artifacts
GET/mlflow/ajax-api/2.0/mlflow-artifacts/artifacts/{path}Download an artifact
PUT/mlflow/ajax-api/2.0/mlflow-artifacts/artifacts/{path}Upload an artifact
DELETE/mlflow/ajax-api/2.0/mlflow-artifacts/artifacts/{path}Delete an artifact
GET/mlflow/ajax-api/2.0/{path}Any other MLflow route
POST/mlflow/ajax-api/2.0/{path}Any other MLflow route
PUT/mlflow/ajax-api/2.0/{path}Any other MLflow route
PATCH/mlflow/ajax-api/2.0/{path}Any other MLflow route
DELETE/mlflow/ajax-api/2.0/{path}Any other MLflow route