HIPS / Spearmint

Spearmint Bayesian optimization codebase
Other
1.55k stars 329 forks source link

Problem installing Spearmint! and testing the branin example! #14

Closed Mehrian closed 9 years ago

Mehrian commented 9 years ago

Dear all I'm a new user and trying to install Spearmint package for Bayesian optimization and I have problem using the software. My problem is with the third step that is mentioned in the site:

STEP 3: Running spearmint

  1. Start up a MongoDB daemon instance: mongod --fork --logpath <path/to/logfile> --dbpath <path/to/dbfolder>
  2. Run spearmint: python main.py </path/to/experiment/directory>)

I don't know where is the logpath and dbpath for mongod..... Would you please help me to install the package and run the branin example!

Thank you in advance, Best wishes, Mohammad

JasperSnoek commented 9 years ago

Hi Mohammad, the logpath and dbpath are actually things you set yourself. Mongodb writes text logs to the log file and puts database files into dbpath.

Jasper

Mehrian commented 9 years ago

Hi Jasper Thanks for answering The problem is that I don't know how to set logpath and dbpath!! Sorry, It might be a very elementary procedure :) but as I said, I'm a beginner! thank you in advance, Mohammad

mgelbart commented 9 years ago

Hi Mohammad,

You need to create an empty file and an empty directory. For example, in a UNIX shell,

touch logfile mkdir datadir mongod --fork --logpath logfile --dbpath datadir

The first line creates an empty file called "logfile". The second line creates an empty directory called "datadir". The third line starts MongoDB and tells it to store the logs and data in those places.

Mike

Mehrian commented 9 years ago

Hi Mike Thanks! I'm using windows 8.1 Would you please let me know where to write these lines? In command prompt, I'll be in the following address: C:\Users\Mohammad

Thanks, Mohammad

mgelbart commented 9 years ago

Hi Mohammad,

I have not used Spearmint or MongoDB on Windows. Let's see if someone else with Windows experience can give you some advice.

Mike

JasperSnoek commented 9 years ago

Sorry, I have also never tried this. This may be a reasonable place to start though: http://docs.mongodb.org/manual/tutorial/install-mongodb-on-windows/

Mehrian commented 9 years ago

Dear Jasper and Mike! Thank you so much for your responses! I installed Ubuntu on my Laptop! and and I don't have problem installing the package! In this step I execute the command : mongod --fork --logpath logfile --dbpath datadir Up to this step every thing is OK and it says: child process started successfully, parent exiting

Now, when I want to Run spearmint using the command(python main.py) in the directory : Spearmint-master/spearmint

There is an error saying: ImportError: No module named spearmint.utils.database.mongodb

Do you have any idea about this? Thank you so much! Mohammad

mgelbart commented 9 years ago

Just to confirm -- did you do the "pip install" (step 3 of the installation instructions)?

Mehrian commented 9 years ago

Yes I did it once!

Mehrian commented 9 years ago

I'm wondering if I have to do pip install every time?

mgelbart commented 9 years ago

Hmm... You should only need to do the pip install once on your Ubuntu system. What happens if you open python in the terminal and then type "import spearmint"?

Mehrian commented 9 years ago

In which directory I have to type?

Mehrian commented 9 years ago

Dear Mike I have another question! I want to try the Branin.py example, in step 3, I just start the mongoDB and then run the Spearmint!! So, where is branin.py???

Sorry, If my questions are very elementary! (It is for the first time! :))) Best Regards, Mohammad

alyato commented 7 years ago

hi @Mehrian I want to use the Spearmint becasue it was used by the paper

Application of Deep Convolutional Neural Networks for Detecting Extreme Weather in Climate Datasets

Do you give me some advice how to use spearmint? Thanks

Holmeyoung commented 6 years ago

hi @Mehrian ,how did you solve the problem

There is an error saying: ImportError: No module named spearmint.utils.database.mongodb

i have meet the same problem. sad...