Missions are Phase 2 of the MLflow Jedi activity. Where the chambers taught individual MLflow concepts in isolation, missions ask students to combine all six concepts into a single coherent tracking block — what the activity calls the 5–4–2–1 pattern. The three missions (Tatooine, Coruscant, and Mustafar) escalate in difficulty: the first provides a guided scaffold, the second introduces deliberate bugs to diagnose and fix, and the third requires writing the complete tracking from scratch. Each completed mission awards +30 points, and finishing all three unlocks a +15 bonus before the team moves to Phase 3.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/elenacarino-max/Pildora4_ext_StarWars/llms.txt
Use this file to discover all available pages before exploring further.
The 5–4–2–1 pattern
Every mission expects a singlemlflow.start_run block that registers exactly five parameters, four metrics, two artifacts, and one model. The numbers map directly to the data produced by a Random Forest experiment on the scikit-learn Digits dataset:
- 5 parameters — decisions known before training:
dataset,n_estimators,max_depth,test_size,random_state - 4 metrics — results calculated after evaluation:
accuracy,precision_weighted,recall_weighted,f1_weighted - 2 artifacts — diagnostic files generated after evaluation:
matriz_confusion.png,classification_report.json - 1 model — the trained scikit-learn object, registered via
mlflow.sklearn.log_modelwithartifact_path="modelo_digits"
Mission 1: Tatooine (Guided)
Mode: Misión guiada —n_estimators=50, max_depth=8
In Tatooine, the complete structure is already scaffolded. Students only need to fill in the five numbered placeholders inside a with mlflow.start_run block. The theory note explains that the app validates structure and then uses a secure internal template to actually run the experiment — student code is never executed.
Brief: Completa una estructura preparada y recupera el primer expediente.
Starter code:
| Metric | Value |
|---|---|
| accuracy | 0.9556 |
| precision_weighted | 0.9562 |
| recall_weighted | 0.9556 |
| f1_weighted | 0.9554 |
| recall_1 | 0.9167 |
| recall_8 | 0.8571 |
Mission 2: Coruscant (Sabotaged)
Mode: Misión saboteada —n_estimators=100, max_depth=10
Coruscant deliberately swaps parameters and metrics into the wrong MLflow calls, and leaves two tracking steps missing entirely. Students must identify and correct the categorization errors, then add the missing artifact and model calls.
Brief: Corrige el intercambio entre parámetros, métricas y artefactos.
Starter code (with bugs highlighted in comments):
| Metric | Value |
|---|---|
| accuracy | 0.9611 |
| precision_weighted | 0.9620 |
| recall_weighted | 0.9611 |
| f1_weighted | 0.9609 |
| recall_1 | 0.9722 |
| recall_8 | 0.8571 |
Mission 3: Mustafar (Autonomous)
Mode: Misión autónoma —n_estimators=300, max_depth=None
Mustafar provides only a single context comment and a bare pass. Students must write the entire tracking block from memory, applying everything learned in the chambers and the previous two missions. max_depth=None is a valid Python value meaning no depth limit — students must register it correctly as a parameter.
Brief: Escribe el tracking 5–4–2–1 con la mínima ayuda del Archivo.
Starter code:
| Metric | Value |
|---|---|
| accuracy | 0.9694 |
| precision_weighted | 0.9701 |
| recall_weighted | 0.9694 |
| f1_weighted | 0.9692 |
| recall_1 | 1.0000 |
| recall_8 | 0.8571 |
Validation rules
Before the app triggers the internal training template, the submitted code is checked by thevalidate_mission_submission function using AST analysis. The following rules must all pass:
mlflow.start_runmust be present.mlflow.log_paramsmust be present and must receive the variableparametrosas its first positional argument.mlflow.log_metricsmust be present and must receive the variablemetricasas its first positional argument.mlflow.log_artifactmust appear at least twice.- The two artifact calls must use exactly the literals
"matriz_confusion.png"and"classification_report.json". mlflow.sklearn.log_modelmust be present with keyword argumentssk_modelandartifact_path.- The
run_namepassed tomlflow.start_runmust match the mission exactly:"Mision_Tatooine","Mision_Coruscant", or"Mision_Mustafar".
After a successful validation, the app trains a scikit-learn Random Forest internally using a fixed template — the student’s submitted code is never executed. The resulting metrics, confusion matrix, and classification report are stored and made available in the Phase 3 comparator.