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

Cifar10_model not found #24

Open
benliebersohn opened this issue Aug 4, 2017 · 3 comments
Open

Cifar10_model not found #24

benliebersohn opened this issue Aug 4, 2017 · 3 comments

Comments

@benliebersohn
Copy link

I am having trouble executing the included Theano-MPI examples from within a docker container.
My output is as follows:
root@503d8c1f182a:/workspace/Theano-MPI/examples# python -u test_easgd.py Traceback (most recent call last): File "test_easgd.py", line 12, in <module> modelclass = 'Cifar10_model') File "/usr/local/lib/python2.7/dist-packages/Theano_MPI-1.0-py2.7.egg/theanompi/rules.py", line 173, in init p = subprocess.Popen(command) File "/usr/lib/python2.7/subprocess.py", line 711, in __init__ errread, errwrite) File "/usr/lib/python2.7/subprocess.py", line 1343, in _execute_child raise child_exception OSError: [Errno 2] No such file or directory

It appears to not be finding the Cifar10 model, which I can find plainly in theanompi/models/. However even when I run test_easgd.py in the theanompi folder, it gives me the same error. What can I do to restructure the directories such that the test_easgd.py finds the Cifar10 model?

Thank you

@dlunga
Copy link

dlunga commented Aug 4, 2017

@benliebersohn try this (in test_easgd.py):

from theanompi import EASGD rule=EASGD() rule.init(devices=['cuda0', 'cuda1', 'cuda2'] , modelfile = 'theanompi.models.cifar10', modelclass = 'Cifar10_model') rule.wait()

@hma02
Copy link
Collaborator

hma02 commented Aug 8, 2017

@benliebersohn @dlunga

The way of finding the model file and model class is a bit of hack right now. See here. It requires an absolute path, like something on the PYTHONPATH. For example

modelfile = 'theanompi.models.cifar10'

will work because theanompi is an absolute python package if installed somewhere.

To have a customized model discovered by worker.py, you need to put the current working directory in PYTHONPATH. That is,

export PYTHONPATH=$(pwd):$PYTHONPATH

will make the current folder available.

Doing it this way allows you to work from a random folder with the following files:

launch_session.cfg
modelfile.py

@dlunga
Copy link

dlunga commented Aug 8, 2017

Thanks that makes it easy.

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

3 participants