Add encoding='utf-8' and errors='replace' to subprocess.run() calls in
workflow.py so unit and integration test output decode correctly on
Windows (cp1252) when output contains UTF-8 characters.
Co-authored-by: Pratham-ja <114498234+Pratham-ja@users.noreply.github.com>
The VS Code extension no longer implements any business logic — every
capability (module discovery, path resolution, system info, builds,
tests, clean) lives in Tito CLI commands. The extension is a pure UI
shell that delegates via `python3 -m tito.main`.
Tito CLI additions:
- `module list --json` for machine-readable module discovery
- `module path <num> --notebook|--source|--about` for file resolution
- `system info --json` for environment info
- `dev build html|serve|pdf|paper` wrapping make targets
- `dev clean [all|site]` wrapping make clean
- Banner suppression for --json and module path output
Extension hardening:
- Centralized CLI integration in utils/tito.ts (single TITO_CMD constant,
callTito, callTitoJson, titoTerminalCommand, isTitoAvailable, log/logError)
- Replaced all silent catch{} blocks with logged errors and user feedback
- Module tree shows error/empty states with actionable Setup/Health buttons
- Info tree shows "Tito CLI unavailable" when CLI is unreachable
- Removed all setTimeout refresh hacks — file watcher on .tito/progress.json
is the sole refresh mechanism
- Exit code tracking via onDidEndTerminalShellExecution
- Tito availability pre-flight check on activation
- BUILD_OUTPUTS constants for build artifact paths
- Zero execSync calls outside tito.ts, zero hardcoded command strings
Students hit "No module named 'tinytorch.core.tensor'" in notebooks because
the Jupyter kernel used a different Python than where tinytorch was installed.
- setup: install ipykernel + nbdev, register named kernel during tito setup
- health: add Notebook Readiness checks (import, kernel, Python match)
- export: verify exported file exists and has content (fail loudly)
- Windows: add get_venv_bin_dir() helper for cross-platform venv paths
The nbdev_export CLI was not reading settings.ini correctly in CI,
causing exports to silently fail. Using nbdev.export.nb_export()
Python API directly with explicit lib_path ensures exports work
reliably regardless of environment.
The nbdev_export command wasn't in PATH in CI. Using sys.executable
with -m nbdev.export ensures we use the same Python environment that's
running tito, which is more reliable across different environments.
Fixed in:
- tito/commands/dev/export.py (both _export_all_modules and _run_nbdev_export)
- tito/commands/module/workflow.py (_export_notebook)
Bug Fix:
- Export failures now return early in module complete, preventing
progress from being updated when export fails. This fixes the issue
where students could start Module 02 even though tensor.py was
never exported.
New --user-journey test:
- Simulates exact student flow: module start --no-jupyter → module complete
- Runs milestones at natural unlock checkpoints (not all at end)
- Milestone checkpoints: after modules 03, 08, 09, 13, 19
- Explicit step-by-step output for easy CI debugging
New --no-jupyter flag:
- Added to 'tito module start' for CI/testing
- Creates notebook but skips opening Jupyter
Ref: https://github.com/harvard-edge/cs249r_book/discussions/1147
- Remove Stage 6 (milestone tests) from CI workflow since test files were
removed as redundant with integration tests
- Renumber Stage 7 (release) to Stage 6
- Update summary job to remove milestone references
- Fix _trigger_submission() to skip interactive prompts in CI mode
by checking CI, GITHUB_ACTIONS env vars and stdin.isatty()
The milestone demo scripts remain available for student use via
'tito milestone run', but are no longer run as automated tests.
Text.append() does not interpret Rich markup - it treats strings as
literal text. Split the markup into separate append calls with proper
style parameters so the 'Next: tito module start XX' hint renders
correctly instead of showing literal [bold cyan] tags.
Source files like src/02_activations/02_activations.py import from
tinytorch.core.tensor. When running these as subprocesses, the Python
path needs to include the project root so the imports resolve correctly.
This was causing CI to fail at module 02 because it couldn't find
tinytorch.core.tensor even though module 01 had exported it.
- Added complete_all_modules() method that iterates through all modules
- Runs tests + export for each module in sequence (01 → 20)
- Stops on first failure for fail-fast behavior
- Skips modules without notebooks (shows as 'skipped')
- Useful for CI validation and students exporting all work
Distinction from dev export --all:
- dev export --all: Rebuilds from src/ (overwrites student notebooks)
- module complete --all: Tests + exports existing notebooks (safe for students)
- Update all-contributors-add.yml to use Ollama (llama3.1:8b) for parsing
natural language descriptions instead of requiring exact syntax
- Trim contribution types to 8 actually used: bug, code, doc, design,
ideas, review, test, tool
- Update generate_main_readme.py and generate_readme_tables.py to match
- Remove unused tito module export subcommand (fixes#1134)
Students should use tito module complete instead
Now you can write naturally:
@all-contributors @user helped verify the fix worked
@all-contributors @user found a bug in the dataloader
- Update remaining 1957→1958 references across all documentation
- Add tito dev commands (preflight, export, validate) to CLI reference
- Update CLI validation script to recognize new dev subcommands
- Fix milestone year references in tests and workflow code
- Update timeline visualization JavaScript
This completes the Perceptron year standardization to align with
the publication year and academic citation format (rosenblatt1958perceptron).
Cherry-picked from: ebf3fb17b (feature/tito-dev-validate)
- Fix gradient accumulation scaling in Trainer (divide gradient, not just loss)
- Fix evaluation loop to count batches correctly instead of using len(dataloader)
- Ensure optimizer params have requires_grad=True and grad initialized
- Add pytest -o addopts= to prevent config pollution in integration tests
- Improve update command messaging with Panel warning
Fixes#1112
Fixes#1110
The integration tests import from tinytorch.core.* which requires
the module to be exported first. Previously, tests ran before export,
causing ModuleNotFoundError for tinytorch.core.layers.
New workflow order:
1. Unit tests (test source files)
2. Export (creates tinytorch/core/*.py)
3. Integration tests (test exported package)
4. Track progress
Add machine-readable module.yaml files to each of the 20 modules with
title, subtitle, and description fields. Update tito CLI to read from
these files instead of parsing Python files.
- Create module.yaml in src/NN_*/ directories
- Add YAML parser with validation in tito/core/modules.py
- Update list_modules() to display descriptions from YAML
- Fix notebook naming: use short name (tensor.ipynb) not full name (01_tensor.ipynb)
- Fix module directory: use modules/ not src/ for notebook locations
- Open notebook directly in JupyterLab instead of just the folder
- Fixed integer to string comparison for module numbers
- Now checks .tito/milestones.json to see if milestone was actually run
- Updated milestone requirements to match MILESTONE_SCRIPTS
- MilestoneSystem now falls back to MILESTONE_SCRIPTS when no YAML config
- Fixed trigger_module logic for milestones without explicit triggers
- Added fallback for victory_condition to use description field
- Changed progress file location from root to .tito/progress.json
- Updated workflow and reset commands to use .tito/ directory
- Add tito module view XX to open notebook without status ceremony
- Auto-create module from src/ when tito module start XX is called
if module does not exist in modules/ yet
- Reuse convert_py_to_notebook from export_utils for consistency
- Update help text to include view command
FixesMLSysBook/TinyTorch#22
The module mappings were hardcoded in multiple files and had drifted
out of sync with actual folder names. Module 15 was incorrectly mapped
to "15_acceleration" instead of "15_quantization".
Changes:
- Add tito/core/modules.py that auto-discovers modules from src/ directory
- Remove hardcoded module mappings from workflow.py, reset.py, test.py
- Replace hardcoded next_modules dicts in export.py and src.py
- Single source of truth: filesystem is now the source
This prevents future sync issues - adding/renaming module folders
automatically updates the CLI without code changes.