You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since #130 (2c21236), libemg/init.py ends with from libemg import _discrete_models, whose submodules import torch and tslearn at module level.
As a result, any import libemg, even just from libemg.data_handler import OnlineDataHandler, now loads torch.
torch and tslearn are now hard install deps for users who never touch discrete models.
import libemg start-up time grew significantly (torch init).
On Windows, any consumer that imports a Qt binding before libemg now hits torch's well-known DLL conflict (Qt's Qt*\bin shadowing the runtimes
c10.dll needs → WinError 1114). Pre-Latest #130 consumers were insulated because libemg didn't load torch.
Possible fix :
Drop the from libemg import _discrete_models line — let users opt in with from libemg._discrete_models import ….
Lazy-import torch/tslearn inside the discrete-model classes rather than at module top.
Move torch / tslearn to an optional extra (libemg[discrete]).
Happy to PR whichever direction maintainers prefer.
Since #130 (2c21236), libemg/init.py ends with from libemg import _discrete_models, whose submodules import torch and tslearn at module level.
As a result, any import libemg, even just from libemg.data_handler import OnlineDataHandler, now loads torch.
Reproduction
pip install libemg
python -c "from libemg.data_handler import OnlineDataHandler; import sys; print('torch' in sys.modules)"
True (was False pre-#130)
Results
c10.dll needs → WinError 1114). Pre-Latest #130 consumers were insulated because libemg didn't load torch.
Possible fix :
Drop the from libemg import _discrete_models line — let users opt in with from libemg._discrete_models import ….
Lazy-import torch/tslearn inside the discrete-model classes rather than at module top.
Move torch / tslearn to an optional extra (libemg[discrete]).
Happy to PR whichever direction maintainers prefer.