After sealing all six chambers, a team is ready for the missions — three increasingly difficult challenges that reconstruct real Random Forest experiments on the scikit-learn Digits dataset. Each mission asks the student to write (or repair) the complete MLflow tracking block for one training run: five parameters, four core metrics, two artifact files, and one serialised model, following the 5–4–2–1 Jedi Code. The three missions use different hyperparameter combinations (n_estimators 50 → 100 → 300; max_depth 8 → 10 → None) so the resulting metrics differ and meaningful comparison is possible in the Consejo screen. Every mission awards 30 points; completing all three adds a further 15-point bonus.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 canonical template
All three missions share the same structural template. The only elements that change between missions are therun_name value and the hyperparameters in parametros.
Parameters available in all missions
Theparametros dictionary is pre-populated in the guided and sabotaged missions and must be constructed by the student in the autonomous mission. It always contains these five keys, drawn from execute_safe_mission in mlflow_engine.py:
max_depth=None is serialised as the string "None" so it stores cleanly in MLflow’s parameter store.
Metrics computed
Themetricas dictionary is computed by execute_safe_mission after training and always contains these six keys:
| Key | Computation |
|---|---|
accuracy | accuracy_score(y_test, predictions) |
precision_weighted | precision_score(..., average="weighted") |
recall_weighted | recall_score(..., average="weighted") |
f1_weighted | f1_score(..., average="weighted") |
recall_1 | Recall for digit class "1" from classification_report |
recall_8 | Recall for digit class "8" from classification_report |
recall_1 and recall_8 are surfaced specifically in the Consejo screen to prompt a deeper, per-class analysis.
Mission 1 — Tatooine
| Property | Value |
|---|---|
| Mode | Misión guiada |
| n_estimators | 50 |
| max_depth | 8 |
| Accent colour | #d9a441 |
| 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
| Property | Value |
|---|---|
| Mode | Misión saboteada |
| n_estimators | 100 |
| max_depth | 10 |
| Accent colour | #43c8d8 |
| 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 |
log_params and log_metrics — the most common conceptual confusion. Students must also add the missing second artifact and the model registration.
Mission 3 — Mustafar
| Property | Value |
|---|---|
| Mode | Misión autónoma |
| n_estimators | 300 |
| max_depth | None (unlimited) |
| Accent colour | #df6548 |
| 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 |
max_depth=None (unlimited trees) produces the highest accuracy of the three missions and a perfect recall_1, giving teams something meaningful to note in their Consejo recommendation.
Validation rules
validate_mission_submission in code_validator.py applies the following checks in order. All checks are purely structural (AST-based — no code is executed).
Required calls present
The submission must contain all five distinct MLflow calls:
mlflow.start_run, mlflow.log_params, mlflow.log_metrics, mlflow.log_artifact, and mlflow.sklearn.log_model. Any missing call triggers: “Faltan piezas del Código Jedi 5–4–2–1: <missing>”Two artifact calls
mlflow.log_artifact must appear at least twice. A single artifact call is rejected with: “La misión necesita dos artefactos de evidencia.”log_params argument is named parametros
The first argument to
mlflow.log_params must be the bare name parametros (an ast.Name node with id == "parametros"). Any other argument — including an inline dict literal — is rejected with: “log_params debe recibir parametros: son decisiones anteriores al entrenamiento.”log_metrics argument is named metricas
The first argument to
mlflow.log_metrics must be the bare name metricas. Rejected with: “log_metrics debe recibir metricas: son resultados de evaluación.”Artifact filenames are exact
The two
log_artifact calls must use exactly "matriz_confusion.png" and "classification_report.json" as string literals. Any other filenames trigger: “Registra exactamente matriz_confusion.png y classification_report.json.”Model keywords present
mlflow.sklearn.log_model must include both sk_model and artifact_path as keyword arguments. Missing either triggers: “El modelo necesita sk_model=modelo y artifact_path=“modelo_digits”.”After validation passes, the app trains and tracks using its own internal safe template (
execute_safe_mission) — the student’s submitted code is never executed. This design means the app is safe to use in any classroom environment without sandboxing concerns, and the results displayed are always reproducible from the same fixed random seed (42) and train/test split (80/20, stratified).