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

tox: run pytest with --durations flag to list tests run time #246

Merged
merged 1 commit into from
Oct 27, 2023

Conversation

dtrifiro
Copy link
Contributor

By passing --durations, pytest reports the longest test run times.

Here's the top 5:

78.01s call     tests/model_management/test_tgis_auto_finder.py::test_bad_tgis_connection
4.23s call     tests/modules/text_generation/test_text_generation_tgis.py::test_local_train_load_tgis
3.31s call     tests/modules/text_generation/test_text_generation_local.py::test_train_model_save_and_load
1.86s call     tests/modules/text_generation/test_text_generation_local.py::test_train_model_seq2seq
1.75s call     tests/modules/text_generation/test_peft_prompt_tuning.py::test_run_model

It's probably worth it to add a timeout to test_bad_tgis_connection to avoid spending so much time there.

Copy link
Collaborator

@evaline-ju evaline-ju left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! interesting how that one test can sometimes be fast or very slow

@evaline-ju evaline-ju merged commit 06d2064 into caikit:main Oct 27, 2023
4 checks passed
@dtrifiro dtrifiro deleted the print-test-durations branch October 27, 2023 16:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants