-
Notifications
You must be signed in to change notification settings - Fork 2
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 lazy module loading #298
base: master
Are you sure you want to change the base?
Conversation
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.
LGTM. Good idea.
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.
So, from what I understand, every exposed module would be importable by doing from podium import <module>
.
In some cases, I would prefer if we maintained different submodules, for cases of implemented datasets (from podium.datasets import SST, IMDB
) or preprocessing tools, etc.
How difficult/ugly do you think it would be to maintain some degree of import hierarchy?
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.
I like this change since it is sort of more in line what I see from more recent frameworks: flair, huggingface. I know a bit older frameworks like torch, numpy, or scikit-learn still have hierarchy, but if there is no performance difference I don't see much value in keeping imports separate.
@mttk |
Discussed this change with @mttk on Slack.
Features:
__init__.py
but only if the required dependencies are installed (pyarrow for DiskBackedDatasets, datasets for HFDatasetConverter, yake for YAKE).