-
Notifications
You must be signed in to change notification settings - Fork 2
feat: Add integration test wrapping simplexity/run.py #85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
- Created hydra config for integration testing with local persistence and file logging - Implemented test_integration.py that wraps train_model from run.py - Tests verify end-to-end workflow, loss reduction, and file creation - Uses TransformerLens model as requested Co-authored-by: ealt <ealt@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds comprehensive integration tests for the Simplexity training workflow, providing end-to-end testing by wrapping the simplexity/run.py functionality.
Key changes:
- Created integration test configuration for fast, lightweight testing
- Implemented three test scenarios covering basic workflow, loss validation, and validation functionality
- Added temporary directory management for isolated test execution
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| tests/test_integration.py | Main integration test file with three test functions covering end-to-end workflow validation |
| tests/configs/integration_test.yaml | Hydra configuration optimized for testing with small model parameters and fast execution |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| file_path: /tmp/simplexity_test_logs/test.log | ||
|
|
||
| persistence: | ||
| instance: | ||
| directory: /tmp/simplexity_test_checkpoints No newline at end of file |
Copilot
AI
Sep 30, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using hardcoded /tmp/ paths is not portable across operating systems (Windows doesn't have /tmp/). Consider using a relative path or letting the test override this value entirely.
| file_path: /tmp/simplexity_test_logs/test.log | |
| persistence: | |
| instance: | |
| directory: /tmp/simplexity_test_checkpoints | |
| file_path: logs/test.log | |
| persistence: | |
| instance: | |
| directory: checkpoints |
| file_path: /tmp/simplexity_test_logs/test.log | ||
|
|
||
| persistence: | ||
| instance: | ||
| directory: /tmp/simplexity_test_checkpoints No newline at end of file |
Copilot
AI
Sep 30, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using hardcoded /tmp/ paths is not portable across operating systems (Windows doesn't have /tmp/). Consider using a relative path or letting the test override this value entirely.
| file_path: /tmp/simplexity_test_logs/test.log | |
| persistence: | |
| instance: | |
| directory: /tmp/simplexity_test_checkpoints | |
| file_path: logs/test.log | |
| persistence: | |
| instance: | |
| directory: checkpoints |
Code Review for PR #85: Integration Test for simplexity/run.pyThank you for adding this comprehensive integration test suite! This addresses issue #84 and significantly improves test coverage. Strengths
Suggestions for Improvement
Potential Issues
Performance & Security
Test CoverageCurrently covers training workflow, config loading, checkpoints, logging, validation, and loss tracking. Consider adding tests for checkpoint loading and edge cases. Overall AssessmentSolid integration testing addition. Clean, well-organized code. With suggested improvements (especially type hints and specific assertions), this will be excellent. Recommendation: Approve with minor suggestions. Great work! |
Closes #84
Summary
Adds integration test that wraps
simplexity/run.pyto test the complete end-to-end workflow.Changes
tests/configs/integration_test.yamlwith Hydra configuration for testingtests/test_integration.pythat wraps thetrain_modelfunction fromrun.pyTest Coverage
The integration test verifies:
run.py🤖 Generated with Claude Code
Note
Adds an end-to-end integration test suite for run.py with a minimal Hydra config, verifying training, checkpoints/logs, loss decrease, and validation.
tests/test_integration.pyadds integration tests aroundtrain_model:tests/configs/integration_test.yamlintroduces a compact Hydra config for testing:Written by Cursor Bugbot for commit 62a077d. This will update automatically on new commits. Configure here.