mirror of
https://github.com/MLSysBook/TinyTorch.git
synced 2026-04-28 07:17:33 -05:00
🧹 Remove deployment issue file - moved to GitHub issues
The content was meant for a GitHub issue, not a repo file. Issue should be created at: https://github.com/USERNAME/TinyTorch/issues/new
This commit is contained in:
@@ -1,204 +0,0 @@
|
||||
# Issue: Implement TinyTorch Educational Deployment System
|
||||
|
||||
## 🎯 **Overview**
|
||||
|
||||
Implement a deployment system for TinyTorch that allows instructors to generate and distribute student versions of modules while maintaining the existing development workflow.
|
||||
|
||||
## 📋 **Requirements**
|
||||
|
||||
### **Core Functionality**
|
||||
- [ ] Generate student versions (NotImplementedError stubs) from instructor modules
|
||||
- [ ] Generate solution versions (complete implementations) for catch-up
|
||||
- [ ] Progressive git-based release system for controlled timing
|
||||
- [ ] Preserve existing NBDev development workflow (no breaking changes)
|
||||
|
||||
### **Command Structure**
|
||||
Add new commands to `bin/tito.py`:
|
||||
|
||||
```bash
|
||||
# Deploy student exercises (clean stubs)
|
||||
tito deploy student --module tensor --target-repo student-repo/
|
||||
tito deploy student --all --target-repo student-repo/
|
||||
|
||||
# Deploy solutions for catch-up
|
||||
tito deploy solutions --module tensor --target-repo student-repo/
|
||||
tito deploy solutions --all --target-repo student-repo/
|
||||
|
||||
# Release management
|
||||
tito release --tag week5-tensor-solutions --message "Release tensor solutions"
|
||||
```
|
||||
|
||||
## 🏗️ **Architecture Design**
|
||||
|
||||
### **Preserve Existing Workflow**
|
||||
- ✅ Keep current development in `modules/{name}/{name}_dev.py`
|
||||
- ✅ Keep current NBDev export with `#| export` and `#| hide` directives
|
||||
- ✅ Keep current `tito sync`, `tito test`, `tito info` commands unchanged
|
||||
- ✅ Additive approach - no breaking changes
|
||||
|
||||
### **New Components**
|
||||
```
|
||||
TinyTorch/
|
||||
├── bin/tito.py # Extended with deploy commands
|
||||
├── deployment/ # New deployment system
|
||||
│ ├── generators/
|
||||
│ │ ├── student.py # Generate student stubs
|
||||
│ │ └── solutions.py # Generate solution releases
|
||||
│ ├── packagers/
|
||||
│ │ ├── git.py # Git-based distribution
|
||||
│ │ └── archive.py # Zip/tar distribution
|
||||
│ └── templates/ # Output templates
|
||||
└── student-repo/ # Generated student materials (git-ignored)
|
||||
```
|
||||
|
||||
## 🔧 **Implementation Details**
|
||||
|
||||
### **Student Version Generation**
|
||||
```python
|
||||
def generate_student_version(module_name):
|
||||
"""
|
||||
Process module_dev.py to create student exercises:
|
||||
1. Keep function signatures and docstrings
|
||||
2. Replace implementations with NotImplementedError
|
||||
3. Keep TODO instructions and hints
|
||||
4. Generate test cells that handle NotImplementedError gracefully
|
||||
"""
|
||||
pass
|
||||
```
|
||||
|
||||
### **Solution Version Generation**
|
||||
```python
|
||||
def generate_solution_version(module_name):
|
||||
"""
|
||||
Process module_dev.py to create solution release:
|
||||
1. Include complete implementations from #|hide cells
|
||||
2. Remove #|hide directives (make everything visible)
|
||||
3. Keep all working code and tests
|
||||
"""
|
||||
pass
|
||||
```
|
||||
|
||||
### **Git-Based Release System**
|
||||
```python
|
||||
def deploy_to_repo(content, target_repo, commit_message):
|
||||
"""
|
||||
Deploy generated content to student repository:
|
||||
1. Copy generated notebooks to target repo
|
||||
2. Git add, commit, and tag
|
||||
3. Optionally push to remote
|
||||
"""
|
||||
pass
|
||||
```
|
||||
|
||||
## 🎓 **User Workflows**
|
||||
|
||||
### **Instructor Workflow**
|
||||
1. **Setup**: Fork/clone TinyTorch repo (complete instructor version)
|
||||
2. **Development**: Use existing workflow (`modules/{name}/{name}_dev.py`)
|
||||
3. **Weekly Release**:
|
||||
```bash
|
||||
# Week 3: Release tensor exercises
|
||||
tito deploy student --module tensor --target-repo student-repo/
|
||||
tito release --tag week3-tensor --message "Release tensor exercises"
|
||||
|
||||
# Week 5: Release tensor solutions + autograd exercises
|
||||
tito deploy solutions --module tensor --target-repo student-repo/
|
||||
tito deploy student --module autograd --target-repo student-repo/
|
||||
tito release --tag week5-tensor-solutions-autograd
|
||||
```
|
||||
|
||||
### **Student Workflow**
|
||||
1. **Setup**: `git clone https://github.com/Course/TinyTorch-Student-Fall2024`
|
||||
2. **Weekly Updates**: `git pull origin main` (gets new exercises/solutions)
|
||||
3. **Work**: Edit notebooks, implement functions, run tests
|
||||
4. **Catch-up**: Solutions automatically available when instructor releases
|
||||
|
||||
## ✅ **Acceptance Criteria**
|
||||
|
||||
### **Functional Requirements**
|
||||
- [ ] Generate clean student notebooks with NotImplementedError stubs
|
||||
- [ ] Generate complete solution notebooks from instructor versions
|
||||
- [ ] Deploy to git repository with proper commits and tags
|
||||
- [ ] Handle multiple modules and batch operations
|
||||
- [ ] Preserve all existing TinyTorch development workflows
|
||||
|
||||
### **Quality Requirements**
|
||||
- [ ] Generated student code fails gracefully with helpful error messages
|
||||
- [ ] Generated solution code passes all existing tests
|
||||
- [ ] Git operations are atomic (all-or-nothing)
|
||||
- [ ] Clear error messages for common failure cases
|
||||
- [ ] Documentation for instructor setup and usage
|
||||
|
||||
### **Technical Requirements**
|
||||
- [ ] Use existing NBDev infrastructure where possible
|
||||
- [ ] Minimal dependencies (leverage existing tooling)
|
||||
- [ ] Cross-platform compatibility (Unix/Windows)
|
||||
- [ ] Configurable output formats (notebook, Python, both)
|
||||
|
||||
## 📝 **Implementation Tasks**
|
||||
|
||||
### **Phase 1: Core Generation**
|
||||
- [ ] Implement student version generator (NotImplementedError stubs)
|
||||
- [ ] Implement solution version generator (complete implementations)
|
||||
- [ ] Add basic `tito deploy student` and `tito deploy solutions` commands
|
||||
- [ ] Test with existing setup module
|
||||
|
||||
### **Phase 2: Git Integration**
|
||||
- [ ] Implement git repository deployment
|
||||
- [ ] Add `tito release` command with tagging
|
||||
- [ ] Handle batch operations (`--all` flag)
|
||||
- [ ] Add target repository configuration
|
||||
|
||||
### **Phase 3: Polish & Documentation**
|
||||
- [ ] Comprehensive error handling and user feedback
|
||||
- [ ] Configuration file support for default settings
|
||||
- [ ] Complete documentation with examples
|
||||
- [ ] Integration tests with real student workflow
|
||||
|
||||
## 🧪 **Testing Strategy**
|
||||
|
||||
### **Unit Tests**
|
||||
- [ ] Test student stub generation from instructor code
|
||||
- [ ] Test solution generation preserves functionality
|
||||
- [ ] Test git operations (commit, tag, push)
|
||||
- [ ] Test error handling for malformed inputs
|
||||
|
||||
### **Integration Tests**
|
||||
- [ ] End-to-end instructor workflow
|
||||
- [ ] End-to-end student workflow
|
||||
- [ ] Multi-module deployment scenarios
|
||||
- [ ] Git repository state validation
|
||||
|
||||
### **Manual Testing**
|
||||
- [ ] Real course scenario with multiple modules
|
||||
- [ ] Student experience validation
|
||||
- [ ] Instructor release workflow validation
|
||||
|
||||
## 📚 **Documentation Requirements**
|
||||
|
||||
- [ ] **Instructor Guide**: Setup, development, and release workflows
|
||||
- [ ] **Student Guide**: Getting started and update procedures
|
||||
- [ ] **Technical Docs**: Command reference and configuration options
|
||||
- [ ] **Examples**: Sample module showing before/after transformation
|
||||
|
||||
## 🎯 **Success Metrics**
|
||||
|
||||
- Instructors can generate and release student materials in < 5 minutes
|
||||
- Students can update to latest materials with single `git pull`
|
||||
- Zero breaking changes to existing TinyTorch development workflow
|
||||
- Solution releases allow students to catch up and continue with next modules
|
||||
|
||||
## 💡 **Future Enhancements** (Out of Scope)
|
||||
|
||||
- Web-based course management interface
|
||||
- Automated grading integration
|
||||
- Student progress analytics
|
||||
- Integration with course management systems (Canvas, etc.)
|
||||
- Pip-installable TinyTorch package with remote module pulling
|
||||
|
||||
---
|
||||
|
||||
**Priority**: High
|
||||
**Estimated Effort**: 2-3 weeks
|
||||
**Dependencies**: Current NBDev educational setup (completed)
|
||||
**Assignee**: TBD
|
||||
Reference in New Issue
Block a user