We had type annotations for tuple everywhere, but this is not great because it doesn't tell us what is inside of the tuple. As such, I changed it to Iterable[torch.Tensor]. I also tried to cleanup the dispatch code in all places. This PR, however, does not support input dictionaries right now. I think the "modality dispatch" abstraction in #115 should be pulled out and rebased on this PR.
Type of change
Please check all relevant options.
[ ] Improvement (non-breaking)
[ ] Bug fix (non-breaking)
[ ] New feature (non-breaking)
[x] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] This change requires a documentation update
Testing
Please describe the tests that you ran to verify your changes. Consider listing any relevant details of your test configuration.
[ ] make test
Before submitting
[ ] The title is self-explanatory and the description concisely explains the PR
[ ] My PR does only one thing, instead of bundling different changes together
[ ] I list all the breaking changes introduced by this pull request
[ ] I have commented my code
[ ] I have added tests that prove my fix is effective or that my feature works
[ ] New and existing unit tests pass locally with my changes
[ ] I have run pre-commit hooks with pre-commit run -a command without errors
What does this PR do?
We had type annotations for
tuple
everywhere, but this is not great because it doesn't tell us what is inside of thetuple
. As such, I changed it toIterable[torch.Tensor]
. I also tried to cleanup the dispatch code in all places. This PR, however, does not support input dictionaries right now. I think the "modality dispatch" abstraction in #115 should be pulled out and rebased on this PR.Type of change
Please check all relevant options.
Testing
Please describe the tests that you ran to verify your changes. Consider listing any relevant details of your test configuration.
make test
Before submitting
pre-commit run -a
command without errorsDid you have fun?
Make sure you had fun coding 🙃