Description
"You are using a model of type camembert to instantiate a model of type roberta. This is not supported for all configurations of models and can yield errors." warning issued during test_translate test.
Possibly from scb_1m_th-en_spm model.
Expected results
No warning
Current results
See https://github.com/PyThaiNLP/pythainlp/actions/runs/7861725110/job/21450401313#step:5:1449
Steps to reproduce
Run test_translate.py
PyThaiNLP version
5.0.1
Python version
3.8
Operating system and version
Linux and Mac
More info
No response
Possible solution
No response
Files
Relevant code blocks:
|
class TestTranslatePackage(unittest.TestCase): |
|
def test_translate(self): |
|
# remove("scb_1m_th-en_spm") |
|
self.assertIsNone(download_model_all()) |
|
def download_model_all() -> None: |
|
""" |
|
Download all translation models in advance |
|
""" |
|
_download_install(_EN_TH_MODEL_NAME) |
|
_download_install(_TH_EN_MODEL_NAME) |
|
_EN_TH_MODEL_NAME = "scb_1m_en-th_moses" |
|
# SCB_1M-MT_OPUS+TBASE_en-th_moses-spm_130000-16000_v1.0.tar.gz |
|
_EN_TH_FILE_NAME = "SCB_1M-MT_OPUS+TBASE_en-th_moses-spm_130000-16000_v1.0" |
|
|
|
_TH_EN_MODEL_NAME = "scb_1m_th-en_spm" |
|
# SCB_1M-MT_OPUS+TBASE_th-en_spm-spm_32000-joined_v1.0.tar.gz |
|
_TH_EN_FILE_NAME = "SCB_1M-MT_OPUS+TBASE_th-en_spm-spm_32000-joined_v1.0" |
Description
"You are using a model of type camembert to instantiate a model of type roberta. This is not supported for all configurations of models and can yield errors." warning issued during
test_translatetest.Possibly from
scb_1m_th-en_spmmodel.Expected results
No warning
Current results
See https://github.com/PyThaiNLP/pythainlp/actions/runs/7861725110/job/21450401313#step:5:1449
Steps to reproduce
Run
test_translate.pyPyThaiNLP version
5.0.1
Python version
3.8
Operating system and version
Linux and Mac
More info
No response
Possible solution
No response
Files
Relevant code blocks:
pythainlp/tests/test_translate.py
Lines 12 to 15 in c8b547e
pythainlp/pythainlp/translate/en_th.py
Lines 37 to 42 in c8b547e
pythainlp/pythainlp/translate/en_th.py
Lines 19 to 25 in c8b547e