chovanecm / sacredboard

Dashboard for sacred. Monitor and access your past machine learning experiments.
MIT License
184 stars 39 forks source link

Sacredboard fails when started without parameters. #67

Closed icouckuy closed 7 years ago

icouckuy commented 7 years ago

I want to try out the develop branch to test the metrics API + plots with sacred 0.7b2. However I do get the following error:

Traceback (most recent call last):
  File "/home/icouckuy/.local/lib/python3.6/site-packages/flask/app.py", line 1982, in wsgi_app
    response = self.full_dispatch_request()
  File "/home/icouckuy/.local/lib/python3.6/site-packages/flask/app.py", line 1614, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/home/icouckuy/.local/lib/python3.6/site-packages/flask/app.py", line 1517, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/home/icouckuy/.local/lib/python3.6/site-packages/flask/_compat.py", line 33, in reraise
    raise value
  File "/home/icouckuy/.local/lib/python3.6/site-packages/flask/app.py", line 1612, in full_dispatch_request
    rv = self.dispatch_request()
  File "/home/icouckuy/.local/lib/python3.6/site-packages/flask/app.py", line 1598, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/home/icouckuy/.local/lib/python3.6/site-packages/sacredboard/app/webapi/routes.py", line 41, in api_runs
    return get_runs()
  File "/home/icouckuy/.local/lib/python3.6/site-packages/sacredboard/app/webapi/runs.py", line 27, in get_runs
    data = current_app.config["data"]
KeyError: 'data'

I tried dropping the sacred database in mongodb and ran sacredboard on an empty database but I got the same error, as well as after doing some new sacred experiments again.

Any idea where I can look?

Versions: pymongo==3.4.0 sacred==0.7b2 sacredboard==0.2

chovanecm commented 7 years ago

Hi,

it looks like a Sacredboard issue. Could you perhaps tell me

Thank you.

icouckuy commented 7 years ago

Hi,

I just run "sacredboard" which also automatically opens my browse and displays an ajax error. So I don't know if the error occurs before or after loading the website.

However, I just found the problem. I missed the small piece of information right at the start of sacredboard's console output: "Must specify either a mongodb instance or a path to a file storage."

So I ran sacredboard -m sacred which works! It seems sacredboard doesn't use the default value anymore.

chovanecm commented 7 years ago

Great that you found the reason. Removing the default option was not my intention, thank you for noticing it.

chovanecm commented 7 years ago

I changed it to print the error message and exit. Please use sacredboard -m sacred for now.