-
Notifications
You must be signed in to change notification settings - Fork 17
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
Proposed improvements to the API #64
Open
valentyn1boreiko
wants to merge
22
commits into
shift-happens-benchmark:main
Choose a base branch
from
valentyn1boreiko:adjustment_to_api
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 4 commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
ec36db1
Proposed task in worst_case.py
valentyn1boreiko d2a0ea6
Proposed task in worst_case.py
valentyn1boreiko a5547e9
Proposed task in worst_case.py
valentyn1boreiko 7be8daf
Proposed task in worst_case.py
valentyn1boreiko b6babbd
Proposed task in worst_case.py
valentyn1boreiko 5ecc718
Proposed task in worst_case.py
valentyn1boreiko 3f0ee0c
Proposed task in worst_case.py
valentyn1boreiko 2e2da01
Merge pull request #1 from shift-happens-benchmark/main
valentyn1boreiko 29ed2ae
Proposed task in worst_case.py
valentyn1boreiko 3c8fcbe
Proposed task in worst_case.py
valentyn1boreiko a7a9673
Proposed task in worst_case.py
valentyn1boreiko 9255b75
Proposed task in worst_case.py
valentyn1boreiko 2167637
Proposed task in worst_case.py
valentyn1boreiko 19217ea
Proposed task in worst_case.py
valentyn1boreiko 8d46e34
Proposed task in worst_case.py
valentyn1boreiko 0b856c1
Proposed task in worst_case.py
valentyn1boreiko 5c32a7a
Proposed task in worst_case.py
valentyn1boreiko 673fec5
Proposed task in worst_case.py
valentyn1boreiko b8659be
Proposed task in worst_case.py
valentyn1boreiko ea4678a
Merge branch 'main' into adjustment_to_api
valentyn1boreiko 2efdde8
Latest.
valentyn1boreiko ed1ec54
Added verbose.
valentyn1boreiko 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 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 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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
numpy | ||
torch | ||
torchvision | ||
surgeon_pytorch | ||
surgeon_pytorch | ||
tqdm |
This file contains 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 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 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.
Instead of storing this as a class variable, we could also create a global flag that controls this behavior for all models at the same time. I'm not sure yet which option I prefer.
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.
Yes, I see your point - I think a global flag would be even better. So far, it seems that we don't have use-cases, when several models are evaluated, but if we will at some point, it would be a bit more clean to do it like you say.
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 both, I think ability to configure these options will also come handy for other tasks. For example, if this task here should be verbosely evaluated, probably all other tasks in the same run should be too.
I made a proposal for adding global config options to the package. In case we go ahead and merge this, @valentyn1boreiko you simply use the new
shifthappens.config.verbose
option instead of defining this option here.Let me know what you think (ideally directly on the referenced PR).
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 @valentyn1boreiko, #75 was merged now.
What do you think about the proposed solution, do you think you could leverage it to adapt this PR?
In case you dont find time, @kotekjedi might probably be able to help with this!
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, @stes, I added two lines
import shifthappens.config
and
if shifthappens.config.verbose:
in models/base.py
This should be enough, right?
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 @stes,
I added
available_models_dict = {'resnet18': ResNet18,
'resnet50': ResNet50,
'vgg16': VGG16}
in worst_case.py
I think it would make sense to have a model card somewhere in the global config, such that one could easy choose a model with a parameter to a script, right?
Should I open a separate PR request for this, or could you add it?