Class ModelDeploymentClient
Service client instance for ModelDeployment.
Implements
Inherited Members
Namespace: Oci.ModeldeploymentService
Assembly: OCI.DotNetSDK.Modeldeployment.dll
Syntax
public class ModelDeploymentClient : RegionalClientBase, IDisposable
Constructors
ModelDeploymentClient(IBasicAuthenticationDetailsProvider, ClientConfiguration, string)
Creates a new service instance using the given authentication provider and/or client configuration and/or endpoint. A client configuration can also be provided optionally to adjust REST client behaviors.
Declaration
public ModelDeploymentClient(IBasicAuthenticationDetailsProvider authenticationDetailsProvider, ClientConfiguration clientConfiguration = null, string endpoint = null)
Parameters
Type | Name | Description |
---|---|---|
IBasicAuthenticationDetailsProvider | authenticationDetailsProvider | The authentication details provider. Required. |
ClientConfiguration | clientConfiguration | The client configuration that contains settings to adjust REST client behaviors. Optional. |
string | endpoint | The endpoint of the service. If not provided and the client is a regional client, the endpoint will be constructed based on region information. Optional. |
Methods
Predict(PredictRequest, RetryConfiguration, CancellationToken, HttpCompletionOption)
Invoking a model deployment calls the predict endpoint of the model deployment URI. This endpoint takes sample data as input and is processed using the predict() function in score.py model artifact file
Declaration
public Task<PredictResponse> Predict(PredictRequest request, RetryConfiguration retryConfiguration = null, CancellationToken cancellationToken = default, HttpCompletionOption completionOption = HttpCompletionOption.ResponseContentRead)
Parameters
Type | Name | Description |
---|---|---|
PredictRequest | request | The request object containing the details to send. Required. |
RetryConfiguration | retryConfiguration | The retry configuration that will be used by to send this request. Optional. |
CancellationToken | cancellationToken | The cancellation token to cancel this operation. Optional. |
HttpCompletionOption | completionOption | The completion option for this operation. Optional. |
Returns
Type | Description |
---|---|
Task<PredictResponse> | A response object containing details about the completed operation |
Examples
Click here to see an example of how to use Predict API.
PredictWithResponseStream(PredictWithResponseStreamRequest, RetryConfiguration, CancellationToken, HttpCompletionOption)
Invoking a model deployment calls the predictWithResponseStream endpoint of the model deployment URI to get the streaming result. This endpoint takes sample data as input and is processed using the predict() function in score.py model artifact file
Declaration
public Task<PredictWithResponseStreamResponse> PredictWithResponseStream(PredictWithResponseStreamRequest request, RetryConfiguration retryConfiguration = null, CancellationToken cancellationToken = default, HttpCompletionOption completionOption = HttpCompletionOption.ResponseContentRead)
Parameters
Type | Name | Description |
---|---|---|
PredictWithResponseStreamRequest | request | The request object containing the details to send. Required. |
RetryConfiguration | retryConfiguration | The retry configuration that will be used by to send this request. Optional. |
CancellationToken | cancellationToken | The cancellation token to cancel this operation. Optional. |
HttpCompletionOption | completionOption | The completion option for this operation. Optional. |
Returns
Type | Description |
---|---|
Task<PredictWithResponseStreamResponse> | A response object containing details about the completed operation |
Examples
Click here to see an example of how to use PredictWithResponseStream API.