HIPS / Spearmint

Spearmint Bayesian optimization codebase
Other
1.54k stars 328 forks source link

Change scipy.weave to weave #105

Open Alaya-in-Matrix opened 7 years ago

Alaya-in-Matrix commented 7 years ago

When running the example "simple", I get this error message:

Traceback (most recent call last):
  File "/home/alaya/Downloads/Spearmint/spearmint/main.py", line 494, in <module>
    main()
  File "/home/alaya/Downloads/Spearmint/spearmint/main.py", line 254, in main
    chooser_module = importlib.import_module('spearmint.choosers.' + options['chooser'])
  File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
  File "/home/alaya/Downloads/Spearmint/spearmint/choosers/default_chooser.py", line 197, in <module>
    from ..models.abstract_model import function_over_hypers
  File "/home/alaya/Downloads/Spearmint/spearmint/models/__init__.py", line 1, in <module>
    from gp            import GP
  File "/home/alaya/Downloads/Spearmint/spearmint/models/gp.py", line 194, in <module>
    from ..kernels                import Matern52, Noise, Scale, SumKernel, TransformKernel
  File "/home/alaya/Downloads/Spearmint/spearmint/kernels/__init__.py", line 1, in <module>
    from matern           import Matern52
  File "/home/alaya/Downloads/Spearmint/spearmint/kernels/matern.py", line 187, in <module>
    import kernel_utils
  File "/home/alaya/Downloads/Spearmint/spearmint/kernels/kernel_utils.py", line 187, in <module>
    import scipy.weave
ImportError: No module named weave

According to this link:

weave has been moved out into its own separate project.

So maybe weave instead of scipy.weave should be imported?

By replacing all scipy.weave to weave, the "simple" example now works well.

I am using python 2.7.12, and the version of scipy is 0.19.0, the version of numpy is 1.12.1

martinsimon88 commented 6 years ago

Making the change works in PESM branch as well.

cwj006 commented 3 years ago

put the weave file into the scipy file. Then it works.