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

WIP: End to End test for vision and audio #386

Merged
merged 12 commits into from
Sep 29, 2024
Merged

Conversation

wirthual
Copy link
Collaborator

@wirthual wirthual commented Sep 28, 2024

Started working on adding end to end tests for audio and vision. #378

Most of the test cases cover sending URLs to the endpoints, because based on my observation this is the only supported mode of operation.

I added a test case which shows the behaviour of sending only text named test_{audio,vision}_single_text_only. Sending text results in a 422 Status response.

Looking through the code it seems the pydantic layer only accepts URL formated strings: See here

Even with disabled pydandic checks it seems theres only suport for url or list of urls based on this code

@codecov-commenter
Copy link

codecov-commenter commented Sep 28, 2024

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.99%. Comparing base (6c1ad68) to head (f2925c8).

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #386      +/-   ##
==========================================
+ Coverage   77.78%   78.99%   +1.21%     
==========================================
  Files          37       37              
  Lines        2804     2804              
==========================================
+ Hits         2181     2215      +34     
+ Misses        623      589      -34     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -1,19 +1,14 @@
# CLI v2 Documentation
Copy link
Owner

Choose a reason for hiding this comment

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

weird, this is autogenerated differently. Try running make precommit again?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Running make precommit indicates changes in the markdown file. I checked out the version from your main branch now.

@michaelfeil
Copy link
Owner

Looks good to me!

@wirthual wirthual marked this pull request as ready for review September 29, 2024 02:32
Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

PR Summary

This pull request adds end-to-end tests for audio and vision embeddings, addressing issue #378 and improving test coverage for the Infinity server's multimedia embedding capabilities.

  • Added test_torch_audio.py and test_torch_vision.py in /libs/infinity_emb/tests/end_to_end/ for comprehensive audio and image embedding tests
  • Implemented tests for single and multiple inputs, error handling, and edge cases in both audio and vision embedding scenarios
  • Updated conftest.py to include default models for audio and vision, and expanded ENGINE_METHODS to support new test cases
  • Highlighted current limitation of only supporting URL-formatted inputs for audio and vision embeddings
  • Included skipped tests for text-only inputs, demonstrating the current unsupported behavior

3 file(s) reviewed, 1 comment(s)
Edit PR Review Bot Settings


pytest.ENGINE_METHODS = ["embed", "image_embed", "classify", "rerank"]
pytest.ENGINE_METHODS = ["embed", "image_embed", "classify", "rerank", "audio_embed"]
Copy link
Owner

Choose a reason for hiding this comment

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

nice spot

Copy link
Owner

@michaelfeil michaelfeil left a comment

Choose a reason for hiding this comment

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

lgtm

@michaelfeil michaelfeil merged commit 638205c into michaelfeil:main Sep 29, 2024
35 of 36 checks passed
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.

3 participants