SelfExplainML / PiML-Toolbox

PiML (Python Interpretable Machine Learning) toolbox for model development & diagnostics
https://selfexplainml.github.io/PiML-Toolbox
Apache License 2.0
912 stars 109 forks source link

Very slow import #47

Closed mat-ej closed 8 months ago

mat-ej commented 8 months ago

Hi PiML team,

I cant wait to try out your toolbox, however I run into issues with the import itself.

from piml import Experiment 

takes about two-three minutes. And I get the following warnings

[.venv/lib/python3.10/site-packages/pygam/pygam.py:276](https://file+.vscode-resource.vscode-cdn.net/Users/matejuhrin/repo-others/solar-generation/.venv/lib/python3.10/site-packages/pygam/pygam.py:276): SyntaxWarning: "is" with a literal. Did you mean "=="?
  if self.terms is 'auto':
SyntaxWarning: "is not" with a literal. Did you mean "!="?
  if (self.terms is not 'auto') and not (isinstance(self.terms, (TermList, Term, type(None)))): 
...

Is it possible to not import pyGAM or in other ways speed up the whole import procedure ?

My python is

'3.10.11 (main, Jul  3 2023, 18:02:14) [Clang 14.0.3 (clang-1403.0.22.14.1)]'
i386

thank you and have a great day.

mat-ej commented 8 months ago

Apologies, the issue was on my side, when rerunning the jupyter multiple times, the time for import got reasonable.