mirror of
https://github.com/MLSysBook/TinyTorch.git
synced 2026-05-01 03:27:31 -05:00
Add progressive demo system with repository reorganization
Implements comprehensive demo system showing AI capabilities unlocked by each module export: - 8 progressive demos from tensor math to language generation - Complete tito demo CLI integration with capability matrix - Real AI demonstrations including XOR solving, computer vision, attention mechanisms - Educational explanations connecting implementations to production ML systems Repository reorganization: - demos/ directory with all demo files and comprehensive README - docs/ organized by category (development, nbgrader, user guides) - scripts/ for utility and testing scripts - Clean root directory with only essential files Students can now run 'tito demo' after each module export to see their framework's growing intelligence through hands-on demonstrations.
This commit is contained in:
21
scripts/fix_mlops_syntax.py
Normal file
21
scripts/fix_mlops_syntax.py
Normal file
@@ -0,0 +1,21 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Fix syntax errors in mlops_dev.py"""
|
||||
|
||||
import re
|
||||
|
||||
# Read the file
|
||||
with open('modules/source/15_mlops/mlops_dev.py', 'r') as f:
|
||||
content = f.read()
|
||||
|
||||
# Fix the malformed function definitions
|
||||
# Pattern: def if __name__ == "__main__":\n function_name():
|
||||
pattern = r'def if __name__ == "__main__":\n (\w+)\(\):'
|
||||
replacement = r'def \1():'
|
||||
|
||||
content = re.sub(pattern, replacement, content)
|
||||
|
||||
# Write back
|
||||
with open('modules/source/15_mlops/mlops_dev.py', 'w') as f:
|
||||
f.write(content)
|
||||
|
||||
print("✅ Fixed syntax errors in mlops_dev.py")
|
||||
Reference in New Issue
Block a user