PyThaiNLP / pythainlp

Thai natural language processing in Python
https://pythainlp.org/
Apache License 2.0
989 stars 274 forks source link

bug: translate: Using camembert model to instantiate roberta model #903

Open bact opened 9 months ago

bact commented 9 months ago

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:

https://github.com/PyThaiNLP/pythainlp/blob/c8b547e66836ddb9526dcef063ce27d28f7c8213/tests/test_translate.py#L12-L15

https://github.com/PyThaiNLP/pythainlp/blob/c8b547e66836ddb9526dcef063ce27d28f7c8213/pythainlp/translate/en_th.py#L37-L42

https://github.com/PyThaiNLP/pythainlp/blob/c8b547e66836ddb9526dcef063ce27d28f7c8213/pythainlp/translate/en_th.py#L19-L25

wannaphong commented 9 months ago

I have a computing problems , so I will change this issues as future plan.

Oh wrong issue