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

Fix an issue where the seed is not used when it is 0 #635

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Manchewable
Copy link

What does this PR do?

This PR fix allows us to use the value 0 as the seed. Currently, when the seed is configured as 0 in the config file, the seed will not be used in train.py as it will not bypass the if cfg.get("seed"): check. By checking whether cfg.get("seed") is the None type, it'll let us set the seed to 0.

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?

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 83.24%. Comparing base (bddbc24) to head (1e3bdcf).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #635   +/-   ##
=======================================
  Coverage   83.24%   83.24%           
=======================================
  Files          11       11           
  Lines         376      376           
=======================================
  Hits          313      313           
  Misses         63       63           

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

@Manchewable Manchewable changed the title Fix an issue when the seed is not set when it is 0 Fix an issue where the seed is not used when it is 0 Mar 6, 2024
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