-
Notifications
You must be signed in to change notification settings - Fork 7.2k
Reduce variance of evaluation in reference #5819
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
Merged
YosuaMichael
merged 14 commits into
pytorch:main
from
YosuaMichael:references/reduce-eval-variance
May 3, 2022
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
fe7a5f0
Change code to reduce variance in eval
YosuaMichael f7da625
Merge branch 'main' into references/reduce-eval-variance
YosuaMichael 60347ac
Remove unnecessary new line
YosuaMichael 899028d
Merge branch 'main' into references/reduce-eval-variance
YosuaMichael 07f0622
Fix missing import warnings
YosuaMichael aa43994
Merge branch 'main' into references/reduce-eval-variance
YosuaMichael e92a13c
Fix the warning on video_classification
YosuaMichael 81f4a65
Merge branch 'references/reduce-eval-variance' of github.com:YosuaMic…
YosuaMichael 1316541
Fix bug to get len of UniformClipSampler
YosuaMichael 7264c7e
Merge branch 'main' into references/reduce-eval-variance
YosuaMichael 8dd62b8
Merge branch 'main' into references/reduce-eval-variance
YosuaMichael 1d0ea32
Merge branch 'main' into references/reduce-eval-variance
YosuaMichael c38a308
Merge branch 'main' into references/reduce-eval-variance
YosuaMichael bea7549
Merge branch 'main' into references/reduce-eval-variance
YosuaMichael File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To avoid duplicated code with
args.test_only
, I would suggest to do something like:and to remove these 2 lines
vision/references/optical_flow/train.py
Lines 228 to 229 in 65238ce
I would also suggest to do that for every references as they seem to follow the same pattern
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @NicolasHug , I have just tried what you suggested and got error when I try to use
test-only
:Following the error note, when I set the env var
CUBLAS_WORKSPACE_CONFIG=:4096:8
it works, but I think this will create a friction to users.I think the main issue is that we use
torch.use_deterministic_algorithms(True)
when we setargs.use_deterministic_algorithms
and this is much more stricter thantorch.backends.cudnn.deterministic = True
when we useargs.test_only
. (see here )Hence as of now we can only avoid duplicate of the line
torch.backends.cudnn.benchmark = False
which I think still okay to have 1 line duplicate for now. What do you think?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, fair point. I forgot that one is stricter than the other. I think the way you did it is fine then. Sorry for the noise!