Skip to main content

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.

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.

The 5–4–2–1 pattern

Every mission expects a single mlflow.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_model with artifact_path="modelo_digits"
The canonical template for any mission looks like this:
with mlflow.start_run(run_name="Mision_{name}"):
    mlflow.log_params(parametros)
    mlflow.log_metrics(metricas)
    mlflow.log_artifact("matriz_confusion.png")
    mlflow.log_artifact("classification_report.json")
    mlflow.sklearn.log_model(
        sk_model=modelo,
        artifact_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:
# 🛰️ MISIÓN GUIADA: completa las cinco piezas dentro de la run
with mlflow.start_run(run_name="Mision_Tatooine"):
    # ⚙️ 1. Registra parametros
    # 📡 2. Registra metricas
    # 🔷 3. Registra los dos artefactos
    # 🤖 4. Registra modelo
    pass
Indicative results (from the internal template with these hyperparameters):
MetricValue
accuracy0.9556
precision_weighted0.9562
recall_weighted0.9556
f1_weighted0.9554
recall_10.9167
recall_80.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):
# ⚔️ MISIÓN SABOTEADA: corrige las categorías y completa las evidencias
with mlflow.start_run(run_name="Mision_Coruscant"):
    mlflow.log_metrics(parametros)  # BUG: decisiones previas
    mlflow.log_params(metricas)    # BUG: resultados
    mlflow.log_artifact("matriz_confusion.png")
    # 🔷 Falta el segundo artefacto
    # 🤖 Falta conservar el modelo
Indicative results:
MetricValue
accuracy0.9611
precision_weighted0.9620
recall_weighted0.9611
f1_weighted0.9609
recall_10.9722
recall_80.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:
# 🌋 MISIÓN AUTÓNOMA · CÓDIGO JEDI 5–4–2–1
# ✦ Abre la run Mision_Mustafar y escribe aquí el tracking completo.
pass
Indicative results:
MetricValue
accuracy0.9694
precision_weighted0.9701
recall_weighted0.9694
f1_weighted0.9692
recall_11.0000
recall_80.8571

Validation rules

Before the app triggers the internal training template, the submitted code is checked by the validate_mission_submission function using AST analysis. The following rules must all pass:
  • mlflow.start_run must be present.
  • mlflow.log_params must be present and must receive the variable parametros as its first positional argument.
  • mlflow.log_metrics must be present and must receive the variable metricas as its first positional argument.
  • mlflow.log_artifact must appear at least twice.
  • The two artifact calls must use exactly the literals "matriz_confusion.png" and "classification_report.json".
  • mlflow.sklearn.log_model must be present with keyword arguments sk_model and artifact_path.
  • The run_name passed to mlflow.start_run must match the mission exactly: "Mision_Tatooine", "Mision_Coruscant", or "Mision_Mustafar".
If any rule fails, a targeted message tells students which piece is missing or miscategorized without revealing the full solution.
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.
Scoring for missions: each completed mission awards +30 points, regardless of how many attempts it took. Finishing all three missions in one session also triggers a +15 bonus that is applied automatically when the third mission is validated. There is no per-attempt penalty for missions — only chambers have attempt limits and hint costs.

Build docs developers (and LLMs) love