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.

All persistent data generated by MLflow Jedi lives in the DATA_DIR folder — by default data/ relative to app-v2/. This single directory contains everything needed to restore or migrate a deployment: the game database with team progress and scores, the MLflow tracking database with every experiment run, and the artifact files produced during missions. Keeping this folder intact is equivalent to keeping a complete snapshot of any classroom session.

Storage layout

The data/ directory is created automatically on first startup if it does not exist. Its internal structure is fixed:
data/
├── game.db       # sessions, teams, attempts, hint usage, scores, defenses
├── mlflow.db     # MLflow tracking: experiments, runs, params, metrics
└── artifacts/   # confusion matrices, classification reports, MLflow artifacts
    └── mlflow/  # MLflow artifact root
File / folderContents
game.dbAll session codes, team names, chamber attempts, hint counts, forced advances, scores, and final defenses
mlflow.dbMLflow experiment metadata: experiment names, run IDs, run names, logged parameters, metrics, and artifact paths
artifacts/Binary and JSON artifact files written by missions — confusion matrix PNGs, classification report JSON files, and the serialised scikit-learn models stored under artifacts/mlflow/

Docker volumes

The docker-compose.yml file declares a named volume that maps the container’s /app/data directory to persistent Docker-managed storage:
services:
  mlflow-jedi:
    volumes:
      - mlflow_jedi_data:/app/data

volumes:
  mlflow_jedi_data:
The named volume mlflow_jedi_data has two important properties:
  • It survives docker compose down and image rebuilds. Stopping and restarting the stack — even after docker compose build — does not touch the volume.
  • It is stored outside the project directory, managed entirely by Docker. You cannot browse it directly with a file manager without explicitly mounting it.
Running docker compose down -v permanently deletes the mlflow_jedi_data volume and all data inside it — including every session, team, run, artifact, and defense. Do not use the -v flag unless you intentionally want to start completely fresh. To stop the stack without any data loss, always use docker compose down (without -v).

Backup procedure

Back up data at the end of every classroom session and before any update or infrastructure change.
1

Export from the teacher panel

Log in to the Profesorado panel and use the export buttons to download a full JSON backup and a summary CSV. These files capture all team data, run results, and defenses in a portable format that does not require a running database to read.
2

Stop the application

Gracefully stop the app before copying SQLite files:
docker compose down
Or press Ctrl+C if running locally without Docker.
3

Copy the data/ directory

Copy the entire data/ folder to a safe location outside the project:
cp -r app-v2/data/ ~/backups/mlflow-jedi-$(date +%Y%m%d)/
On Windows (PowerShell):
Copy-Item -Recurse app-v2\data "C:\Backups\mlflow-jedi-$(Get-Date -Format yyyyMMdd)"
4

Archive the matching code version

Keep a copy of the code at the same version alongside the data backup. SQLite schemas and artifact formats may differ between versions, so restoring data against a different version of the app could cause errors.
The teacher panel’s JSON export is the most reliable single-file backup. It captures all team data, MLflow runs, and submitted defenses in a structured format you can inspect with any text editor or load into a notebook — no database tooling required.

Manual SQLite backup

If you need to back up the raw database files directly (for example, to restore a specific run in MLflow’s UI), copy both game.db and mlflow.db while the application is stopped. Never copy SQLite files while the app is running. Copying a live database risks catching the file mid-write and producing a corrupt backup. The application uses WAL mode (journal_mode=WAL) for better concurrent read performance, which means there may also be -wal and -shm sidecar files in data/ during operation — these are automatically consolidated on clean shutdown.

Update procedure

Follow these steps whenever you apply a code update or rebuild the Docker image to ensure data integrity.
1

Back up data/

Follow the backup procedure above before touching any code or container.
2

Run the test suite

From the app-v2/ directory, verify the new code passes all tests:
python -m unittest discover -s tests -v
3

Build the new Docker image

Rebuild without discarding the data volume:
docker compose build
4

Start with the same persistent volume

Bring the stack back up — the existing mlflow_jedi_data volume is automatically reattached:
docker compose up
5

Run a test session before classroom use

Create a session, join as a team, complete at least one chamber and one mission, and verify the teacher panel shows correct data. Only then hand the session code to students.

Build docs developers (and LLMs) love