google-research / google-research/language
Script problems for consistent_zero_shot_nmt
- Dominant language
- Python
- Stars
- 1.8k
- Forks
- 362
- PR merge metrics
- No merged PRs in 30d
Description
Hi! I am trying to replicate your results. But stuck on some problems.
1. `download_and_preproc_uncorpus.sh` is missing. I don't know how to prepare `uncorpus` for your program without it.
2. For `europarl` dataset. First your program tries to find `wmt06` folder which has been replaced by `wmt07`:
```python
"src_fname": "wmt06/dev/dev2006.{src_lang}".format(src_lang=src_lang),
#from data_generators\translate_europarl.py
```
I fixed this by changing the code in data_generators\translate_europarl.py
3. For Europarl dataset., TF 1.13.1 and Tensor2Tensor 1.11.0 is fine. But one dependency of Tensor2Tensor is `Mesh Tensorflow` which will trying to import tensor's TPU support part not covered in TF 1.13.1 thus giving the following error:
```
File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/usr/lib/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/content/language/language/labs/consistent_zero_shot_nmt/bin/t2t_trainer.py", line 27, in
from tensor2tensor.bin import t2t_trainer
File "/usr/local/lib/python3.6/dist-packages/tensor2tensor/bin/t2t_trainer.py", line 25, in
from tensor2tensor import models # pylint: disable=unused-import
File "/usr/local/lib/python3.6/dist-packages/tensor2tensor/models/__init__.py", line 29, in
from tensor2tensor.models import mtf_image_transformer
File "/usr/local/lib/python3.6/dist-packages/tensor2tensor/models/mtf_image_transformer.py", line 29, in
import mesh_tensorflow as mtf
File "/usr/local/lib/python3.6/dist-packages/mesh_tensorflow/__init__.py", line 26, in
from mesh_tensorflow import simd_mesh_impl
File "/usr/local/lib/python3.6/dist-packages/mesh_tensorflow/simd_mesh_impl.py", line 32, in
from tensorflow.python.tpu.ops import tpu_ops # pylint: disable=g-direct-tensorflow-import
ModuleNotFoundError: No module named 'tensorflow.python.tpu'
```
Contributor guide
Assessment
This issue has not been assessed yet.