-
-
Notifications
You must be signed in to change notification settings - Fork 12.6k
[Bugfix] Dictionary MM embeddings for online chat #30507
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] Dictionary MM embeddings for online chat #30507
Conversation
39fff0b to
52ed10a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request adds support for multiple dictionary-based input embeddings, which is a great enhancement. The core logic changes in chat_utils.py and input_processor.py seem to correctly handle the main use case of multiple dictionary embeddings. The new tests for this functionality are also valuable.
However, I've identified two critical issues. First, the refactoring seems to have broken the existing functionality for handling cached embeddings (where image_embeds is null but a uuid is provided), as the new _get_embeds_data function does not handle None values. Second, the new test for empty dictionary embeddings ({}) is internally inconsistent and reveals a bug that will cause a validation failure. An empty dictionary is treated as one item, creating a placeholder, but its data length is considered zero, leading to a mismatch with the UUID count. Please see my detailed comments for suggestions on how to address these issues.
Signed-off-by: DarkLight1337 <[email protected]>
52ed10a to
d8bf4b4
Compare
|
Hi @DarkLight1337, the pre-commit checks have failed. Please run: uv pip install pre-commit
pre-commit install
pre-commit run --all-filesThen, commit the changes and push to your branch. For future commits, Tip Is
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Signed-off-by: DarkLight1337 <[email protected]>
Signed-off-by: DarkLight1337 <[email protected]>
|
/gemini review |
Signed-off-by: DarkLight1337 <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request introduces a bugfix to correctly handle dictionary-based multimodal embeddings, particularly for online chat scenarios. The changes involve updating MultiModalItemTracker and InputProcessor to manage multiple dictionary inputs. New tests have been added to cover these cases. My review focuses on the robustness of the new logic. I've identified a potential KeyError in _get_embeds_data if input dictionaries have inconsistent keys and have suggested a validation to prevent this.
Signed-off-by: DarkLight1337 <[email protected]>
19cf6bc to
9cb8d95
Compare
|
Test currently fails, will resume work tomorrow |
|
Hi @DarkLight1337, the pre-commit checks have failed. Please run: uv pip install pre-commit
pre-commit install
pre-commit run --all-filesThen, commit the changes and push to your branch. For future commits, Tip Is
|
Signed-off-by: DarkLight1337 <[email protected]>
Signed-off-by: DarkLight1337 <[email protected]>
|
Tests should pass now |
Signed-off-by: DarkLight1337 <[email protected]>
Signed-off-by: DarkLight1337 <[email protected]>
Signed-off-by: DarkLight1337 <[email protected]> Signed-off-by: Joachim Studnia <[email protected]>
Signed-off-by: DarkLight1337 <[email protected]>
Signed-off-by: DarkLight1337 <[email protected]>
Signed-off-by: DarkLight1337 <[email protected]> Signed-off-by: Ubuntu <[email protected]>
Purpose
MultiModalItemTracker.all_mm_dataand its async version.InputProcessor._validate_single_promptto handle dictionary inputs correctly.FIX #29778
Test Plan
Test Result
Essential Elements of an Effective PR Description Checklist
supported_models.mdandexamplesfor a new model.