(engineNMT) C:\Users\q1027036\OneDrive - IQVIA\Documents\customEngine_Inference\github\tests\data\models\v2>docker run -it --rm -v cd/data --entrypoint python opennmt/ctranslate2:1.6.1-ubuntu16-gpu
Python 2.7.12 (default, Oct 8 2019, 14:14:10)
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
import ctranslate2
translator = ctranslate2.Translator("/data/ende_ctranslate2/", device="cpu")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
RuntimeError: failed to load the model /data/ende_ctranslate2//model.bin
translator = ctranslate2.Translator("C:\Users\q1027036\OneDrive - IQVIA\Documents\customEngine_Inference\github\tests\data\models\v2\aren-transliteration-i16", device="
cpu")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
RuntimeError: failed to load the model C:\Users\q1027036\OneDrive - IQVIA\Documents\customEngine_Inference\github ests\data\models2ren-transliteration-i16/model.bin
Thanks Guillaume. Stil no luck with model inference.I am trying the following code as you mentioned:
Step 1:
docker run -it --rm -v /data/customEngine_Inference/github/tests/data/models/v2/aren-transliteration-i16/ --entrypoint python opennmt/ctranslate2:latest-ubuntu18
Step2: Python instance opened where
import ctranslate2
translator = ctranslate2.Translator("/data/ende_ctranslate2/", device="cpu")
RuntimeError: failed to load the model /data/ende_ctranslate2//model.bin
source [[‘v’, 'm', 'o', 'n']]
translate_batch [[{‘tokens': ['व', 'म', 'ो', 'न'], 'score': -2.462678909301758}, {'tokens': ['व', 'म', 'न'], 'score': -3.114733934402466}, {'tokens': ['व', 'ी', 'म', 'न'], 'score': -3.5103278160095215}]]
source [[‘v’, 'm', 'o', 'n'], ['v', 'm', 'o', 'n']]
translate_batch[[{'tokens': ['व', 'म', 'ो', 'न'], 'score': -2.4626777172088623}, {'tokens': ['व', 'म', 'न'], 'score': -3.1147348880767822}, {'tokens': ['व', 'ी', 'म', 'न'], 'score': -3.510328769683838}], [{'tokens': ['व', 'म', 'ो', 'न'], 'score': -2.457219123840332}, {'tokens': ['व', '्', 'म', 'न'], 'score': -2.4626777172088623}, {'tokens': ['व'], 'score': -3.2032346725463867}]]
source [[‘v’, 'm', 'o', 'n'], ['v', 'm', 'o', 'n'], ['v', 'm', 'o', 'n']]
translate_batch[[{'tokens': ['व', 'म', 'ो', 'न'], 'score': -2.4626779556274414}, {'tokens': ['व', 'म', 'न'], 'score': -3.114734411239624}, {'tokens': ['व', 'ी', 'म', 'न'], 'score': -3.5103282928466797}], [{'tokens': ['व', 'म', 'ो', 'न'], 'score': -2.457218885421753}, {'tokens': ['व', '्', 'म', 'न'], 'score': -2.4626779556274414}, {'tokens': ['व'], 'score': -3.2032341957092285}], [{'tokens': ['व', '्', 'म', 'न'], 'score': -2.457218885421753}, {'tokens': ['व', 'म', 'ो', 'न'], 'score': -2.7263221740722656}, {'tokens': ['व'], 'score': -3.3992576599121094}]]