aeon-toolkit / aeon

A toolkit for machine learning from time series
https://aeon-toolkit.org/
BSD 3-Clause "New" or "Revised" License
1.02k stars 124 forks source link

[MNT] Reduce import time for aeon and its subpackages #1852

Open aadya940 opened 3 months ago

aadya940 commented 3 months ago

Describe the issue

When aeon is freshly built (pip install .) with all optional dependencies. It takes a lot of time to load. Eg: Deep Clusterers have taken anywhere between 1 to 15 minutes in a Jupyter Notebook.

I would say the reason for this is a large dependency to other heavyweight packages like Tensorflow and also a large python code-base. All of these have to be loaded in the RAM for functions to be interpreted by the Python Interpreter.

Suggest a potential alternative/fix

Consider and Discuss adding support for lazy loading in the future (maybe as next year GSoC project). Lazy loading is a technique for waiting to load certain parts of a package until they are needed. Popular packages like the scikits use it.

https://github.com/scientific-python/lazy-loader

Additional context

No response

TonyBagnall commented 3 months ago

good idea