-
Notifications
You must be signed in to change notification settings - Fork 147
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
[Unification] Move all encoders/transformers to models folders #239
Conversation
[ghstack-poisoned]
…ders" [ghstack-poisoned]
Codecov Report
@@ Coverage Diff @@
## gh/RdoubleA/28/base #239 +/- ##
======================================================
Coverage ? 92.12%
======================================================
Files ? 50
Lines ? 3059
Branches ? 0
======================================================
Hits ? 2818
Misses ? 241
Partials ? 0 Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
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.
there should be a change in the CLIP import statement in videoclip.
also maybe test/models/albef/test_albef.py
should be renamed to test/models/albef/test_model.py
(and similar change for clip and flava) since the model is now at model.py
?
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.
Looks good overall. One question: why are the architecture tests getting moved around in this PR?
test/models/clip/test_clip.py
Outdated
from torchmultimodal.modules.encoders.clip_resnet_encoder import ResNetForCLIP | ||
from torchmultimodal.modules.encoders.clip_text_encoder import CLIPTextEncoder | ||
from torchmultimodal.models.clip.model import CLIP | ||
from torchmultimodal.models.clip.resnet_encoder import ResNetForCLIP |
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.
Just wondering, do we wanna just call this image_encoder to be consistent with what we have for other models? (I know Ankita has a PR coming in for CLIP ViT encoder, so maybe we wanna keep things as you have them to keep these in separate files?)
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.
maybe we can place both in an image_encoder.py
file for CLIP, what do you think? cc @ankitade
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.
This sounds good to me. Ultimately will leave it up to Ankita as she is working more closely with the CLIP code these days
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 image_encoder.py is fine
those tests should've been moved already in an old PR but they weren't for some reason, so I just went ahead and did it in this 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.
Looks good to me pending the decision on the CLIP image encoders
…ders" [ghstack-poisoned]
@RdoubleA has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
…ders" Differential Revision: [D38506859](https://our.internmc.facebook.com/intern/diff/D38506859) ## Summary Move all model specific encoders and transformers from `modules/encoders/` and `modules/layers/transformer.py` to their corresponding model specific folders, following the naming convention `models/<model_name>/<modality>_encoder.py`. The encoders folder will remain for general use encoders. ## Test plan `pytest -vv` [ghstack-poisoned]
@RdoubleA has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
…ders" Differential Revision: [D38506859](https://our.internmc.facebook.com/intern/diff/D38506859) ## Summary Move all model specific encoders and transformers from `modules/encoders/` and `modules/layers/transformer.py` to their corresponding model specific folders, following the naming convention `models/<model_name>/<modality>_encoder.py`. The encoders folder will remain for general use encoders. ## Test plan `pytest -vv` [ghstack-poisoned]
@RdoubleA has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
…ders" Differential Revision: [D38506859](https://our.internmc.facebook.com/intern/diff/D38506859) ## Summary Move all model specific encoders and transformers from `modules/encoders/` and `modules/layers/transformer.py` to their corresponding model specific folders, following the naming convention `models/<model_name>/<modality>_encoder.py`. The encoders folder will remain for general use encoders. ## Test plan `pytest -vv` [ghstack-poisoned]
@RdoubleA has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
Stack from ghstack (oldest at bottom):
Differential Revision: D38506859
Summary
Move all model specific encoders and transformers from
modules/encoders/
andmodules/layers/transformer.py
to their corresponding model specific folders, following the naming conventionmodels/<model_name>/<modality>_encoder.py
. The encoders folder will remain for general use encoders.Test plan
pytest -vv