Commit Graph

500 Commits

Author SHA1 Message Date
Vijay Janapa Reddi
11c36e6e12 Merge branch 'feature/enhance-module-04-layers' into dev 2025-09-15 15:23:43 -04:00
Vijay Janapa Reddi
199f03026b Merge branch 'improve/modules-01-02-standards' into dev 2025-09-15 15:23:39 -04:00
Vijay Janapa Reddi
39477e6657 Create Workflow Coordinator agent and define complete development process
Add Workflow Coordinator Agent:
- Master of complete TinyTorch development workflow
- Single point of contact for all workflow questions
- Orchestrates handoffs between agents
- Manages quality gates and module states
- Defines 5-phase process: Design → Implementation → QA → Release → Publishing

Create WORKFLOW_SUMMARY.md:
- Clear overview of who does what when
- 5-phase workflow with quality gates
- Agent responsibilities and escalation paths
- Answer to 'what's the workflow' question

This establishes clear process ownership and eliminates confusion
about who should do what next. User now has dedicated workflow
agent to answer all process questions.
2025-09-15 15:17:46 -04:00
Vijay Janapa Reddi
da1b8c4bca Update Module 01 to standardized 5 C's format
Apply the new standardized format to both sections:
- Personal Information Configuration (line ~210)
- System Information Queries (line ~424)

Changes:
- Replace verbose numbered sections with integrated code-comment format
- Use exact '### Before We Code: The 5 C's' heading
- Present all content within scannable code blocks
- Add compelling closing statements
- Preserve all educational content and technical details

Both Module 01 and Module 02 now use the same standardized
5 C's format defined in FIVE_CS_FORMAT_STANDARD.md
2025-09-15 15:01:42 -04:00
Vijay Janapa Reddi
3fbcffed28 Restore complete 5 C's content with improved format and codify standard
Module 02 Updates:
- Restore full 5 C's educational content (CONCEPT, CODE STRUCTURE, CONNECTIONS, CONSTRAINTS, CONTEXT)
- Use integrated code-comment format for natural flow
- Maintain all essential educational information
- Clear section header: 'Before We Code: The 5 C's'

New Format Standard:
- Create FIVE_CS_FORMAT_STANDARD.md to codify the approach
- Define exact structure for all future modules
- Include complete example with tensor implementation
- Specify when and how to use the format

The 5 C's content is excellent - this improves the presentation
format while preserving all educational value. Students get
complete context before implementation in a natural, scannable format.
2025-09-15 14:48:06 -04:00
Vijay Janapa Reddi
1ab0611740 Improve 5 C's format: Use integrated code-comment style
Replace verbose bullet format with code-comment approach that:
- Integrates concepts directly with implementation preview
- Shows exactly where each principle applies in actual code
- Feels more natural and less academic
- Maintains educational value while respecting student time
- Bridges gap between understanding and coding

The code-comment style helps students see the connection between
concepts and implementation rather than treating them as separate
academic content.
2025-09-15 14:38:14 -04:00
Vijay Janapa Reddi
6648c07a3a Add 5 C's pattern to Module 02 (Tensor) implementation
- Add comprehensive 5 C's educational framework before Tensor class
- Explain CONCEPT: What tensors are in ML context
- Detail CODE STRUCTURE: What we're building
- Show CONNECTIONS: PyTorch/TensorFlow/NumPy relationships
- Define CONSTRAINTS: Implementation requirements
- Provide CONTEXT: Why tensors matter in ML systems

This completes the educational scaffolding for Module 02, ensuring
students understand WHY they're building tensors before HOW to
implement them.
2025-09-15 14:27:11 -04:00
Vijay Janapa Reddi
1e3c73a462 Improve Modules 01 and 02 to meet TinyTorch educational standards
Module 01 (Setup) Improvements:
- Fix duplicate grade_id (changed to setup-verification)
- Add comprehensive 5 C's pattern before implementations
- Replace hardcoded instructor data with generic placeholders
- Implement test-immediately pattern after each function
- Add proper NBGrader metadata to all test cells

Module 02 (Tensor) Improvements:
- Move ALL scaffolding outside BEGIN/END SOLUTION blocks
- Add complete 5 C's pattern before Tensor implementation
- Fix test naming to consistent test_unit_* pattern
- Ensure tests run immediately after implementations
- Maintain proper NBGrader metadata with unique grade_ids

Key Standards Applied:
- 5 C's Pattern: Concept, Code Structure, Connections, Constraints, Context
- Test-immediately: Every implementation followed by immediate validation
- NBGrader Ready: Scaffolding outside solutions for student releases
- Professional Standards: Generic data and consistent patterns

These improvements ensure both modules:
1. Pass NBGrader validation for student releases
2. Provide comprehensive educational scaffolding
3. Follow test-immediately pattern for rapid feedback
4. Meet all TinyTorch quality standards
2025-09-15 14:25:49 -04:00
Vijay Janapa Reddi
547462b88d Remove archived documentation - knowledge now embedded in agents
All documentation has been embedded directly into agent knowledge bases
in .claude/agents/, making the archived copies unnecessary.
2025-09-15 14:05:22 -04:00
Vijay Janapa Reddi
b436386b24 Consolidate agent knowledge bases and clean up documentation
- Create complete agent knowledge bases in .claude/agents/
  - module-developer.md with NBGrader and scaffolding guidelines
  - education-architect.md with pedagogical principles
  - quality-assurance.md with validation requirements
  - devops-engineer.md with release management
  - documentation-publisher.md with publishing standards

- Create AGENT_REFERENCE.md as master team reference
- Create CONSOLIDATED_KNOWLEDGE_BASE.md as quick reference
- Archive standalone docs to .claude/archive/docs/

Key improvements:
- Agents now have all knowledge embedded in their descriptions
- No need for agents to lookup external documentation
- Single source of truth in agent knowledge bases
- Clear workflow from development to release
- NBGrader workflow fully documented in relevant agents

This ensures agents have immediate access to all critical information
without needing to reference multiple documentation files.
2025-09-15 14:03:52 -04:00
Vijay Janapa Reddi
c0aaa83228 Verify NBGrader implementation and update agent knowledge
- Create NBGRADER_VERIFICATION_REPORT.md confirming correct setup
- Add AGENT_MODULE_CHECKLIST.md for consistent module development
- Verify solution blocks and metadata are properly configured
- Confirm student release workflow will work correctly
- Update all agents with comprehensive module guidelines

Key findings:
- NBGrader metadata correctly configured for student releases
- BEGIN/END SOLUTION blocks properly placed
- Test cells locked with appropriate points
- Scaffolding exists outside solution blocks
- Ready for nbgrader generate_assignment workflow

This ensures TinyTorch modules can be:
1. Used by instructors with complete solutions
2. Released to students with code removed
3. Auto-graded at scale
4. Used in MOOCs and large courses
2025-09-15 13:56:22 -04:00
Vijay Janapa Reddi
cd930b8d69 Add comprehensive NBGrader integration documentation
- Create NBGRADER_INTEGRATION_GUIDE.md explaining all metadata fields
- Document why we use NBGrader for automated assessment
- Explain each metadata field: grade, grade_id, locked, points, schema_version, solution, task
- Show TinyTorch cell type patterns with proper configurations
- Explain BEGIN/END SOLUTION pattern and workflow
- Add troubleshooting guide for common NBGrader issues
- Update MODULE_DEVELOPMENT_GUIDELINES.md to reference NBGrader guide

This documentation ensures developers understand:
- Why NBGrader metadata is in every cell
- How automated grading works
- Best practices for creating assessable content
- The educational benefits of immediate feedback
2025-09-15 13:47:22 -04:00
Vijay Janapa Reddi
af0ad21da1 Add comprehensive module structure templates and markdown best practices
- Create MARKDOWN_BEST_PRACTICES.md with complete stencil for consistent narrative flow
- Update MODULE_DEVELOPMENT_GUIDELINES.md to emphasize markdown before every code block
- Add MODULE_STRUCTURE_TEMPLATE.md showing exact module organization
- Document module analysis patterns in MODULE_ANALYSIS_SUMMARY.md

Key improvements:
- Establish "Context → Concept → Connection → Concrete → Confidence" pattern
- Define implement-test-implement-test cycle with test naming conventions
- Create predictable module structure students can rely on
- Emphasize educational markdown before every implementation
- Add checkpoint patterns after successful implementations
- Standardize module summary structure

This ensures agents and developers create perfectly consistent modules that
provide students with a predictable, high-quality learning experience.
2025-09-15 13:43:23 -04:00
Vijay Janapa Reddi
4b1f290b8a Add generated Jupyter notebooks for tensor and activations modules
- Add tensor_dev.ipynb converted from tensor_dev.py
- Add activations_dev.ipynb converted from activations_dev.py

These notebooks provide interactive learning environments for students
to explore tensor operations and activation functions.
2025-09-15 13:30:20 -04:00
Vijay Janapa Reddi
ebc37265ee Add documentation standards and development setup
- Create .claude directory with team structure and guidelines
- Add MODULE_DEVELOPMENT_GUIDELINES.md for educational patterns
- Add EDUCATIONAL_PATTERN_TEMPLATE.md for consistent module structure
- Add GIT_WORKFLOW_STANDARDS.md for branch management
- Create setup-dev.sh for automated environment setup
- Add notebook workflow documentation
- Add CI/CD workflow for notebook testing

This commit establishes consistent development standards and documentation
for the TinyTorch educational ML framework development.
2025-09-15 13:30:10 -04:00
Vijay Janapa Reddi
eea5a95fd3 Enhance Module 04 (Layers) with comprehensive educational scaffolding
- Add deep mathematical foundation and visual diagrams
- Expand learning goals to connect with production ML systems
- Implement complete TODO/APPROACH/EXAMPLE/HINTS pattern
- Add extensive inline documentation for matrix multiplication
- Enhance Dense layer with detailed initialization strategies
- Create layer-activation integration patterns
- Add production system comparisons (PyTorch, TensorFlow)
- Include real-world architecture examples
- Add comprehensive checkpoint sections
- Expand module summary with industry connections

This enhancement transforms the layers module into a comprehensive
educational resource that deeply explains the mathematical foundation
of all neural networks while maintaining practical implementation focus.
2025-09-15 13:28:47 -04:00
Vijay Janapa Reddi
ce77693723 Removes development heading from notebook
Removes a redundant development heading from the dataloader notebook, streamlining the document's structure and improving readability.
2025-07-20 18:02:37 -04:00
Vijay Janapa Reddi
8a7550b1fb Add missing markdown documentation to 08_dataloader module
- Add documentation for test_unit_dataset_interface function
- Add documentation for test_unit_dataloader function
- Add documentation for test_unit_simple_dataset function
- Add documentation for test_unit_dataloader_pipeline function
- Ensures every code function has preceding explanatory markdown cell
- Maintains educational clarity and structure
2025-07-20 17:49:03 -04:00
Vijay Janapa Reddi
f995729f06 Add missing markdown documentation to 06_spatial module
- Add documentation for test_unit_convolution_operation function
- Add documentation for test_unit_conv2d_layer function
- Add documentation for test_unit_flatten_function function
- Ensures every code function has preceding explanatory markdown cell
- Maintains educational clarity and structure
2025-07-20 17:47:39 -04:00
Vijay Janapa Reddi
87d51de319 Add missing markdown documentation to 05_dense module
- Add documentation for plot_network_architectures function
- Add documentation for MLP class
- Add documentation for test_unit_sequential_networks function
- Add documentation for test_unit_mlp_creation function
- Add documentation for test_unit_network_applications function
- Ensures every code function has preceding explanatory markdown cell
- Maintains educational clarity and structure
2025-07-20 17:46:33 -04:00
Vijay Janapa Reddi
7bacceef17 Removes development headers
Removes development headers from several files.

These headers were used during the development process and are no longer needed.
2025-07-20 17:41:57 -04:00
Vijay Janapa Reddi
b5257ddc68 Updates markdown headers in development files
Updates markdown headers in development files to improve consistency and readability.

Removes the redundant "🔧 DEVELOPMENT" headers and standardizes the subsequent headers to indicate the purpose of the following code, such as "🧪 Test Your Matrix Multiplication". This change enhances the clarity and organization of the development files.
2025-07-20 17:36:32 -04:00
Vijay Janapa Reddi
517885de59 Add section organization to 15_mlops module: Add DEVELOPMENT section header
- Insert ## 🔧 DEVELOPMENT header before first test function
- Organizes module according to educational structure guidelines
- Maintains all existing functionality and test execution
- Improves readability and navigation for educational use
2025-07-20 17:30:59 -04:00
Vijay Janapa Reddi
4eb63ec969 Add section organization to 14_benchmarking module: Add DEVELOPMENT section header
- Insert ## 🔧 DEVELOPMENT header before first test function
- Organizes module according to educational structure guidelines
- Maintains all existing functionality and test execution
- Improves readability and navigation for educational use
2025-07-20 17:30:18 -04:00
Vijay Janapa Reddi
c14e2e67ba Add section organization to 13_kernels module: Add DEVELOPMENT section header
- Insert ## 🔧 DEVELOPMENT header before first test function
- Organizes module according to educational structure guidelines
- Maintains all existing functionality and test execution
- Improves readability and navigation for educational use
2025-07-20 17:29:39 -04:00
Vijay Janapa Reddi
8a7aceda77 Add section organization to 12_compression module: Add DEVELOPMENT section header
- Insert ## 🔧 DEVELOPMENT header before first test function
- Organizes module according to educational structure guidelines
- Maintains all existing functionality and test execution
- Improves readability and navigation for educational use
2025-07-20 17:29:02 -04:00
Vijay Janapa Reddi
a417520352 Add section organization to 11_training module: Add DEVELOPMENT section header
- Insert ## 🔧 DEVELOPMENT header before first test function
- Organizes module according to educational structure guidelines
- Maintains all existing functionality and test execution
- Improves readability and navigation for educational use
2025-07-20 17:28:21 -04:00
Vijay Janapa Reddi
1fe50738cf Add section organization to 10_optimizers module: Add DEVELOPMENT section header
- Insert ## 🔧 DEVELOPMENT header before first test function
- Organizes module according to educational structure guidelines
- Maintains all existing functionality and test execution
- Improves readability and navigation for educational use
2025-07-20 14:06:19 -04:00
Vijay Janapa Reddi
4d304af0be Add section organization to 09_autograd module: Add DEVELOPMENT section header
- Insert ## 🔧 DEVELOPMENT header before first test function
- Organizes module according to educational structure guidelines
- Maintains all existing functionality and test execution
- Improves readability and navigation for educational use
2025-07-20 14:05:44 -04:00
Vijay Janapa Reddi
35fa89a457 Add section organization to 08_dataloader module: Add DEVELOPMENT section header
- Insert ## 🔧 DEVELOPMENT header before first test function
- Organizes module according to educational structure guidelines
- Maintains all existing functionality and test execution
- Improves readability and navigation for educational use
2025-07-20 14:05:03 -04:00
Vijay Janapa Reddi
952109e326 Add section organization to 07_attention module: Add DEVELOPMENT section header
- Insert ## 🔧 DEVELOPMENT header before first test function
- Organizes module according to educational structure guidelines
- Maintains all existing functionality and test execution
- Improves readability and navigation for educational use
2025-07-20 14:04:31 -04:00
Vijay Janapa Reddi
23161a740d Add section organization to 06_spatial module: Add DEVELOPMENT section header
- Insert ## 🔧 DEVELOPMENT header before first test function
- Organizes module according to educational structure guidelines
- Maintains all existing functionality and test execution
- Improves readability and navigation for educational use
2025-07-20 14:03:50 -04:00
Vijay Janapa Reddi
c405d8f381 Add section organization to 05_dense module: Add DEVELOPMENT section header
- Insert ## 🔧 DEVELOPMENT header before first test function
- Organizes module according to educational structure guidelines
- Maintains all existing functionality and test execution
- Improves readability and navigation for educational use
2025-07-20 14:03:17 -04:00
Vijay Janapa Reddi
102684dcd8 Add section organization to 04_layers module: Add DEVELOPMENT section header
- Insert ## 🔧 DEVELOPMENT header before first test function
- Organizes module according to educational structure guidelines
- Maintains all existing functionality and test execution
- Improves readability and navigation for educational use
2025-07-20 14:01:13 -04:00
Vijay Janapa Reddi
ba380b76e6 Add integration test to 15_mlops module: test_module_mlops_tinytorch_integration
- Tests MLOps pipeline integration with complete TinyTorch models and workflows
- Validates performance monitoring with realistic model inference scenarios
- Tests data drift detection with model input features and production data
- Verifies complete MLOps pipeline with TinyTorch Sequential model integration
- Tests retraining triggers with TinyTorch training workflow compatibility
- Validates end-to-end MLOps workflow with comprehensive system health checks
- Positioned before MODULE SUMMARY as per educational structure
2025-07-20 14:00:00 -04:00
Vijay Janapa Reddi
7bf565b196 Add integration test to 03_activations module: test_module_activation_tensor_integration
- Tests activation function integration with Tensor class operations
- Validates that activations preserve Tensor types in neural network contexts
- Tests matrix operations for multi-dimensional neural network layers
- Verifies softmax probability distributions for classification scenarios
- Tests chaining tensor operations with activations for complete workflows
- Positioned before MODULE SUMMARY as per educational structure
2025-07-20 13:59:11 -04:00
Vijay Janapa Reddi
83e5c91c57 Add integration test to 02_tensor module: test_module_tensor_numpy_integration
- Tests tensor integration with NumPy arrays and operations
- Validates tensor-NumPy compatibility for scientific computing
- Ensures broadcasting works correctly between tensors and scalars
- Verifies integration with NumPy functions on tensor data
- Positioned before MODULE SUMMARY as per educational structure
2025-07-20 13:57:34 -04:00
Vijay Janapa Reddi
21f1199fad Improves clarity of visual understanding sections
Updates loss landscape descriptions to be more easily understood.

Replaces symbols with clearer text in visual explanations of optimizers.
2025-07-20 13:49:40 -04:00
Vijay Janapa Reddi
38aee6ab19 Deprecate AUTO TESTING: Remove run_module_tests_auto from all _dev.py modules. Standardize on full-module test execution for reliable, context-aware testing. 2025-07-20 13:28:10 -04:00
Vijay Janapa Reddi
37a44d2546 Removes test report file
Deletes the test report markdown file, as it is no longer needed.
2025-07-20 13:08:36 -04:00
Vijay Janapa Reddi
86ff66c73c Fix indentation issues in dense module - remove duplicate function and fix __main__ block 2025-07-20 13:08:13 -04:00
Vijay Janapa Reddi
2e80c52f8c Update test function names from test_integration_* to test_module_* for clearer cross-module testing semantics 2025-07-20 13:03:52 -04:00
Vijay Janapa Reddi
77a9480614 Implement logical test sequencing - unit tests run first, then integration tests 2025-07-20 13:02:21 -04:00
Vijay Janapa Reddi
06aee45554 Renames and runs integration tests for compression
Refactors integration test names for clarity.

Executes the integration tests to validate the compression functionality.
2025-07-20 13:00:02 -04:00
Vijay Janapa Reddi
c36c04aefc Renames training integration test function
Updates the name of the unit test function for training
integration to improve clarity and consistency.

This change ensures the test function name accurately
reflects its purpose.
2025-07-20 12:59:58 -04:00
Vijay Janapa Reddi
f48f791d28 Removes integration test execution
Stops the automatic execution of the integration test.

This change prevents the test from running every time the module is loaded,
allowing for more focused and controlled testing.
2025-07-20 12:59:54 -04:00
Vijay Janapa Reddi
1e372d74dc Renames integration test function
Updates the integration test function name for clarity
and consistency within the codebase.
2025-07-20 12:59:51 -04:00
Vijay Janapa Reddi
1d799b4f24 Removes autogenerated markdown section
Removes a markdown section that appears to be autogenerated documentation, cleaning up the code.
2025-07-20 12:57:02 -04:00
Vijay Janapa Reddi
4d13679c8a Clean up formatting in layers module 2025-07-20 12:54:57 -04:00
Vijay Janapa Reddi
b69cff7f4d Fix test function calls in spatial and dataloader modules - move test calls outside __main__ blocks 2025-07-20 12:54:15 -04:00