Skip to content

fix 'ImportError: cannot import name synthetic' - #6283

Merged
martinwicke merged 4 commits into
tensorflow:masterfrom
comicchang:fix_synthetic_inport_error
Dec 16, 2016
Merged

martinwicke merged 4 commits into
tensorflow:masterfrom
comicchang:fix_synthetic_inport_error

Conversation

@comicchang

@comicchang comicchang commented Dec 13, 2016 •

Copy link
Copy Markdown
Contributor

fix 'ImportError: cannot import name synthetic' error introduced in #5315

see also #6281

>>> import tensorflow.examples.tutorials.mnist.input_data as input_data
I tensorflow/stream_executor/dso_loader.cc:128] successfully opened CUDA library libcublas.so.8.0 locally
I tensorflow/stream_executor/dso_loader.cc:128] successfully opened CUDA library libcudnn.so.5 locally
I tensorflow/stream_executor/dso_loader.cc:128] successfully opened CUDA library libcufft.so.8.0 locally
I tensorflow/stream_executor/dso_loader.cc:128] successfully opened CUDA library libcuda.so.1 locally
I tensorflow/stream_executor/dso_loader.cc:128] successfully opened CUDA library libcurand.so.8.0 locally
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python3.5/site-packages/tensorflow/examples/tutorials/mnist/__init__.py", line 21, in <module>
    from tensorflow.examples.tutorials.mnist import input_data
  File "/usr/lib/python3.5/site-packages/tensorflow/examples/tutorials/mnist/input_data.py", line 29, in <module>
    from tensorflow.contrib.learn.python.learn.datasets.mnist import read_data_sets
  File "/usr/lib/python3.5/site-packages/tensorflow/contrib/__init__.py", line 29, in <module>
    from tensorflow.contrib import factorization
  File "/usr/lib/python3.5/site-packages/tensorflow/contrib/factorization/__init__.py", line 24, in <module>
    from tensorflow.contrib.factorization.python.ops.gmm import *
  File "/usr/lib/python3.5/site-packages/tensorflow/contrib/factorization/python/ops/gmm.py", line 30, in <module>
    from tensorflow.contrib.learn.python.learn.estimators import estimator
  File "/usr/lib/python3.5/site-packages/tensorflow/contrib/learn/__init__.py", line 66, in <module>
    from tensorflow.contrib.learn.python.learn import *
  File "/usr/lib/python3.5/site-packages/tensorflow/contrib/learn/python/__init__.py", line 23, in <module>
    from tensorflow.contrib.learn.python.learn import *
  File "/usr/lib/python3.5/site-packages/tensorflow/contrib/learn/python/learn/__init__.py", line 26, in <module>
    from tensorflow.contrib.learn.python.learn import datasets
  File "/usr/lib/python3.5/site-packages/tensorflow/contrib/learn/python/learn/datasets/__init__.py", line 29, in <module>
    from tensorflow.contrib.learn.python.learn.datasets import synthetic
ImportError: cannot import name 'synthetic'

@tensorflow-jenkins

Copy link
Copy Markdown
Collaborator

Can one of the admins verify this patch?

@googlebot

Copy link
Copy Markdown

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed, please reply here (e.g. I signed it!) and we'll verify. Thanks.


  • If you've already signed a CLA, it's possible we don't have your GitHub username or you're using a different email address. Check your existing CLA data and verify that your email is set on your git commits.
  • If you signed the CLA as a corporation, please let us know the company's name.

@comicchang

Copy link
Copy Markdown
Contributor Author

@googlebot
I signed it

@googlebot

Copy link
Copy Markdown

CLAs look good, thanks!

@comicchang comicchang changed the title fix 'ImportError: cannot import name synthetic' in #5315 fix 'ImportError: cannot import name synthetic' Dec 13, 2016
@martinwicke

Copy link
Copy Markdown
Member

Jenkins, test this please.

@martinwicke martinwicke self-assigned this Dec 13, 2016
@martinwicke

Copy link
Copy Markdown
Member

The original change was already reverted, can you add this commit onto a new version of that?

@comicchang

comicchang commented Dec 14, 2016 via email

Copy link
Copy Markdown
Contributor Author

@martinwicke

Copy link
Copy Markdown
Member

Yes, that is the easiest way.

Jenkins, test this please!

@martinwicke

Copy link
Copy Markdown
Member

Can you run buildifier (I suspect some tabs have crept in)?

@comicchang

Copy link
Copy Markdown
Contributor Author

@martinwicke did you mean this ?
2409471

@martinwicke

Copy link
Copy Markdown
Member

Jenkins, test this please.

martinwicke
martinwicke previously approved these changes Dec 14, 2016
import six

import numpy as np
import tensorflow as tf

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, we changed the way we use this -- all tests now avoid importing tensorflow. Can you import all necessary things directly?

@martinwicke
martinwicke dismissed their stale review December 15, 2016 22:58

Test convention has changed and tests need to be updated

@martinwicke martinwicke left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Splendid. Thank you!

@martinwicke

Copy link
Copy Markdown
Member

Jenkins, test this once more please.

@martinwicke

Copy link
Copy Markdown
Member

Jenkins, test this please.

@martinwicke
martinwicke merged commit 4124280 into tensorflow:master Dec 16, 2016
@comicchang
comicchang deleted the fix_synthetic_inport_error branch December 16, 2016 03:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants