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

[Multimodal] Fix seed #3222

Merged
merged 1 commit into from
May 19, 2023
Merged

Conversation

yinweisu
Copy link
Collaborator

Issue #, if available:
#3219

Description of changes:

  • The issue above can be reproduced by providing a fixed HPO search space, i.e. learning_rate = tune.choice([1]) and running multiple runs will give different results.
  • The root cause should be because the current seed_everything call happens in fit while this seed setting is not affecting hpo trials. This behavior can be verified by printing torch seed inside _fit via torch.random.initial_seed(). Different runs will give different seed value.
  • This PR moves the seed_everything call to _fit, which happens inside forked process created by ray and should fix the issue

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@yinweisu yinweisu requested a review from zhiqiangdon May 18, 2023 18:40
@yinweisu yinweisu changed the title Fix multimodal seed [Multimodal] Fix seed May 18, 2023
@github-actions
Copy link

Job PR-3222-4da72e4 is done.
Docs are uploaded to http://autogluon-staging.s3-website-us-west-2.amazonaws.com/PR-3222/4da72e4/index.html

Copy link
Contributor

@zhiqiangdon zhiqiangdon left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks for the fix!

@zhiqiangdon zhiqiangdon merged commit 5c3c4e6 into autogluon:master May 19, 2023
28 checks passed
@yinweisu yinweisu deleted the fix_automm_hpo_seed branch May 22, 2023 17:04
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

2 participants