mirror of
https://github.com/MLSysBook/TinyTorch.git
synced 2026-05-03 06:04:56 -05:00
Features: - 16 checkpoint test suite validating ML systems capabilities - Integration tests covering complete learning progression - Rich CLI progress tracking with visual timelines - Capability-driven assessment from environment to production Checkpoints: - Environment setup through full ML system deployment - Each checkpoint validates integrated functionality - Progressive capability building with clear success criteria - Professional CLI interface with status/timeline/test commands
50 lines
1.5 KiB
Python
50 lines
1.5 KiB
Python
"""
|
|
Checkpoint 0: Environment Setup (After Module 1 - Setup)
|
|
Question: "Can I configure my TinyTorch development environment?"
|
|
"""
|
|
|
|
import sys
|
|
import platform
|
|
import pytest
|
|
|
|
def test_checkpoint_00_environment():
|
|
"""
|
|
Checkpoint 0: Environment Setup
|
|
|
|
Validates that the development environment is properly configured
|
|
and TinyTorch is available for use.
|
|
"""
|
|
print("\n🔧 Checkpoint 0: Environment Setup")
|
|
print("=" * 50)
|
|
|
|
# Test 1: Python environment
|
|
python_version = f"{sys.version_info.major}.{sys.version_info.minor}"
|
|
print(f"✅ Python {python_version}")
|
|
assert sys.version_info.major >= 3, "Python 3+ required"
|
|
assert sys.version_info.minor >= 8, "Python 3.8+ recommended"
|
|
|
|
# Test 2: Platform information
|
|
system = platform.system()
|
|
print(f"✅ Platform: {system}")
|
|
|
|
# Test 3: TinyTorch availability
|
|
try:
|
|
import tinytorch
|
|
version = getattr(tinytorch, '__version__', 'unknown')
|
|
print(f"✅ TinyTorch {version} ready")
|
|
except ImportError:
|
|
pytest.fail("❌ TinyTorch not available - run installation first")
|
|
|
|
# Test 4: Core dependencies
|
|
try:
|
|
import numpy as np
|
|
print(f"✅ NumPy {np.__version__}")
|
|
except ImportError:
|
|
pytest.fail("❌ NumPy not available")
|
|
|
|
print("\n🎉 Environment Setup Complete!")
|
|
print("📝 You can now configure TinyTorch development environments")
|
|
print("🎯 Next: Build tensor foundations")
|
|
|
|
if __name__ == "__main__":
|
|
test_checkpoint_00_environment() |