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

[Error when setting custom BO params] #20

Closed
oort77 opened this issue Dec 17, 2021 · 2 comments
Closed

[Error when setting custom BO params] #20

oort77 opened this issue Dec 17, 2021 · 2 comments
Labels
bug Something isn't working

Comments

@oort77
Copy link

oort77 commented Dec 17, 2021

Describe the bug

Jupyter notebook returns an error: "NameError: name 'Integer' is not defined"


To Reproduce

atom.run(
    models=["GBM", "XGB", "CATB", "LGB"],
    metric=["roc_auc_ovr", "f1_weighted"],
    n_calls=25,
    n_initial_points=10,
    bo_params={"dimensions":[Integer(100, 1000, name="n_estimators"),  
                            Integer(3, 6, name="max_depth"),   
                            Real(0.01, 1, "log-uniform", name="learning_rate")],  
                            "base_estimator":"RF", "max_time":10000},  
    n_bootstrap=5,
)```



<br>

## Expected behavior
<!--
A clear and concise description of what you expected to happen.
-->
Expected to go ahead with running atom


<br>

## Additional context
<!--
Add any other context or screenshots about the problem here.
-->

<img width="1083" alt="Screenshot 2021-12-17 at 23 31 30" src="https://user-images.githubusercontent.com/73858914/146605243-9dcc5464-7c54-4c33-b66e-b5aae109ec4e.png">


<br>

## Version
<!--
Please run the following code snippet and paste the output here:
 
import atom
print(atom.__version__)
-->
The latest
@oort77 oort77 added the bug Something isn't working label Dec 17, 2021
@tvdboom
Copy link
Owner

tvdboom commented Dec 18, 2021

You need to import Integer and Real from scikit-optimize. Type this at the top of the notebook:

from skopt.space.space import Real, Integer

@oort77
Copy link
Author

oort77 commented Dec 19, 2021

Thank you!

@tvdboom tvdboom closed this as completed Dec 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants