-
Notifications
You must be signed in to change notification settings - Fork 148
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
[examples] Extract MultiDataLoader/Module to examples/common/data #93
Conversation
[ghstack-poisoned]
…on/data" [ghstack-poisoned]
Codecov Report
@@ Coverage Diff @@
## gh/ivankobzarev/5/base #93 +/- ##
=========================================================
Coverage ? 88.29%
=========================================================
Files ? 34
Lines ? 1837
Branches ? 0
=========================================================
Hits ? 1622
Misses ? 215
Partials ? 0 Continue to review full report at Codecov.
|
@IvanKobzarev has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
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.
Overall these changes look good. One question though: why move the requirements file up a level? I see the value in making a lot of these data utils common (which necessitates at least some dependencies in examples/
), but I think the idea is for each example to have its own distinct set of requirements. For instance, someone importing a generic data util probably does not want to take a dep on DALL-E in general.
Thanks, I agree, it will be better to have separate requirements files per example model. |
…on/data" We want to extract common functionality (MultiDataModule, MultiDataLoader) to be shared between flava and other examples. Introducing `examples/common/data/multidata.py`. To be able to use it from `examples/flava` we need to be in one python package - `examples` => Renaming imports with prefix `flava.`. Training flava after this change will be `python -m flava.train config=...` to run it within `examples` package Differential Revision: [D37188387](https://our.internmc.facebook.com/intern/diff/D37188387) [ghstack-poisoned]
@IvanKobzarev has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
…on/data" We want to extract common functionality (MultiDataModule, MultiDataLoader) to be shared between flava and other examples. Introducing `examples/common/data/multidata.py`. To be able to use it from `examples/flava` we need to be in one python package - `examples` => Renaming imports with prefix `flava.`. Training flava after this change will be `python -m flava.train config=...` to run it within `examples` package Differential Revision: [D37188387](https://our.internmc.facebook.com/intern/diff/D37188387) [ghstack-poisoned]
@IvanKobzarev has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
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.
Other than the one minor comment, this looks good to go.
examples/flava/README.md
Outdated
@@ -21,7 +21,7 @@ First, clone the repo, install `multimodal` and then install requirements for th | |||
git clone https://github.com/facebookresearch/multimodal.git | |||
cd multimodal | |||
pip install -e . | |||
cd examples/flava | |||
cd examples | |||
pip install -r requirements.txt |
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.
pip install -r requirements.txt | |
pip install -r flava/requirements.txt |
…on/data" We want to extract common functionality (MultiDataModule, MultiDataLoader) to be shared between flava and other examples. Introducing `examples/common/data/multidata.py`. To be able to use it from `examples/flava` we need to be in one python package - `examples` => Renaming imports with prefix `flava.`. Training flava after this change will be `python -m flava.train config=...` to run it within `examples` package Differential Revision: [D37188387](https://our.internmc.facebook.com/intern/diff/D37188387) [ghstack-poisoned]
@IvanKobzarev has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
Stack from ghstack (oldest at bottom):
We want to extract common functionality (MultiDataModule, MultiDataLoader) to be shared between flava and other examples.
Introducing
examples/common/data/multidata.py
. To be able to use it fromexamples/flava
we need to be in one python package -examples
=>Renaming imports with prefix
flava.
.Training flava after this change will be
python -m flava.train config=...
to run it withinexamples
packageDifferential Revision: D37188387