lina-usc / pylossless

🧠 EEG Processing pipeline that annotates continuous data
https://pylossless.readthedocs.io/en/latest/
MIT License
15 stars 8 forks source link

Should `pytorch` and `scikit` be hard or optional deps #149

Closed scott-huberty closed 8 months ago

scott-huberty commented 8 months ago

Following up on #147 ,

should we make pytorch a hard dependency since it is required for the IC label step?

I'm torn, because on the one hand I don't like when packages dont include a dependency, only to make the user find out when they run the code (mne-qt-browser does this, as none of the qt frameworks are intalled by default when you install mne-qt-browser). Since by default we do label components during pipeline.run, I'm sure many users will be annoyed to find that after runnign 2 ICA decompositions, their code crashes because they dont have torch.

On the other hand, torch is a pretty big package so it is nice to have the option not to install it.

You can make the same argument for scikit, which we currently include as a hard dependency. Both fastica and picard use it, so the only time a user wouldnt need it is if they only ever used infomax. Since we use fastica by default for the first ICA, most users would hit an error during pipeline.run if we removed the dep.

scott-huberty commented 8 months ago

Pytorch is an optional dep, scikit remains hard.