elephaint / pgbm

Probabilistic Gradient Boosting Machines
Apache License 2.0
143 stars 20 forks source link

Is the current version of pgbm still compatible with the scikit-learn API? #6

Closed flippercy closed 3 years ago

flippercy commented 3 years ago

Hi @elephaint:

Is the current version of pgbm still compatible with the scikit-learn API? I tried to import the wrapper, PGBMRegressor, but got an error:

from pgbm import PGBMRegressor

ImportError Traceback (most recent call last) /tmp/ipykernel_22348/3286960087.py in ----> 1 from pgbm import PGBMRegressor

ImportError: cannot import name 'PGBMRegressor' from 'pgbm' (/data/home/r-yucao/.local/lib/python3.7/site-packages/pgbm/init.py)

Thank you.

elephaint commented 3 years ago

Hi,

Yes, I did not make any changes and checked the source; PGBMRegressor is part of both pgbm and pgbm_nb. Perhaps a fresh reinstall should do the trick? (I suspect the init.py of pgbm has not been updated in your environment, but don't know why that happens).

Best,

Olivier


From: flippercy @.> Sent: Tuesday, September 21, 2021 12:00:03 AM To: elephaint/pgbm @.> Cc: Olivier Sprangers @.>; Mention @.> Subject: [elephaint/pgbm] Is the current version of pgbm still compatible with the scikit-learn API? (#6)

Hi @elephainthttps://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Felephaint&data=04%7C01%7C%7C96701dbe838d413867bd08d97c82014a%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637677720071768042%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=DjNU8pL7mgH3QV1uTXUPXIA2RMv2bpTraM0K9qu4wjM%3D&reserved=0:

Is the current version of pgbm still compatible with the scikit-learn API? I tried to import PGBMRegressor but got an error:

from pgbm import PGBMRegressor

ImportError Traceback (most recent call last) /tmp/ipykernel_22348/3286960087.py in ----> 1 from pgbm import PGBMRegressor

ImportError: cannot import name 'PGBMRegressor' from 'pgbm' (/data/home/r-yucao/.local/lib/python3.7/site-packages/pgbm/init.py)

Thank you.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Felephaint%2Fpgbm%2Fissues%2F6&data=04%7C01%7C%7C96701dbe838d413867bd08d97c82014a%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637677720071777999%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=Ttg%2FrWUQMd%2BYtLSxF0JXR1ZFt%2FHtcesoDX7ztXwTKvI%3D&reserved=0, or unsubscribehttps://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAKYHS4ACBJ2XELO5OM7VMVTUC6VGHANCNFSM5EM5IQAA&data=04%7C01%7C%7C96701dbe838d413867bd08d97c82014a%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637677720071787955%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=PFHq9LS9ssoOImAIKiR4lBeJ5lThdXCWLpkga1vbUD0%3D&reserved=0. Triage notifications on the go with GitHub Mobile for iOShttps://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fapps.apple.com%2Fapp%2Fapple-store%2Fid1477376905%3Fct%3Dnotification-email%26mt%3D8%26pt%3D524675&data=04%7C01%7C%7C96701dbe838d413867bd08d97c82014a%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637677720071787955%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=iVqgVDzdJT1Fv5IE8Oj%2FbBOpGtUPpSpttZvCHxOAInY%3D&reserved=0 or Androidhttps://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fplay.google.com%2Fstore%2Fapps%2Fdetails%3Fid%3Dcom.github.android%26referrer%3Dutm_campaign%253Dnotification-email%2526utm_medium%253Demail%2526utm_source%253Dgithub&data=04%7C01%7C%7C96701dbe838d413867bd08d97c82014a%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637677720071797911%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=MG0kvVLpWkZbVJQgZ82gxVvcVVOuqhtzaVPTlN6Ub3Q%3D&reserved=0.

flippercy commented 3 years ago

@elephaint:

Thank you for the response. You are correct -- the problem disappeared after I re-installed the package.