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

Generate dataloader for each trial #813

Merged
merged 2 commits into from
Apr 19, 2024

Conversation

shihchengli
Copy link
Contributor

Description

Currently, the training and validation dataloaders are generated once and used for all the trials in HPO. Therefore, the same dataloaders are passed to trainer.fit() multiple times. This should be avoided, as the same dataloader will be sampled differently during different trials. Moreover, it could also cause the #808 test to fail because the index in the sampler (see here) will become a read-only object and cannot be shuffled again for the following trials.

Checklist

  • linted with flake8?
  • (if appropriate) unit tests added?

@shihchengli shihchengli marked this pull request as ready for review April 19, 2024 02:57
Copy link
Contributor

@hwpang hwpang left a comment

Choose a reason for hiding this comment

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

Thanks for figuring this out! LGTM!

@hwpang hwpang enabled auto-merge April 19, 2024 13:14
@hwpang hwpang merged commit c547bfe into chemprop:v2/dev Apr 19, 2024
11 checks passed
@kevingreenman kevingreenman added this to the v2.0.0 milestone Apr 19, 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.

None yet

3 participants