bbalasub1 / glmnet_python

GNU General Public License v3.0
199 stars 94 forks source link

Easier to use setup.py request #1

Closed samuelstjean closed 7 years ago

samuelstjean commented 7 years ago

Hello,

This seems like the official glmnet version form now on, which is great. Quite a few people have written unofficial wrappers over the years, but one thing which would be useful to grab from them would be a setup.py. The present way of loading the lib is to use ctypes (and only work on linux), but others have managed to get something neatly wrapped over f2py, which might be an easier way to get it running on multiple platform

Here is such an example of said setup.py (this is the cleaner one I found, some other also exists)

https://github.com/civisanalytics/python-glmnet

Anyway, for a future improvement, it would make the setup/installation easier and completely managed inside the setup.py.

bbalasub1 commented 7 years ago

Hi,

Thank you for your note. This version of glmnet is well-tested against benchmarks and works for a much broader set of models than other versions currently available.

Your idea of porting it to multiple platforms is the top item on our to-do list.

However, I have not found the bandwidth to get this done.

Would you like to help get this working on multiple platforms?

Thanks, Bala

On Sat, Oct 29, 2016 at 9:56 AM, Samuel St-Jean notifications@github.com wrote:

Hello,

This seems like the official glmnet version form now on, which is great. Quite a few people have written unofficial wrappers over the years, but one thing which would be useful to grab from them would be a setup.py. The present way of loading the lib is to use ctypes (and only work on linux), but others have managed to get something neatly wrapped over f2py, which might be an easier way to get it running on multiple platform

Here is such an example of said setup.py (this is the cleaner one I found, some other also exists)

https://github.com/civisanalytics/python-glmnet

Anyway, for a future improvement, it would make the setup/installation easier and completely managed inside the setup.py.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/bbalasub1/glmnet_python/issues/1, or mute the thread https://github.com/notifications/unsubscribe-auth/AKpDE4EncVr3R1cvzZLBtMMovKXRpZGcks5q43rAgaJpZM4KkKU7 .

samuelstjean commented 7 years ago

I actually played with it a bit as I was redoing my own baremetal thin wrapper just this summer, then plugged in parts for those other unofficial projects for easier building. I am a tad busy for the next two weeks so I can't properly do it right now (found this project on the original glmnet page exactly because my stuff was falling apart with weird import errors from my work computer to my personal laptop), but the two most popular 'forks' seems to be

https://github.com/madrury/glmnet-python https://github.com/civisanalytics/python-glmnet (they even set up a pypi page https://pypi.python.org/pypi/glmnet/1.0.0,so it looks serious)

Maybe they would be willing to put back the improvements they did regarding compatibility/features if you contacted them, it would certainly be much easier long term to get something official in one place rather than a few forks which all offer different stuff.

bbalasub1 commented 7 years ago

Please try reinstalling the glmnet python version again. It is now available in the repo and you should be able to (hopefully) painlessly install it using pip. Please do let us know if it does not work.

kai0511 commented 7 years ago

unable to use it after install it using pip2.7.

from glmnet import glmnet Traceback (most recent call last): File "", line 1, in File "/exeh/exe3/zhaok/.local/lib/python2.7/site-packages/glmnet_python/glmnet.py", line 246 def glmnet(*, x, y, family='gaussian', **options):

Any solution you can offer?

bbalasub1 commented 7 years ago

The current version is not 2.7 compatible. It does run with Python 3.4.4 and GCC 4.4.7. I suggest you try it with a virtualenv.

On Thu, Jun 15, 2017 at 7:58 AM, Kai notifications@github.com wrote:

unable to install it using pip2.7.

from glmnet import glmnet Traceback (most recent call last): File "", line 1, in File "/exeh/exe3/zhaok/.local/lib/python2.7/site-packages/glmnet_python/glmnet.py", line 246 def glmnet(*, x, y, family='gaussian', **options):

Any solution you can offer?

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/bbalasub1/glmnet_python/issues/1#issuecomment-308709770, or mute the thread https://github.com/notifications/unsubscribe-auth/AKpDE0mFzCeQvlasIga1sozZdv-WM8aOks5sERxwgaJpZM4KkKU7 .