Skip to content

Conversation

@mingkang111
Copy link
Member

@mingkang111 mingkang111 commented Mar 29, 2023

Description

Related JIRA:https://jira.oci.oraclecorp.com/browse/ODSC-39737
Currently, the GenericModel supports two methods that can be used to test the model:

  • verify()
  • predict()

The difference between these two methods is that verify is used for local testing, where predict sends the request to the ML endpoint. Having two different methods confuses users, they don't really understand why we need two different methods for inferring the model.

Changed

  • Add a new attribute - local=True/False to the predict method to be able to invoke the prediction locally.

User Experience

prediction = GenericModel.predict(local=True)

Screenshot 2023-04-05 at 3 54 17 PM

Test

Screenshot 2023-03-29 at 1 08 10 PM

Int test in TC

TC: https://teamcity.oci.oraclecorp.com/buildConfiguration/Odsc_Ads_AdsCiCd_CiTrigger/38127161?buildTab=buildParameters
Screenshot 2023-04-05 at 3 51 59 PM

@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Mar 29, 2023
qiuosier
qiuosier previously approved these changes Mar 31, 2023
mrDzurb
mrDzurb previously approved these changes Apr 4, 2023
mayoor
mayoor previously approved these changes Apr 5, 2023
Copy link
Member

@mayoor mayoor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As a followup, I have a proposal -

If user calls predict and the url is None, when we throw an error, we can provide a message saying, Error invoking the remote endpoint as the model is not deployed yet or the endpoint information is not available. If you intend to invoke inference using locally available model artifact, set parameter local=True

liudmylaru
liudmylaru previously approved these changes Apr 5, 2023
@mingkang111 mingkang111 dismissed stale reviews from liudmylaru, mayoor, mrDzurb, and qiuosier via d61245a April 5, 2023 20:27
@mingkang111
Copy link
Member Author

As a followup, I have a proposal -

If user calls predict and the url is None, when we throw an error, we can provide a message saying, Error invoking the remote endpoint as the model is not deployed yet or the endpoint information is not available. If you intend to invoke inference using locally available model artifact, set parameter local=True

That's a good idea! I just improved the error message as suggested. Thanks Mayoor.

@mingkang111 mingkang111 requested a review from liudmylaru April 5, 2023 20:35
@mingkang111 mingkang111 merged commit 5ddef7e into develop Apr 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

OCA Verified All contributors have signed the Oracle Contributor Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants