-
Notifications
You must be signed in to change notification settings - Fork 26.9k
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
add initial design for uniform processors + align model #31197
Merged
Merged
Changes from all commits
Commits
Show all changes
49 commits
Select commit
Hold shift + click to select a range
b85036f
add initial design for uniform processors + align model
molbap bb8ac70
fix mutable default :eyes:
molbap cd8c601
add configuration test
molbap f00c852
handle structured kwargs w defaults + add test
molbap 693036f
protect torch-specific test
molbap 766da3a
fix style
molbap 844394d
fix
molbap c19bbc6
fix assertEqual
molbap 3c38119
move kwargs merging to processing common
molbap 81ae819
rework kwargs for type hinting
molbap ce4abcd
just get Unpack from extensions
molbap 3acdf28
run-slow[align]
molbap 404239f
handle kwargs passed as nested dict
molbap 603be40
add from_pretrained test for nested kwargs handling
molbap 71c9d6c
[run-slow]align
molbap 26383c5
update documentation + imports
molbap 4521f4f
update audio inputs
molbap b96eb64
protect audio types, silly
molbap 9c5c01c
try removing imports
molbap 3ccb505
make things simpler
molbap 142acf3
simplerer
molbap 60a5730
move out kwargs test to common mixin
molbap be6c141
[run-slow]align
molbap 84135d7
skip tests for old processors
molbap ce967ac
[run-slow]align, clip
molbap f78ec52
!$#@!! protect imports, darn it
molbap 52fd5ad
[run-slow]align, clip
molbap 8f21abe
Merge branch 'main' into uniform_processors_1
molbap d510030
[run-slow]align, clip
molbap fd43bcd
update doc
molbap b2cd7c9
improve documentation for default values
molbap bcbd646
add model_max_length testing
molbap 39c1587
Raise if kwargs are specified in two places
molbap 1f73bdf
fix
molbap b3f98ba
Merge branch 'main' into uniform_processors_1
molbap e4d6d12
expand VideoInput
molbap 1e09e4a
fix
molbap d4232f0
fix style
molbap 162b1a7
remove defaults values
molbap 0da1dc3
add comment to indicate documentation on adding kwargs
molbap f955510
Merge branch 'main' into uniform_processors_1
molbap f6f1dac
protect imports
molbap c4b7e84
[run-slow]align
molbap 3ce3608
fix
molbap 6b83e39
remove set() that breaks ordering
molbap 3818b86
test more
molbap 31b7a60
removed unused func
molbap 4072336
[run-slow]align
molbap bcce007
Merge branch 'main' into uniform_processors_1
molbap 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
Oops, something went wrong.
Oops, something went wrong.
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.
should work no? Or does it not update the default for type-hints?
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 it works for sure, this was to have a structured dict for defaults. Can change :)
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, now I remember, it actually can't work like that since Typed Dicts don't support default values, they are made to hold the layout. They can have any attributes however, but it won't pass a value as default -like a
dataclass
would, but in this case we'd lose typing-, hence the manual operationThere 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.
ok got it thanks! Let's maybe comment about 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.
Do we have a comment for future code inspectors? I'm assuming here isn't the best place (we don't want it for all models) but didn't find a corresponding one elsewhere on a quick skim
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.
On that: there's doc in
processing_utils.ProcessingKwargs
, I added a comment nudging users to check there for documentation!