-
Notifications
You must be signed in to change notification settings - Fork 64
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
add predict functionality #318
base: main
Are you sure you want to change the base?
Conversation
DCO is missing. Could you please take a look at this? |
@@ -494,6 +494,34 @@ def generate_embedding(self, model_id: str, sentences: List[str]) -> object: | |||
body=API_BODY, | |||
) | |||
|
|||
def predict(self, model_id: str, algo_name: str, input_json): | |||
|
|||
API_URL = f"{ML_BASE_URI}/_predict/{algo_name}/{model_id}/_deploy" |
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.
I don't think, this is the correct endpoint for the predict functionality.
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 pointing out. Already changed this
Signed-off-by: yimingl9 <[email protected]>
Modify request Signed-off-by: yimingl9 <[email protected]>
@plzdoo , can you take latest changes from main? You can reuse |
@plzdoo linting is failing. Can you check this? Please let me know if you are facing any blocker? |
@plzdoo , can you pull latest changes from dev? |
|
@@ -237,6 +237,64 @@ def test_DEPRECATED_integration_pretrained_model_upload_unload_delete(): | |||
raised = True | |||
assert raised == False, "Raised Exception in deleting pretrained model" | |||
|
|||
def test_predict(): | |||
input_json = { |
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 you consider taking iris_index
as an argument here. Since, that is a fixture, you would have the iris data in the opensearch in an index. iris_index
variable will have the actual name of the index here.. So, input_index
can be iris_index
@plzdoo are you working on this? |
Description
[Describe what this change achieves]
Issues Resolved
[List any issues this PR will resolve]
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.