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

[bugfix] fix broken vision inference, change serialization for bytes #693

Merged
merged 11 commits into from
Dec 30, 2024

Conversation

yanxi0830
Copy link
Contributor

@yanxi0830 yanxi0830 commented Dec 30, 2024

What does this PR do?

  • vision inference via image as binary bytes fails with serialization error
  • add custom serialization for "bytes" in _URLOrData

Test Plan

pytest -v -s -k "fireworks" --inference-model="meta-llama/Llama-3.2-11B-Vision-Instruct" ./llama_stack/providers/tests/inference/test_vision_inference.py::TestVisionModelInference::test_vision_chat_completion_non_streaming

Before
image

After
image

image

Sources

Please link relevant resources if necessary.

Before submitting

  • This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
  • Ran pre-commit to handle lint / formatting issues.
  • Read the contributor guideline,
    Pull Request section?
  • Updated relevant documentation.
  • Wrote necessary unit or integration tests.

@yanxi0830 yanxi0830 marked this pull request as ready for review December 30, 2024 19:45
@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Meta Open Source bot. label Dec 30, 2024
@yanxi0830 yanxi0830 changed the title [bugfix] fix broken vision inference, change serialization in telemetry [bugfix] fix broken vision inference, change serialization for bytes Dec 30, 2024
@yanxi0830 yanxi0830 merged commit 694adb1 into main Dec 30, 2024
2 checks passed
@yanxi0830 yanxi0830 deleted the vision_model_fix branch December 30, 2024 21:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Meta Open Source bot.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants