podium
podium copied to clipboard
Add lazy module loading
Discussed this change with @mttk on Slack.
Features:
- lazy module loading
- makes it possible to import DiskBackedDataset, HFDatasetConverter and YAKE from the top level
__init__.pybut only if the required dependencies are installed (pyarrow for DiskBackedDatasets, datasets for HFDatasetConverter, yake for YAKE).
@mttk from podium.datasets import SST, IMDB still works just fine. The import hierarchy is left untouched. I understand what you are saying, but I think the hierarchy is irrelevant to the user and by exposing the public componets in the top level __init__.py , it's easier for the user to reach them.