PyThaiNLP / pythainlp

Thai Natural Language Processing in Python.
https://pythainlp.org/
Apache License 2.0
936 stars 272 forks source link

BERT and LM related errors during test #872

Closed bact closed 6 months ago

bact commented 7 months ago

Description

5 failed tests

1)

ERROR: test_word_correct (tests.test_spell.TestSpellPackage)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/runner/work/pythainlp/pythainlp/tests/test_spell.py", line 72, in test_word_correct
    result = correct("ทดสอง", engine="wanchanberta_thai_grammarly")

2)

ERROR: test_keybert (tests.test_summarize.TestSummarizePackage)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/runner/work/pythainlp/pythainlp/tests/test_summarize.py", line 85, in test_keybert
    keybert = KeyBERT()

3)

ERROR: test_keyword_extraction (tests.test_summarize.TestSummarizePackage)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/runner/work/pythainlp/pythainlp/tests/test_summarize.py", line 41, in test_keyword_extraction
    self.assertEqual(extract_keywords(""), [])
  File "/home/runner/work/pythainlp/pythainlp/pythainlp/summarize/core.py", line 237, in extract_keywords
    keywords = KeyBERT().extract_keywords(

4)

ERROR: test_NNER_class (tests.test_tag.TestTagPackage)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/runner/work/pythainlp/pythainlp/tests/test_tag.py", line 366, in test_NNER_class
    self.assertIsNotNone(nner.tag("แมวทำอะไรตอนห้าโมงเช้า"))

5)

ERROR: test_pos_tag_transformers (tests.test_tag.TestTagPackage)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/runner/work/pythainlp/pythainlp/tests/test_tag.py", line 369, in test_pos_tag_transformers
    self.assertIsNotNone(pos_tag_transformers(
TypeError: pos_tag_transformers() got an unexpected keyword argument 'words'

Expected results

All tests should pass.

Current results

5 tests related to BERT and LM failed.

Steps to reproduce

Run the test cases shown above.

PyThaiNLP version

dev-latest

Python version

3.8

Operating system and version

Linux and Mac

More info

No response

Possible solution

No response

Files

No response

pavaris-pm commented 7 months ago

@bact can you tell me the command to run the test? I can fix an error occurred in test_pos_tag_transformers and will made changes with it and made a new PR krub.

wannaphong commented 7 months ago

I think the CI is old. I tried change to Python 3.9, Ubuntu 22.04 and newest sentencepiece.

bact commented 7 months ago

Maybe we need a CI overhaul.

Also removing things like AppVeyor, plus trying to use some standard official GitHub Actions from GitHub/the library providers.

For example, when we built our CI around 5 years ago, there's no PyPI Publish action from PyPA yet. Now they have it. This will potentially reduce parts that we have to maintain by ourselves.

wannaphong commented 6 months ago

@bact It's fixed. https://github.com/PyThaiNLP/pythainlp/actions/runs/7169050894