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

pymongo_conn #6

Open
SmatterTalk opened this issue Jul 18, 2018 · 10 comments
Open

pymongo_conn #6

SmatterTalk opened this issue Jul 18, 2018 · 10 comments

Comments

@SmatterTalk
Copy link

Hi

how should I set pymongo_conn into the environment variable in MacOS

@JonnoFTW
Copy link
Owner

Make sure you have mongodb installed and created a user with readWrite permission on a database called mack0242, (I should really change this)

From terminal run:

export pymongo_conn=mongodb://username:password@localhost:27017/admin

@SmatterTalk
Copy link
Author

Hi
thanks for your direction and I've solved this problem.
And encounter another problem

(python2) SmatterTalk:traffic-prediction wuyao$ python main.py 1 volume_previous5-1.csv 
Using TensorFlow backend.
Started: 2018-07-18 15:05:57.816792
optimising network for 1 steps
Traceback (most recent call last):
  File "main.py", line 143, in <module>
    extra={'steps': steps, 'FPATH': file_path}
TypeError: minimize() got an unexpected keyword argument 'extra'

Is there any place I setting incorrect?

Sincerely Regards

@JonnoFTW
Copy link
Owner

I modified hyperas a bit, I should probably have the requirements install my fork, do:

pip uninstall hyperas
pip install git+https://github.com/JonnoFTW/hyperas

@JonnoFTW
Copy link
Owner

@SmatterTalk I fixed this in the latest code, don't worry about installing my hyperas fork.

Pull this repo again, do pip install -U hyperas and then read the updated README.md for updated instructions

@SmatterTalk
Copy link
Author

SmatterTalk commented Jul 19, 2018

Hi

I've updated the code again and still have some problems with it. [email protected] here is my email, could you contact we or give me your contact methods then I could ask you question by sending an email instead of this way, cause the code is still now running successfully T_T
please~

@JonnoFTW
Copy link
Owner

Please post your issue here, it might help someone else in the future.

@SmatterTalk
Copy link
Author

when running export pymongo_conn=mongodb://username:password@localhost:27017/admin did I need to change to my username and password? Is this need the online database? or can I only local database created database "mack0242"

@JonnoFTW
Copy link
Owner

You need to install mongodb and create a user, there's guides here:

https://docs.mongodb.com/manual/installation/

You don't really even need to use it (it's only to store results for later review), you can just comment out the lines 173, 174, 175, 176, 191, 192 in main.py

@SmatterTalk
Copy link
Author

Thanks, I've commented out those lines and I just want to run it successfully.
For now, when I run

pip uninstall hyperas
pip install git+https://github.com/JonnoFTW/hyperas

and python main.py 1 volume_previous5-1.csv 0.75 10 20 it shows minimize() got an unexpected keyword argument 'functions'

however when running pip install -U hyperas and python main.py 1 volume_previous5-1.csv 0.75 10 20
it shows

  File "main.py", line 187, in <module>
    functions=[get_steps_extra, get_fpath, create_dataset, fit_to_batch]
  File "/Users/wuyao/anaconda2/envs/python2/lib/python2.7/site-packages/hyperas/optim.py", line 67, in minimize
    verbose=verbose)
  File "/Users/wuyao/anaconda2/envs/python2/lib/python2.7/site-packages/hyperas/optim.py", line 133, in base_minimizer
    return_argmin=True),
  File "/Users/wuyao/anaconda2/envs/python2/lib/python2.7/site-packages/hyperopt/fmin.py", line 307, in fmin
    return_argmin=return_argmin,
  File "/Users/wuyao/anaconda2/envs/python2/lib/python2.7/site-packages/hyperopt/base.py", line 635, in fmin
    return_argmin=return_argmin)
  File "/Users/wuyao/anaconda2/envs/python2/lib/python2.7/site-packages/hyperopt/fmin.py", line 314, in fmin
    pass_expr_memo_ctrl=pass_expr_memo_ctrl)
  File "/Users/wuyao/anaconda2/envs/python2/lib/python2.7/site-packages/hyperopt/base.py", line 786, in __init__
    pyll.toposort(self.expr)
  File "/Users/wuyao/anaconda2/envs/python2/lib/python2.7/site-packages/hyperopt/pyll/base.py", line 715, in toposort
    assert order[-1] == expr
TypeError: 'generator' object has no attribute '__getitem__'

Is there any place I am setting wrong

@JonnoFTW
Copy link
Owner

Can you please try running with python3?

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

2 participants