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

Unable to work with FLAML in Kaggle #433

Closed
GDGauravDutta opened this issue Jan 26, 2022 · 10 comments
Closed

Unable to work with FLAML in Kaggle #433

GDGauravDutta opened this issue Jan 26, 2022 · 10 comments

Comments

@GDGauravDutta
Copy link

Error :
IImportError Traceback (most recent call last)
/tmp/ipykernel_33/3768597154.py in
----> 1 from flaml import AutoML
2 automl = AutoML()

/opt/conda/lib/python3.7/site-packages/flaml/init.py in
1 from flaml.searcher import CFO, BlendSearch, FLOW2, BlendSearchTuner
----> 2 from flaml.automl import AutoML, logger_formatter
3 from flaml.onlineml.autovw import AutoVW
4 from flaml.version import version
5 import logging

/opt/conda/lib/python3.7/site-packages/flaml/automl.py in
22 import logging
23 import json
---> 24 from .ml import (
25 compute_estimator,
26 train_estimator,

/opt/conda/lib/python3.7/site-packages/flaml/ml.py in
6 import numpy as np
7 import pandas as pd
----> 8 from sklearn.metrics import (
9 mean_squared_error,
10 r2_score,

ImportError: cannot import name 'mean_absolute_percentage_error' from 'sklearn.metrics' (/opt/conda/lib/python3.7/site-packages/sklearn/metrics/init.py)

@sonichi
Copy link
Collaborator

sonichi commented Jan 26, 2022

mean_absolute_percentage_error is only available from scikit-learn>=0.24.
Are you able to install scikit-learn>=0.24 in Kaggle?

@GDGauravDutta
Copy link
Author

Name Version Build Channel

scikit-learn 1.0.2 py37hf9e9bfc_0 conda-forge

@sonichi
Copy link
Collaborator

sonichi commented Jan 26, 2022

No import error for me: https://www.kaggle.com/sonichi/notebooka80575f30b

@GDGauravDutta
Copy link
Author

Not able to see your notebook

@sonichi
Copy link
Collaborator

sonichi commented Jan 27, 2022

Not able to see your notebook

Could you try again now?

@GDGauravDutta
Copy link
Author

still not working

@sonichi
Copy link
Collaborator

sonichi commented Jan 27, 2022

still not working

Do you mean you still can't see my notebook? I've made it public and tested.

@GDGauravDutta
Copy link
Author

still not working

Do you mean you still can't see my notebook? I've made it public and tested.

It's visible now

@GDGauravDutta
Copy link
Author

I found that issue only appear only if pandas are imported first before Flaml

@sonichi
Copy link
Collaborator

sonichi commented Jan 28, 2022

I found that issue only appear only if pandas are imported first before Flaml

It doesn't fail for me.

@sonichi sonichi closed this as completed Jun 17, 2022
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

2 participants