Skip to content

Conversation

@jwilles
Copy link
Collaborator

@jwilles jwilles commented Oct 7, 2025

This pull request introduces a comprehensive testing infrastructure for the VBLL library, including automated CI setup, configuration files, fixtures, and documentation. The changes enable robust, reproducible, and flexible testing using pytest, and provide clear guidance for contributors on running and extending the test suite.

Testing Infrastructure and Automation

  • Added a GitHub Actions CI workflow (.github/workflows/ci.yml) to automatically run tests on pushes and pull requests to main/master branches. The workflow sets up Python, installs dependencies (including PyTorch), and runs the test suite with pytest.
  • Introduced a test runner script (run_tests.py) that provides a command-line interface for running the test suite with options for quick/unit/integration/benchmark tests, parallel execution, coverage, and optional GPU/JAX support.

Test Suite Configuration and Fixtures

  • Added pytest.ini to configure pytest: specifies test discovery patterns, verbosity, warning filters, and custom markers for slow, GPU, integration, and unit tests.
  • Created tests/conftest.py with a comprehensive set of fixtures for devices, seeds, batch sizes, sample data, and common parameter sets for classification and regression layers, supporting reproducible and parameterized tests.

Documentation and Developer Guidance

  • Added tests/README.md detailing test structure, categories, running instructions, coverage, benchmarks, and troubleshooting tips, guiding contributors on best practices for testing and extending the suite.
  • Updated the main README.md with instructions for installing test dependencies and running tests using pytest.

Project Configuration

  • Updated pyproject.toml to include pytest as a development dependency, ensuring test requirements are managed via Poetry.
  • Added tests/__init__.py to mark the tests directory as a package.

These changes collectively establish a solid foundation for automated and manual testing, improving code quality and maintainability.

@jwilles jwilles assigned jwilles and jmesharrison and unassigned jwilles Oct 7, 2025
@jwilles jwilles merged commit 142f21e into main Oct 7, 2025
1 check passed
train_loss.backward()
optimizer.step()

# Check that loss is finite and decreasing
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No test for decreasing here currently

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This might fail for large learning rates though (decreasing check). Suggest either reducing learning rate or simply not checking for decreasing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants