KatalockAi AcademyBack to KatalockAi
Phase project, required for the Phase 0 certificate

Reproducible Dataset Workspace

Build a version-controlled Python project that fetches a public dataset, verifies it, converts it to Parquet and makes seeded splits that a fresh clone reproduces bit for bit.

about 4 h Reviewed against a 5-point rubric
Submit your project Get coached by Professor Katalock

Lessons this project uses

  1. 1Dev EnvironmentPhase 0: Setup and tooling
  2. 2Git & CollaborationPhase 0: Setup and tooling
  3. 3Jupyter NotebooksPhase 0: Setup and tooling
  4. 4Python EnvironmentsPhase 0: Setup and tooling
  5. 5Data ManagementPhase 0: Setup and tooling
  6. 6Terminal & ShellPhase 0: Setup and tooling

What you'll build

A small but real project skeleton you will reuse for every later phase. It pins its environment with a lockfile, downloads a public dataset you choose, checks the download against a known SHA-256, stores it as Parquet, and creates seeded train/validation/test splits. A one-command check proves that a fresh clone on another machine produces exactly the same splits, and a notebook explores the data by importing your code instead of copying it.

Requirements

  1. Environment. A pyproject.toml with requires-python = ">=3.11" and your dependencies, plus a committed lockfile (uv.lock or requirements.lock from uv pip compile). The README shows the exact commands to create the environment from the lockfile.
  2. Git hygiene. A .gitignore that excludes at least .venv/, .env, raw and processed data files, and model checkpoint extensions (*.pt, *.pth, *.safetensors). No data files or virtual environment are committed.
  3. Dataset choice. Pick a public tabular or text dataset between 1,000 and 1,000,000 rows and under 100 MB (a stable direct CSV URL or a Hugging Face dataset). Record its source URL, license and the expected SHA-256 of the downloaded file in data/SOURCE.json. Do not use the IMDB example from the lesson.
  4. Fetch script. scripts/prepare_data.py (or python -m yourpkg.prepare) downloads the file only if it is not already cached, verifies the SHA-256 and exits with a non-zero code and a clear message on mismatch.
  5. Conversion and splits. The script writes the data as Parquet, then creates a 70/15/15 train/validation/test split with a fixed seed read from a config value (not a magic number buried in code).
  6. Data report. The script writes results/data_report.json containing: row and column counts, column names, CSV size vs Parquet size in bytes, the row count of each split, and a content hash of each split (for example SHA-256 of the split's sorted row ids or of its CSV export).
  7. Reproducibility check. scripts/check_repro.sh (or make check) runs the preparation twice into two separate output folders and compares the split hashes. It prints PASS and exits 0 when they match, otherwise prints FAIL and exits 1.
  8. Notebook. notebooks/explore.ipynb imports your loading function from your package, shows the first rows, summary statistics and at least one plot. It is committed after Kernel > Restart & Run All, so execution counts run 1, 2, 3 in order.
  9. History. At least 6 meaningful commits, including one feature branch (for example feature/parquet-export) merged back into main.

Constraints

  • Runs on an ordinary laptop (Linux, macOS or Windows with WSL2), CPU only. No GPU, no paid service, no API key.
  • Use uv or the built-in venv. Total download under 100 MB.
  • Standard libraries only for hashing (hashlib); pandas or the datasets library for loading and Parquet (pyarrow).

Stretch goals

  • Add a Dockerfile that builds the environment from the lockfile and runs the check inside a container.
  • Track the raw file with DVC instead of re-downloading it.
  • Add a streaming mode that processes the dataset row by row and report peak memory.

How to submit

Public GitHub repo with this layout: README.md, pyproject.toml, the lockfile, .gitignore, data/SOURCE.json, scripts/prepare_data.py, scripts/check_repro.sh, notebooks/explore.ipynb, results/data_report.json. The README must list the setup and run commands, explain why you chose this dataset, why Parquet vs CSV sizes differ in your numbers, and one thing that broke during setup and how you fixed it. Paste the fresh-clone transcript and the outputs listed under evidence.

How it's reviewed

Professor Katalock reads your repository and the evidence you paste, and scores each criterion out of 100. You pass with a weighted total of 70 or more and no criterion below 40. A copied or padded submission is flagged and fails.

CriterionWeightHow it's checked
Reproducible environment20pyproject.toml and a committed lockfile exist, the README setup commands install from the lockfile, `.gitignore` excludes .venv, .env, data files and checkpoint extensions, and no data or venv files are in the repo tree.
Data pipeline correctness25prepare_data.py verifies SHA-256 against data/SOURCE.json and exits non-zero on mismatch, skips the download when cached, writes Parquet, and results/data_report.json contains sizes, column info, split counts that sum to the row count in a 70/15/15 ratio, and split hashes.
Reproducibility proof20check_repro.sh runs the pipeline twice and compares hashes; the pasted fresh-clone transcript shows clone, environment install, pipeline run and PASS with exit code 0, and hashes match those in the committed data_report.json.
Code and repo structure15Seed and paths come from config, the notebook imports from the package rather than duplicating code, notebook execution counts are sequential, and git log shows at least 6 meaningful commits plus a merged feature branch.
README explanation and reflection20README states the dataset source and license, the learner's own CSV vs Parquet byte numbers with a reason for the difference, the exact run commands, and a specific setup problem the learner hit and how they fixed it.

Submit

Push your work to a public GitHub repository with a README that explains how to run it, then paste the evidence below. Up to 3 reviews a day, free.

  • Link to the public GitHub repo
  • Terminal transcript of a fresh `git clone` into a new folder, environment creation from the lockfile, `which python` showing the project venv, and the full output of the reproducibility check with its exit code
  • Contents of results/data_report.json from your run
  • Output of `git log --oneline --graph --all` showing the merged feature branch
  • Output of running the prepare script once with a deliberately wrong hash in data/SOURCE.json, showing the failure message and non-zero exit

Reviews are done by AI against the rubric above. They check the evidence in your repository; they are not a substitute for a human code review, and a review can be wrong. If you think it is, improve the README so the evidence is unmistakable and resubmit.