dswah / pyGAM

[HELP REQUESTED] Generalized Additive Models in Python
https://pygam.readthedocs.io
Apache License 2.0
871 stars 159 forks source link

Better handling of terms = 'auto' #290

Open ldefour opened 3 years ago

ldefour commented 3 years ago

Hi,

First of all, thanks a lot for this amazing package!

I have encountered the following issue: When training in parallel (with joblib) multiple pyGAM models w/o specifying the argument terms then it fails in the code snippet below. image

The problem is that the condition self.terms is not 'auto' is not the same than self.terms != 'auto'. The is not statement makes a reference comparison that which is not very handy when doing parallel computing, while the other is really comparing string values.

If you confirm that what you want to do is to check that self.terms is a different string than 'auto', then it would be great if you could change the condition to self.terms != 'auto'.

Thanks in advance for your support!

ldefour commented 3 years ago

Actually I see that I have pyGAM 0.8.0 but in the current master branch this issue has been resolved! Would be awesome to upgrade the latest release :)