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

Update test_models_inference.py #183

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Yash-2707
Copy link

Improved Error Handling and Logging
Implemented a context manager time_context to measure the execution time of each test. This can be used to implement parallel testing in the future. The test suite is now more extensible, as the models and tasks are defined in a dictionary TESTABLE_MODELS. Adding new models or tasks requires only updating this dictionary. The existing clean_cache function is still used to clean up the cache after each test run. The tests are already parameterized using the @pytest.mark.parametrize decorator, making the code more concise and easier to maintain.

Improved Error Handling and Logging
Implemented a context manager time_context to measure the execution time of each test. This can be used to implement parallel testing in the future.
The test suite is now more extensible, as the models and tasks are defined in a dictionary TESTABLE_MODELS. Adding new models or tasks requires only updating this dictionary.
The existing clean_cache function is still used to clean up the cache after each test run.
The tests are already parameterized using the @pytest.mark.parametrize decorator, making the code more concise and easier to maintain.
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.

1 participant