Skip to content

Adding CI test suite #14

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

Merged
merged 4 commits into from
Jul 17, 2025
Merged

Adding CI test suite #14

merged 4 commits into from
Jul 17, 2025

Conversation

sridhs21
Copy link
Contributor

This PR adds a lightweight testing framework. It addresses the need to catch basic syntax and logic errors without depending on large, external simulation data.

This is done with two main additions:

  • A --smoke-test flag that runs a brief end-to-end training loop. It uses a new SyntheticXPointDataset to generate mock data and makes sure the core training pipeline is functional. This provides a sanity check, confirming that data loading, model forward/backward passes, and the main training loop execute without errors.

  • A pytest suite for more targeted checks. This includes unit tests for components like the DiceLoss function and an integration test to verify that model checkpointing (saving and loading) works correctly.

@cwsmith
Copy link
Contributor

cwsmith commented Jul 16, 2025

@sridhs21 Thank you. Are all the functions defined in test_xpoint_ml.py automatically called by pytest? How do we run the pytest suite?

@sridhs21
Copy link
Contributor Author

Yes, all functions in test_xpoint_ml.py are automatically called by pytest because they follow the naming convention of starting with test_. To run the pytest suite, pytest reconClassifier/test_xpoint_ml.py or pytest test_xpoint_ml.py will work, depending on the directory you are in.

Copy link
Contributor

@cwsmith cwsmith left a comment

Choose a reason for hiding this comment

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

Looks good. Thank you.

@cwsmith cwsmith merged commit cd79949 into main Jul 17, 2025
1 check passed
@cwsmith cwsmith deleted the ci-tests branch July 17, 2025 15:52
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.

3 participants