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

Merging #307 appears to have caused 'import caffe_pb2' errors on Ubuntu 14.04 AWS #327

Closed
davidsmd opened this issue Sep 23, 2015 · 6 comments
Labels

Comments

@davidsmd
Copy link

Sorry, python is not really my thing, so I can't be much more helpful than that.

Here is the error:

libdc1394 error: Failed to initialize libdc1394
Traceback (most recent call last):
  File "/home/ubuntu/digits/digits-devserver", line 44, in <module>
    from digits.webapp import app, socketio, scheduler
  File "/home/ubuntu/digits/digits/webapp.py", line 8, in <module>
    import digits.scheduler
  File "/home/ubuntu/digits/digits/scheduler.py", line 18, in <module>
    from model import ModelJob
  File "/home/ubuntu/digits/digits/model/__init__.py", line 3, in <module>
    from job import ModelJob
  File "/home/ubuntu/digits/digits/model/job.py", line 4, in <module>
    from . import tasks
  File "/home/ubuntu/digits/digits/model/tasks/__init__.py", line 4, in <module>
    from caffe_train import CaffeTrainTask
  File "/home/ubuntu/digits/digits/model/tasks/caffe_train.py", line 13, in <module>
    import caffe_pb2
ImportError: No module named caffe_pb2

Configuration is:

  • Cuda 7.0
  • CuDNN v3
  • Caffe (nvidia fork) 0.13
  • Ubuntu 14.04
  • AWS g2.2xlarge
  • ATLAS

Images built with the same chef scripts a few days ago work, new ones do not. Reverting to
f83da34 fixes the issue, and digits starts normally.

Best guess is that it has something to do with these changes (removing try block, replacing with import caffe_pb2)

-                        try:
-                            import caffe_pb2
-                        except ImportError:
-                            # See issue #32
-                            from caffe.proto import caffe_pb2
                         import numpy as np
+                        import caffe_pb2

throughout the code. Again, python isn't my thing, but considering this error only started showing up yesterday, and picking a revision prior to #307 fixes it, it seems like a likely candidate.

@lukeyeager lukeyeager added the bug label Sep 23, 2015
@lukeyeager
Copy link
Member

If anyone else can confirm this, I'll revert the change immediately.

Thanks for the bug report @davidsmd. The changes in digits.config.caffe_option should have kept this from happening.

Do you mind adding these lines before this line in digits/model/tasks/caffe_train.py for me?

import pprint, sys
pprint.pprint(sys.path)

I want to double-check that the $CAFFE_HOME/python/caffe/proto path is getting added to sys.path.

@davidsmd
Copy link
Author

Ah-ha. Got it. My bad I think. Didn't realize there was a change to digits/config/caffe_option.py ... I'm loading mine from a template to add:

import matplotlib
matplotlib.use("agg")

in order to avoid GTK errors when running headless...

Sorry about that.

@lukeyeager
Copy link
Member

Sorry about that.

No problem, glad you sorted it out.

I'm loading mine from a template to add:

So you need #239?

@davidsmd
Copy link
Author

Yes, #239 would be helpful.

@gheinrich
Copy link
Contributor

Hi @davidsmd, if you can reproduce the GTK error consistently, would you mind doing this on your machine:

$ python
Python 2.7.3 (default, Feb 27 2014, 19:58:35)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import matplotlib
>>> matplotlib.get_backend()
u'TkAgg'

I am curious to see what backend matplotlib is using by default on your machine. Thanks!

@davidsmd
Copy link
Author

@gheinrich

Python 2.7.6 (default, Jun 22 2015, 17:58:13)
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import matplotlib
>>> matplotlib.get_backend()
u'GTK3Agg'
>>>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants