Skip to content
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

Add tests on all CFM classes #74

Merged
merged 39 commits into from
Nov 23, 2023
Merged

Add tests on all CFM classes #74

merged 39 commits into from
Nov 23, 2023

Conversation

kilianFatras
Copy link
Collaborator

What does this PR do?

This PR adds tests on all CFM classes. It adds a new tests folder and test_conditional_flow_matcher.py file.

First, I ensure that each main class function sample_location_and_conditional_flow runs properly (on different tensor sizes) and then I compare their outputs with my own computed outputs.

Before submitting

  • Did you make sure title is self-explanatory and the description concisely explains the PR?
  • Did you make sure your PR does only one thing, instead of bundling different changes together?
  • Did you list all the breaking changes introduced by this pull request?
  • Did you test your PR locally with pytest command?
  • Did you run pre-commit hooks with pre-commit run -a command?

Did you have fun?

Make sure you had fun coding 🙃

@codecov-commenter
Copy link

codecov-commenter commented Nov 20, 2023

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (7cb209d) 34.23% compared to head (d700429) 35.63%.

Files Patch % Lines
torchcfm/conditional_flow_matching.py 85.71% 1 Missing ⚠️
torchcfm/optimal_transport.py 92.30% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #74      +/-   ##
==========================================
+ Coverage   34.23%   35.63%   +1.39%     
==========================================
  Files          55       67      +12     
  Lines        6268     7417    +1149     
==========================================
+ Hits         2146     2643     +497     
- Misses       4122     4774     +652     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@atong01
Copy link
Owner

atong01 commented Nov 23, 2023

Codecov check not passing but still happy as we have changed what is being checked. Looks good to merge by me.

@kilianFatras kilianFatras merged commit 716d9d3 into main Nov 23, 2023
33 checks passed
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