ilmulti icon indicating copy to clipboard operation
ilmulti copied to clipboard

Exception: Please define ILMULTI_CORPUS_ROOT in environment variable

Open Nimishasri opened this issue 5 years ago • 1 comments

System:
Description: Ubuntu 18.04.4 LTS Release: 18.04 Codename: bionic

Python 3.7.6

Created a folder Research/MT on Home. Setup and activated Virtual environment in Research/MT Cloned ilmulti in Research/MT Ran the following:

python3 -m pip install -r requirements.txt --user  
python3 setup.py install

Downloaded the models by running scripts/download-and-setup-models.sh No errors/warnings uptill now Opened up a Jupyter notebook and ran the following:

from ilmulti.translator import from_pretrained

translator = from_pretrained(tag='mm-all')
sample = translator("The quick brown fox jumps over the lazy dog", tgt_lang='hi')

Exception: Please define ILMULTI_CORPUS_ROOT in environment variable

Nimishasri avatar Aug 11 '20 18:08 Nimishasri

ILMULTI_CORPUS_ROOT is only used for training. I have set this to a hard-failure to ensure scripts fail early than at a later stage. For inference purposes, this can be removed by simply setting ILMULTI_CORPUS_ROOT to anything, as in the following example.

export ILMULTI_CORPUS_ROOT=''

jerinphilip avatar Aug 11 '20 18:08 jerinphilip