tensorflow / nmt

TensorFlow Neural Machine Translation Tutorial
Apache License 2.0
6.37k stars 1.96k forks source link

AttributeError: module nmt.nmt.py has no attribute '__path__' #171

Closed polaroidkidd closed 6 years ago

polaroidkidd commented 6 years ago

Hi, I'm trying to run the EN-DE Training inside a docker on our universities GPU cluster to compare against our own model for our Bachelor Thesis, but am having some trouble getting this running as was wondering if someone could point me in the right direction.

I can get it to start training locally but not on the cluster. I have been searching High and Low for a solution without much success. Any help would be greatly appreciated!

Here is the docker file.

FROM nvidia/cuda:8.0-cudnn6-devel-ubuntu16.04
LABEL maintainer "Daniel Einars"

RUN apt-get update
RUN apt-get update && apt-get install -y \
       curl \
       python3-numpy \
       python3-pip \
               && \
   apt-get clean && \
   rm -rf /var/lib/apt/lists/*
RUN apt-get update
RUN pip3 install --upgrade pip
RUN pip3 install pip tf-nightly
RUN pip3 install h5py

COPY nmt/ /nmt
COPY start_training.sh/ /
RUN mkdir -p /nmt/tmp/nmt_model

WORKDIR /nmt/nmt
ENTRYPOINT ["sh"]
CMD ["./start_training.sh"]

This is the start_training script I am using. It's copy&paste from the documentation.


#!/bin/sh

python3 -m nmt.nmt.py --src=de --tgt=en --hparams_path=nmt/standard_hparams/wmt16_gnmt_4_layer.json --out_dir=/tmp/deen_gnmt --vocab_prefix=./nmt/nmt/nmt/tmp/wmt16/vocab.bpe.32000 --train_prefix=./nmt/nmt/nmt/tmp/wmt16/train.tok.clean.bpe.32000 --dev_prefix=./nmt/nmt/nmt/tmp/wmt16/newstest2013.tok.bpe.32000 --test_prefix=./nmt/nmtnmt/tmp/wmt16/newstest2015.tok.bpe.32000
polaroidkidd commented 6 years ago

issue stemmed from me calling python3 nmt.nmt.**py**. I got it to work by calling python3 nmt.nmt with the appropriate params.