Skip to content

Set the seed for regression tests inside the functions - #631

Closed
Luthaf wants to merge 3 commits into
metatensor:mainfrom
Luthaf:regression-tests
Closed

Set the seed for regression tests inside the functions#631
Luthaf wants to merge 3 commits into
metatensor:mainfrom
Luthaf:regression-tests

Conversation

@Luthaf

@Luthaf Luthaf commented Jun 20, 2025

Copy link
Copy Markdown
Member

Setting them at the module level means they are set when pytest performs test discovery. If more tests are added, the regression tests will start with a different RNG state than expected and fail.

Contributor (creator of pull-request) checklist

  • Tests updated (for new features and bugfixes)?
  • Documentation updated (for new features)?
  • Issue referenced (for PRs that solve an issue)?

Reviewer checklist

  • CHANGELOG updated with public API or any other important changes?

📚 Documentation preview 📚: https://metatrain--631.org.readthedocs.build/en/631/

Setting them at the module level means they are set when pytest performs
test discovery. If more tests are added, the regression tests will start
with a different RNG state than expected and fail.

@PicoCentauri PicoCentauri left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Test cleanup day. 🧹

The failing tests are related to huggingface. Maybe there is just something broken on their side...

@Luthaf

Luthaf commented Jun 20, 2025

Copy link
Copy Markdown
Member Author

Test cleanup day. 🧹

I'm working on #580, and fixing whatever annoys me on the way!

@Luthaf

Luthaf commented Jun 20, 2025

Copy link
Copy Markdown
Member Author

The failing tests are related to huggingface. Maybe there is just something broken on their side...

No, I think this is because I'm making a PR from a fork. I'll update the test code

@PicoCentauri

Copy link
Copy Markdown
Contributor

Probably !

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.

2 participants