Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem importing functions from module imodels.importance #185

Closed
facusapienza21 opened this issue Jul 31, 2023 · 2 comments
Closed

Problem importing functions from module imodels.importance #185

facusapienza21 opened this issue Jul 31, 2023 · 2 comments

Comments

@facusapienza21
Copy link

Hi!

I was trying to run some of the examples in the mdi+ demo (thanks @tiffanymtang for the reference!), but I notice the imports of the module don't work:

from imodels.importance import RandomForestPlusRegressor, RandomForestPlusClassifier, \
    RidgeRegressorPPM, LassoRegressorPPM, IdentityTransformer
from imodels.importance.rf_plus import _fast_r2_score

I checked and it seems that the __init__.py present in the last release of the package doesn't include the respective includes. This is what is present in the __init__.py of the last install:

"""
Feature importance methods for black box models
"""

from .representation import TreeTransformer
from .r2f import R2F

while the right content should be what is currently in the repository init file.

I was able to run the example by installing directly from the repository, but I thought it may be worth reporting this since other users may encounter the same issue!

@tiffanymtang
Copy link
Collaborator

@facusapienza21 Thanks for making note of this! @csinva I'm not sure how you prefer to manage new releases of imodels, but please let me know if there's anything you need from me with the MDI+ additions. Thanks both!

@csinva
Copy link
Owner

csinva commented Aug 1, 2023

Ah thanks both for pointing this out! Just bumped the version that includes the updated init file, so should work smoothly now :)

@csinva csinva closed this as completed Aug 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants