Open RoelVdP opened 6 years ago
cp attention/utils/config.py ./attention/services/create_copy_task/
cp attention/utils/config.py ./attention/services/attention_train/
and change attention/services/create_copy_task/create_copy_task.py to:
from config import AttrDict
and similar change to attention/services/attention_train/attentiontrain.py and similar copy/change for other things reference from top of attentiontrain.py etc. It may end up working that way, but it's hacky.
Found a solution here (the problem is python 3 compatibility): https://stackoverflow.com/questions/45415473/importing-module-from-sub-directory-works-in-python-2-but-not-python-3
Patch that will fix this;
# git diff
diff --git a/run_micro_services.sh b/run_micro_services.sh
old mode 100644
new mode 100755
index 26a615d..96ab557
--- a/run_micro_services.sh
+++ b/run_micro_services.sh
@@ -1,5 +1,7 @@
#!/usr/bin/env bash
+export PYTHONPATH=${PWD}
+
OUTPUT_DIR="transformer_output"
TASK_CONFIG="attention/services/create_copy_task/default_config.json"
METADATA="attention/services/attention_train/default_metadata.json"
Gives:
So tried:
But then get:
OS: Ubuntu Bionic. Any ideas?