Files
TinyTorch/tinytorch/core/utils.py
Vijay Janapa Reddi 43d160604d Clean up stale documentation - remove outdated workflow patterns
- Remove 5 outdated development guides that contradicted clean NBGrader/nbdev architecture
- Update all documentation to reflect assignments/ directory structure
- Remove references to deprecated #| hide approach and old command patterns
- Ensure clean separation: NBGrader for assignments, nbdev for package export
- Update README, Student Guide, and Instructor Guide with current workflows
2025-07-12 12:36:31 -04:00

132 lines
3.6 KiB
Python

# AUTOGENERATED! DO NOT EDIT! File to edit: ../../assignments/source/00_setup/setup_dev.ipynb.
# %% auto 0
__all__ = ['hello_tinytorch', 'add_numbers', 'SystemInfo', 'DeveloperProfile']
# %% ../../assignments/source/00_setup/setup_dev.ipynb 2
# Required imports for TinyTorch utilities
import sys
import platform
from datetime import datetime
import os
from pathlib import Path
# %% ../../assignments/source/00_setup/setup_dev.ipynb 4
def hello_tinytorch():
"""
Display a welcome message for TinyTorch.
This function should:
1. Try to load ASCII art from 'tinytorch_flame.txt' if it exists
2. If the file doesn't exist, display a simple text banner
3. Print "TinyTorch" and "Build ML Systems from Scratch!"
4. Handle any exceptions gracefully
"""
### BEGIN SOLUTION
# YOUR CODE HERE
raise NotImplementedError()
### END SOLUTION
# %% ../../assignments/source/00_setup/setup_dev.ipynb 5
def add_numbers(a, b):
"""
Add two numbers together.
Args:
a: First number (int or float)
b: Second number (int or float)
Returns:
Sum of a and b
"""
### BEGIN SOLUTION
# YOUR CODE HERE
raise NotImplementedError()
### END SOLUTION
# %% ../../assignments/source/00_setup/setup_dev.ipynb 6
class SystemInfo:
"""
A class for collecting and displaying system information.
"""
def __init__(self):
"""
Initialize the SystemInfo object.
Collect Python version, platform, and machine information.
"""
### BEGIN SOLUTION
# YOUR CODE HERE
raise NotImplementedError()
### END SOLUTION
def __str__(self):
"""
Return a formatted string representation of system information.
Format: "Python X.Y.Z on Platform (Architecture)"
"""
### BEGIN SOLUTION
# YOUR CODE HERE
raise NotImplementedError()
### END SOLUTION
def is_compatible(self):
"""
Check if the Python version is compatible (>= 3.8).
Returns True if compatible, False otherwise.
"""
### BEGIN SOLUTION
# YOUR CODE HERE
raise NotImplementedError()
### END SOLUTION
# %% ../../assignments/source/00_setup/setup_dev.ipynb 7
class DeveloperProfile:
"""
A class representing a developer profile.
"""
def __init__(self, name="Student", email="student@example.com", affiliation="TinyTorch Community", specialization="ML Systems"):
"""
Initialize a developer profile.
Args:
name: Developer's name
email: Developer's email
affiliation: Developer's affiliation or organization
specialization: Developer's area of specialization
"""
### BEGIN SOLUTION
# YOUR CODE HERE
raise NotImplementedError()
### END SOLUTION
def __str__(self):
"""
Return a basic string representation of the developer.
Format: "Name (email)"
"""
### BEGIN SOLUTION
# YOUR CODE HERE
raise NotImplementedError()
### END SOLUTION
def get_signature(self):
"""
Return a formatted signature for the developer.
Should include name, affiliation, and specialization.
"""
### BEGIN SOLUTION
# YOUR CODE HERE
raise NotImplementedError()
### END SOLUTION
def get_profile_info(self):
"""
Return comprehensive profile information as a dictionary.
"""
### BEGIN SOLUTION
# YOUR CODE HERE
raise NotImplementedError()
### END SOLUTION