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

Visualization not working #308

Closed
kination opened this issue Jan 22, 2019 · 6 comments
Closed

Visualization not working #308

kination opened this issue Jan 22, 2019 · 6 comments

Comments

@kination
Copy link
Contributor

Hello.
I faced on error when:

import optuna

study = optuna.create_study()
...
optuna.visualization.plot_intermediate_values(study)

this shows:

AttributeError                            Traceback (most recent call last)
<ipython-input-11-04cb7fde5fca> in <module>
----> 1 optuna.visualization.plot_intermediate_values(study)

AttributeError: module 'optuna' has no attribute 'visualization'

Do I have to do something for visualization?

@g-votte
Copy link
Member

g-votte commented Jan 22, 2019

Hi. Thanks for reporting the issue.

Have you installed Optuna from master branch?

The visualization module has not been released yet in PyPi, but just in master branch. Thus, current pip installation may cause the error: AttributeError: module 'optuna' has no attribute 'visualization'.

@kination
Copy link
Contributor Author

@g-votte okay thanks! I'm testing with pip pkg manager, so it was the reason.

@AlvinLXS
Copy link

hello,i have faced a similar problem, look like this:

D:\Anaconda\python.exe E:/pytorch_scratch/optuna_example.py
Traceback (most recent call last):
File "E:/pytorch_scratch/optuna_example.py", line 16, in
study = optuna.create_study()
AttributeError: module 'optuna' has no attribute 'create_study'

an interesting phenomenon is that when I run this code in Jupyter, it works well, but this error occurred when I run this demo in Pycharm

@AlvinLXS
Copy link

hello,i have faced a similar problem, look like this:

D:\Anaconda\python.exe E:/pytorch_scratch/optuna_example.py
Traceback (most recent call last):
File "E:/pytorch_scratch/optuna_example.py", line 16, in
study = optuna.create_study()
AttributeError: module 'optuna' has no attribute 'create_study'

an interesting phenomenon is that when I run this code in Jupyter, it works well, but this error occurred when I run this demo in Pycharm

I have finished this problem, please check the name of the file. The reason i met the problem is that there is a file named optuna.py.

@Chidu2000
Copy link

Traceback (most recent call last):
File "/home/ubuntu/Downloads/Pensieve-DRL-Master-thesis/pensieve-pytorch/optuna.py", line 219, in
main()
File "/home/ubuntu/Downloads/Pensieve-DRL-Master-thesis/pensieve-pytorch/optuna.py", line 206, in main
study = optuna.create_study(direction='minimize')

AttributeError: module 'optuna' has no attribute 'create_study'

@nzw0301
Copy link
Member

nzw0301 commented Mar 25, 2024

Rename your file name except for optuna or package names.

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

6 participants