-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[BUG] fix bug when receive embedding from vertex api #2000
Conversation
1. fix the way to parse response using list-parsing instead of dict-parsing.
Reviewer ChecklistPlease leverage this checklist to ensure your code review is thorough before approving Testing, Bugs, Errors, Logs, Documentation
System Compatibility
Quality
|
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.
@pig7788, can you run a pre-commit run
to clean up some weird formatting? There are a lot of changes, and it is difficult to make sense of what you made.
Note: you need to install dev deps pip install -r requirements_dev.txt
@tazarov These weird changes were fixed when I rebase the previous commit. Formatting tool leads to these changes. Thank you for your reminder. |
@pig7788, this looks better. Thank you. Do you think we can also add maybe some sort of error if we don't find the response we expect? I think it would make for a good developer experience instead of returning an empty embeddings list. |
1. rewrite the procedure of recieving response and make it more readable. 2. add some checks to confirm which conditions that developers encounter.
Summary of changes: 1. add AuthorizationError and msg for hint 2. add response as a part of error msg for reminder.
Summary of changes: 1. cancel AuthorizationError and msg for hint (because of reducing the complexity of hints.)
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.
A few nits and then we're good to check this in!
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.
@pig7788, on top of Ben's nits. Can you also write some tests to verify the EF's behavior? E.g.:
- Normal test that succeeds
- Missing API key
- Any other important error condition that might be useful
Put your tests under chromadb/test/ef
. See here for an example - https://github.com/chroma-core/chroma/pull/1271/files#diff-34ec2c15f530afc997a54ec898b37eea1c56dd0c70c7474d2a5ae10149bf810d
Summary of changes: 1. add unit test 2. add checks for parameters. 3. change the response checks and wordings.
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Summary of changes: 1. add test case for missing api key. 2. add check for api key. 3. change the way when calling auth error.
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.
@pig7788, a few more changes, but we're nearly there. Thank you for the perseverance 🥇
Summary of changes: 1. revise test case of testing api key. 2. remove default value from project_id. 3. rewrite condition and exception content to check response.
@tazarov I commit changes that you suggested, please confirm it, thx. |
Our underlying impl has changed and so this PR is not landable as is. That being said - we'd still like to add this functionality and that is now tracked in this issue. |
see issue here.
Description of changes
Summarize the changes made by this PR.