Commit 0d60178
Story 3.3: Native Object Passing with NVIDIA GPU Computer Vision Pipeline (#45)
* Add comprehensive test suite for native object passing system
Story 3.3 Task 6 - Testing and validation (AC 1-5)
New test files:
- test_native_object_passing.py: Direct object reference tests
- test_native_object_ml_frameworks.py: PyTorch/NumPy/Pandas integration
- test_native_object_memory_management.py: Memory leak detection
- test_native_object_performance.py: Reference vs copy benchmarks
Test coverage:
- 36 comprehensive tests across 4 specialized files
- Edge cases: circular references, concurrent access, complex nesting
- Performance validation: 20x-100x+ improvements documented
- ML frameworks: Graceful degradation when dependencies unavailable
- Memory management: Cleanup behavior and GPU memory handling
🤖 Generated with [Claude Code](https://claude.ai/code)
* Complete Story 3.3: Native Object Passing System
Story Status: Ready for Review - All tasks completed
Task completion:
- Task 1-5: All previously completed (Story 3.2 foundation)
- Task 6: Testing and validation - COMPLETED
✅ Subtask 6.1: Comprehensive unit tests for direct object passing
✅ Subtask 6.2: Integration tests for ML framework objects
✅ Subtask 6.3: Memory leak detection tests
✅ Subtask 6.4: Performance benchmarks (copy vs reference)
QA Results:
- All 5 Acceptance Criteria VERIFIED
- 36 tests with excellent coverage across all requirements
- Performance validation: 95x-7500x improvements documented
- Production ready with comprehensive memory management
- APPROVED FOR RELEASE by QA review
Dev Agent Record:
- Added comprehensive test suite implementation
- Fixed import paths for project consistency
- Validated test execution and performance metrics
- Updated file list and change log
🤖 Generated with [Claude Code](https://claude.ai/code)
* Update flow specification for native object passing architecture
Major specification updates to reflect Story 3.3 implementation:
Section 3.11 - Native Object Passing System:
- Replaced outdated subprocess/JSON serialization documentation
- Added single process execution architecture details
- Documented 100-1000x performance improvements
- Added memory management and GPU cleanup specifications
Section 3.10 - ML Framework Integration (NEW):
- Comprehensive PyTorch, NumPy, Pandas, TensorFlow, JAX support
- Performance benchmarks: 4000x-7500x improvements documented
- Auto-import framework documentation
- GPU memory management code examples
Removed outdated content:
- JSON serialization type constraints (no longer applicable)
- Subprocess execution limitations
- Performance overhead documentation
Updated sections:
- Virtual environments: Single process execution context
- Error handling: Memory management errors, direct execution
- Execution modes: Native object passing benefits
The specification now accurately reflects the revolutionary
zero-copy architecture implemented in Story 3.3.
🤖 Generated with [Claude Code](https://claude.ai/code)
* Fix virtual environment package loading for single process execution
- Update SingleProcessExecutor to load packages from graph-specific venvs
- Inject venv site-packages into sys.path for package availability
- Pass venv path from GraphExecutor to SingleProcessExecutor
- Fix deprecated torchvision API usage in computer vision pipeline
- Update ResNet50 model loading to use new weights API
- Maintain zero-copy performance while supporting venv isolation
Fixes computer vision pipeline PIL import error by properly loading
packages from venvs/computer_vision_pipeline virtual environment.
* Add Dependencies section support to FlowSpec format
- Document Dependencies section specification in flow_spec.md
- Add parser support for Dependencies section in flow_format.py
- Support pip-style package version constraints
- Include optional packages, Python version requirements
- Add examples for ML/AI, data science, and web/API dependencies
- Enable dependency resolution through virtual environments
Complements virtual environment package loading functionality.
* Add FlowSpec LLM documentation and sample images
- Add comprehensive FlowSpec LLM reference documentation
- Include LLM generator specification for automated graph creation
- Add sample images for computer vision pipeline testing
- Complete documentation suite for FlowSpec format
Supporting files for ML/computer vision workflows and documentation.
* Fix relative image path handling in computer vision pipeline
- Add absolute path resolution for relative image paths
- Import os module for path operations
- Resolve paths relative to project root directory
- Ensures sample images can be found regardless of working directory
* Add proper ImageNet class labels to computer vision pipeline
- Replace generic class numbers with meaningful ImageNet class names
- Add mapping for common classes including cats, dogs, and animals
- Class 281 now shows as 'tabby_cat' instead of 'class_281'
- Improves user experience with readable classification results
* Upgrade to NVIDIA GPU-accelerated computer vision pipeline
- Rename to 'nvidia_gpu_computer_vision_pipeline.md' to reflect GPU acceleration
- Update dependencies to CUDA-enabled PyTorch (2.0.0+cu118)
- Add system requirements for NVIDIA GPU and CUDA toolkit
- Include proper installation instructions for CUDA PyTorch
- Enhanced title and description for GPU optimization
The current PyTorch installation is CPU-only (2.8.0+cpu), explaining why
GPU acceleration was unavailable. New dependencies will enable CUDA support.
* Fix GPU device detection in computer vision pipeline classifier
- Add missing device_info parameter to classify_image return tuple
- Properly detect and report whether tensor is on CUDA or CPU device
- Fix function signature mismatch between Classifier and Results Display nodes
- Now correctly shows 'cuda:0' when GPU is being used for processing
The issue was that classify_image() was missing the 4th parameter (device_info)
that Results Display expected, causing device info to be incorrect.
* Fix device_info connection to use Classifier output instead of Preprocessor
- Change device_info connection source from Image Preprocessor to Classifier
- Classifier node now provides accurate GPU device information (cuda:0 vs cpu)
- Preprocessor device_info was always 'cpu' before GPU transfer occurred
- Results Display will now show correct processing device information
This ensures GPU usage is properly reported when CUDA acceleration is active.
* Make Clear Results button functional in computer vision pipeline
- Add clicked signal handler to clear_btn in Results Display node
- Button now clears the results text area and resets to default message
- Improves user experience by allowing easy clearing of previous results
* Fix Clear Results button by defining proper function
- Define clear_results() function before connecting to button
- Replace lambda with named function following FlowSpec patterns
- Button should now properly clear the results display when clicked
- Follows same pattern as browse_folder in file organizer example
* Fix Clear Results button in nvidia_gpu_computer_vision_pipeline.md
The Clear Results button was not working due to a scope issue where the GUI
State Handler functions did not have access to the node reference needed
for the flag-based clearing mechanism.
Changes:
- Add "node": self to all GUI State Handler execution scopes in src/core/node.py
- Implement Clear Results button functionality in nvidia_gpu_computer_vision_pipeline.md
- Button sets node._results_cleared flag to prevent set_values from restoring old results
- Clean implementation without debug output
This enables users to manually clear the results display without automatic
restoration from cached output data.
Generated with [Claude Code](https://claude.ai/code)
* Fix virtual environment switching when loading different graphs
The SingleProcessExecutor was not updating its virtual environment when
loading graphs with different environment requirements, causing package
loading issues and incorrect environment isolation.
Changes:
- Add refresh_executor_environment() method to GraphExecutor to recreate
SingleProcessExecutor with updated venv path
- Update ExecutionController.refresh_environment_state() to call the new
refresh method after environment validation
- Ensures proper package isolation when switching between graphs with
different virtual environment requirements
This resolves the issue where loading a new graph would continue using
the previous graph's virtual environment packages instead of switching
to the correct environment.
Generated with [Claude Code](https://claude.ai/code)
* Update CLAUDE.md with commit policy
Add explicit rule to never commit changes unless explicitly requested
by the user to prevent premature commits during development iterations.
Generated with [Claude Code](https://claude.ai/code)
---------
Co-authored-by: Bryan Howard <[email protected]>1 parent 85c9bcf commit 0d60178
File tree
16 files changed
+3688
-260
lines changed- docs
- specifications
- stories
- examples
- sample_images
- src
- core
- data
- execution
- tests
16 files changed
+3688
-260
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
118 | 118 | | |
119 | 119 | | |
120 | 120 | | |
| 121 | + | |
| 122 | + | |
121 | 123 | | |
122 | 124 | | |
123 | 125 | | |
| |||
0 commit comments