mirror of
https://github.com/MLSysBook/TinyTorch.git
synced 2026-04-28 22:12:35 -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:
@@ -37,7 +37,7 @@ Mark what students should implement vs. what to provide.
|
||||
### Step 4: 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}
|
||||
@@ -203,7 +203,7 @@ Students implement:
|
||||
|
||||
### Convert Python to Notebook
|
||||
```bash
|
||||
python3 tools/py_to_notebook.py modules/{module}/{module}_dev.py
|
||||
python bin/tito.py notebooks --module {module}
|
||||
```
|
||||
|
||||
### Generate Student Version
|
||||
|
||||
@@ -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