-
Notifications
You must be signed in to change notification settings - Fork 55
Caikit embeddings examples + local run documentation #348
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
base: main
Are you sure you want to change the base?
Conversation
643eeb9 to
bb7afe7
Compare
9484fa2 to
6391f73
Compare
6391f73 to
5e750cc
Compare
evaline-ju
left a comment
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.
Thanks for adding examples! Some suggestions + looks like formatting is failing
| "model_id": model_id | ||
| } | ||
| response = requests.post( | ||
| f"http://{host}:8080/api/v1/task/rerank-tasks", |
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.
The host variable is only present under the grpc section - we may want to move that variable out and not make this part conditional on grpc?
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.
removed this to another file - let me know if that was the suggestion?
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.
ah my suggestion wasn't particularly that this had to be a separate file. Previously, the host variable was only under the if get_config().runtime.grpc.enabled: so if that had been disabled, this http portion would've errored. As long as this code runs in all known cases and is easy to follow for a user, I am not particular on file placement 😄
3c04e7f to
0faa969
Compare
Signed-off-by: Flavia Beo <[email protected]>
0faa969 to
ded3b55
Compare
evaline-ju
left a comment
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.
LGTM with nit, assuming all the notebooks and scripts have been run again and confirmed to work with the recent changes
| "model_id": model_id | ||
| } | ||
| response = requests.post( | ||
| f"http://{host}:8080/api/v1/task/rerank-tasks", |
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.
ah my suggestion wasn't particularly that this had to be a separate file. Previously, the host variable was only under the if get_config().runtime.grpc.enabled: so if that had been disabled, this http portion would've errored. As long as this code runs in all known cases and is easy to follow for a user, I am not particular on file placement 😄
| request, metadata=[("mm-model-id", model_id)], timeout=1 | ||
| ) | ||
|
|
||
| # print("RESPONSE:", response) |
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.
nit: removable?
| # print("RESPONSE:", response) | |
| # print("RESPONSE:", response) |
| os.environ['ALLOW_DOWNLOADS'] = "1" | ||
|
|
||
| import caikit_nlp | ||
| model_name = "BAAI/bge-large-en-v1.5" |
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.
Can we change the model name to "sentence-transformers/all-MiniLM-L6-v2" just so that the person who follows this tutorial can mostly copy and paste the commands?
No description provided.