mirror of
https://github.com/MLSysBook/TinyTorch.git
synced 2026-05-01 03:39:50 -05:00
Refactor notebook generation to use separate files for better architecture
- Restored tools/py_to_notebook.py as a focused, standalone tool - Updated tito notebooks command to use subprocess to call the separate tool - Maintains clean separation of concerns: tito.py for CLI orchestration, py_to_notebook.py for conversion logic - Updated documentation to use 'tito notebooks' command instead of direct tool calls - Benefits: easier debugging, better maintainability, focused single-responsibility modules
This commit is contained in:
@@ -34,7 +34,7 @@ class YourClass:
|
||||
### 3. Convert and Generate
|
||||
```bash
|
||||
# Convert Python to notebook
|
||||
python3 tools/py_to_notebook.py modules/{module}/{module}_dev.py
|
||||
python bin/tito.py notebooks --module {module}
|
||||
|
||||
# Generate student version
|
||||
python3 bin/generate_student_notebooks.py --module {module}
|
||||
@@ -105,7 +105,7 @@ mkdir modules/{module}
|
||||
cp modules/example/example_dev.py modules/{module}/{module}_dev.py
|
||||
|
||||
# Full workflow
|
||||
python3 tools/py_to_notebook.py modules/{module}/{module}_dev.py
|
||||
python bin/tito.py notebooks --module {module}
|
||||
python3 bin/generate_student_notebooks.py --module {module}
|
||||
|
||||
# Test everything
|
||||
|
||||
Reference in New Issue
Block a user