> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mka1.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Tracking

> <Badge color="blue" shape="pill">Early access</Badge>

Track experiment parameters and training metrics with MLflow-compatible tools and supported W&B clients.


MKA1 tracking is compatible with MLflow experiment tracking and selected W\&B clients. Use it from any training framework or tool that supports a custom MLflow tracking URI for parameters and metrics.

## Connect to tracking

Use `https://tracking.mka1.com` with an [API key](/docs/authentication) that has `read:tracking` and `write:tracking` scopes.

For MLflow-compatible tools, configure:

```bash MLflow configuration theme={null}
export MLFLOW_TRACKING_URI="https://tracking.mka1.com"
export MLFLOW_TRACKING_TOKEN="<mka1-api-key>"
```

Your existing MLflow integration can then send experiment parameters and metrics to MKA1. Experiments and runs are scoped to your API key's organization and team.

## W\&B compatibility

**Supported versions for metrics logging and run resume:** `wandb>=0.22.0,<0.23.1`.

```bash W&B configuration theme={null}
export WANDB_BASE_URL="https://tracking.mka1.com"
export WANDB_API_KEY="<mka1-api-key>"
```

## Example: log a training run

If your training framework already logs through MLflow, use its existing integration. To log directly from your own code, the equivalent implementation looks like this:

```python MLflow client theme={null}
from mlflow import MlflowClient

client = MlflowClient(tracking_uri="https://tracking.mka1.com")
experiment_name = "training-example"
experiment = client.get_experiment_by_name(experiment_name)
experiment_id = (
    experiment.experiment_id
    if experiment is not None
    else client.create_experiment(experiment_name)
)

run = client.create_run(experiment_id, run_name="loss-example")
run_id = run.info.run_id

client.log_param(run_id, "learning_rate", "0.001")
for step, loss in enumerate([0.8, 0.5, 0.3]):
    client.log_metric(run_id, "train/loss", loss, step=step)

client.set_terminated(run_id)

for metric in client.get_metric_history(run_id, "train/loss"):
    print(metric.step, metric.value)
```

## Artifacts

Artifact upload, download, and listing are not supported yet. W\&B versioned Artifacts are also unsupported. Store checkpoints, datasets, and model files in [Repositories](/docs/repositories).
