Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add tests #3

Open
1 of 2 tasks
mikegerber opened this issue Feb 24, 2023 · 8 comments
Open
1 of 2 tasks

Add tests #3

mikegerber opened this issue Feb 24, 2023 · 8 comments
Assignees
Labels
bug Something isn't working

Comments

@mikegerber
Copy link
Member

mikegerber commented Feb 24, 2023

To continue developing this, I need basic tests.

  • Reuse the tests from ocrd_calamari (do not check the generated Unicode line text for now)
  • Upload the highly experimental TrOCR-GT4HistOCR model for testing and check the result
@mikegerber mikegerber self-assigned this Feb 24, 2023
@mikegerber mikegerber added the bug Something isn't working label Feb 24, 2023
@mikegerber
Copy link
Member Author

Considering not having any basic automatic tests a bug at this point.

@mikegerber
Copy link
Member Author

Basic test is in with 9ef8c13

@mikegerber
Copy link
Member Author

CircleCI tests are now in place.

It fails for all Python versions except the one I was developing on 😝

@mikegerber
Copy link
Member Author

https://app.circleci.com/pipelines/github/qurator-spk/ocrd_trocr/5/workflows/56f8d3ca-59df-458c-b8cd-d1254b47b5c0

  • 3.11: fails to install sentencepiece
  • 3.10: timeout
  • 3.9: OK
  • 3.8: timeout
  • 3.7: timeout

On my system (a server with considerable CPU resources), the tests or coverage runs <40s wall time, but with >600s CPU time, so this may be the problem.

@mikegerber
Copy link
Member Author

After increasing the timeout, Python 3.7 to 3.9 ran within ~ 3m (?) and 3.10 is still running after 25m... Needs more investigation, may just be random load fluctuation at CircleCI, but I have doubts as 3.9 (my test version) has always been fastest.

@mikegerber
Copy link
Member Author

mikegerber commented Feb 27, 2023

Python 3.11 is fixed now by installing cmake, as sentencepiece is built from source there.

Now the test runs from Python 3.7 to Python 3.11 🍾

@mikegerber
Copy link
Member Author

Runtime varies from run to run, probably a CircleCI issue. Not going to bother with this, as long as the tests finish.

@mikegerber
Copy link
Member Author

3.7, 3.10, 3.11 are OK with the latest build, 3.8, 3.9 fail...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant