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
ModuleNotFoundError: no module named 'adversarial_text' #1917
Comments
I'm getting the same error, output given below. My config: Ubuntu 16.04.2 LTS, Tensorflow 1.2, Python 2.7.12, Bazel 0.5.2. Any help would be much appreciated. bazel run data:gen_vocab -- --output_dir=$IMDB_DATA_DIR --dataset=imdb --imdb_input_dir=/home/dasgupta/adversarial_text/aclImdb --lowercase=False INFO: Running command line: bazel-bin/data/gen_vocab '--output_dir=/home/pdasgupta/adversarial_text/imdb' '--dataset=imdb' '--imdb_input_dir=/home/dasgupta/adversarial_text/aclImdb' '--lowercase=False' |
Firstly, touch a |
Thanks @BinWone . That solved it. |
I suspect the @ruyiweicas had this problem because No wget http://ai.stanford.edu/~amaas/data/sentiment/aclImdb_v1.tar.gz -O /tmp/imdb.tar.gz
tar -xf /tmp/imdb.tar.gz -C /tmp
git clone https://github.com/tensorflow/models.git tensorflow-models
cd tensorflow-models
bazel run //adversarial_text/data:gen_vocab -- --output_dir=/tmp/imdb --dataset=imdb --imdb_input_dir=/tmp/aclImdb --lowercase=False |
I still get this issue. from pkgutil import extend_path
__path__ = extend_path(__path__, __name__) |
I am also encountering this issue - I ran into it just following the instructions in the README for this example. But the proposed solution by @jart also fails for me. I propose that this issue be re-opened. Once I've gotten a working build process I'm happy to submit a PR that updates the README for this example with proper instructions. Here's the initial issue, which others saw (leaving out the instructions to download/unpack the IMDB dataset into
(Note that this is being run in-place where the repo was checked out, the
I tried updating that last command slightly, to be
Any assistance with this would be great. As I mentioned I'm happy to update the instructions on the README for this example and submit a PR once we get this figured out. (For completeness, I'll mention that I also tried @BinWone's solution, adding an empty |
Same results as @charlesreid1 |
I just edited the import lines not to refer 'adversarial_text.data' because they are in same folder. ex) |
Adversarial_text has been changed to not use bazel. |
kikyo@kikyo-ah-ha:/tmp/adversarial_text$ bazel run data:gen_vocab -- --output_dir=$IMDB_DATA_DIR --dataset=imdb --imdb_input_dir=/tmp/aclImdb --lowercase=False
INFO: Found 1 target...
Target //data:gen_vocab up-to-date:
bazel-bin/data/gen_vocab
INFO: Elapsed time: 0.135s, Critical Path: 0.00s
INFO: Running command line: bazel-bin/data/gen_vocab '--output_dir=/tmp/imdb' '--dataset=imdb' '--imdb_input_dir=/tmp/aclImdb' '--lowercase=False'
Traceback (most recent call last):
File "/home/kikyo/.cache/bazel/_bazel_kikyo/8920fee1eb0b89d4a7850da6ea96fe9d/execroot/main/bazel-out/local-fastbuild/bin/data/gen_vocab.runfiles/main/data/gen_vocab.py", line 25, in
from adversarial_text.data import data_utils
ModuleNotFoundError: No module named 'adversarial_text'
The text was updated successfully, but these errors were encountered: