{"id":53705,"plugin_id":"plugins_6ac012b82680819195f8a26cbe32c246","kind":"skill","collection_source":"plugin_package","comparison_source":null,"observed_at":"2026-10-24T13:54:52.678Z","digest":"f7d868c9b51adc4a47a58768189911d0e8904b1a565594e9e9d97941d6a2f92f","against":null,"payload":{"description":"Set up MLflow experiment tracking in a Domino project by generating an experiment_setup.py helper with deployment-unique experiment names, Domino context tags, and framework auto-logging, plus an example training script. Use when the user asks to add or set up experiment tracking, MLflow logging, or autologging for a traditional ML project in Domino.","included_files":[{"relative_path":"assets/experiment_setup.py","size_in_bytes":4196}],"name":"domino-experiment-setup","skill_md_contents":"---\nname: domino-experiment-setup\ndescription: Set up MLflow experiment tracking in a Domino project by generating an experiment_setup.py helper with deployment-unique experiment names, Domino context tags, and framework auto-logging, plus an example training script. Use when the user asks to add or set up experiment tracking, MLflow logging, or autologging for a traditional ML project in Domino.\ncompatibility: Domino 6.3 and Domino Cloud. Runs in a Domino workspace or job, where MLflow tracking is preconfigured.\n---\n\n# Set Up Domino Experiment Tracking\n\nApplies to Domino 6.3 and Domino Cloud.\n\nAdd MLflow experiment tracking to a traditional ML project. For LLM or agent tracing, use the\n`domino-trace-setup` skill instead.\n\n## Inputs\n\n1. **Experiment base name**: use the one the user gave; otherwise use the project directory name.\n2. **ML frameworks**: detect them from `requirements.txt`, `pyproject.toml`, `environment.yml`,\n   or imports in the code.\n\nDo not stop to ask for either. Make the changes with these defaults, then state the base name\nand frameworks you used in the reply so the user can change them.\n\n## Steps\n\n1. Copy `assets/experiment_setup.py` from this skill's folder into the project. It provides:\n   - `setup_experiment(base_name)`: sets an experiment named `<base>-<project>-<username>`.\n   - `log_domino_context()`: tags the run with the Domino user, project, run ID, and hardware tier.\n   - `setup_autolog()`: enables MLflow autologging for whichever supported frameworks are installed.\n2. Report which frameworks were detected and will be autologged, for example:\n\n   ```\n   Detected frameworks:\n   ✅ scikit-learn (requirements.txt)\n   ✅ xgboost (requirements.txt)\n   ❌ tensorflow (not found)\n   ```\n\n3. If the project trains large models, add the multipart-upload settings below.\n4. Create an example training script, or wire the helpers into the user's existing script.\n\n## Example training script\n\n```python\n# train.py\nfrom experiment_setup import setup_experiment, log_domino_context, setup_autolog\nimport mlflow\nfrom sklearn.ensemble import RandomForestClassifier\nfrom sklearn.model_selection import train_test_split\nfrom sklearn.datasets import load_iris\n\nexperiment_name = setup_experiment(\"iris-classifier\")\nsetup_autolog()\n\niris = load_iris()\nX_train, X_test, y_train, y_test = train_test_split(\n    iris.data, iris.target, test_size=0.2, random_state=42\n)\n\nwith mlflow.start_run(run_name=\"random-forest-v1\"):\n    log_domino_context()\n    mlflow.log_param(\"custom_param\", \"value\")\n\n    model = RandomForestClassifier(n_estimators=100, max_depth=5)\n    model.fit(X_train, y_train)\n\n    test_accuracy = model.score(X_test, y_test)\n    mlflow.log_metric(\"test_accuracy\", test_accuracy)\n    print(f\"Test accuracy: {test_accuracy:.4f}\")\n    print(f\"Run ID: {mlflow.active_run().info.run_id}\")\n```\n\n## Important rules\n\n- **Experiment names must be unique across the entire Domino deployment**, not just the project.\n  Always keep the username and project suffix that `setup_experiment` adds.\n- For large artifacts (LLMs, deep learning checkpoints), enable multipart upload:\n\n  ```python\n  os.environ['MLFLOW_ENABLE_PROXY_MULTIPART_UPLOAD'] = \"true\"\n  os.environ['MLFLOW_MULTIPART_UPLOAD_CHUNK_SIZE'] = \"104857600\"  # 100MB\n  ```\n\nFor run comparison, the model registry, and deeper MLflow usage, use the\n`domino-experiment-tracking` skill.\n"},"changes":[],"summary":"First saved snapshot. No earlier version is available for comparison.","summary_kind":"deterministic","summary_metadata":{}}