DataScienceClient

class oci.data_science.DataScienceClient(config, **kwargs)

Use the Data Science API to organize your data science work, access data and computing resources, and build, train, deploy and manage models and model deployments. For more information, see [Data Science](https://docs.oracle.com/iaas/data-science/using/data-science.htm).

Methods

__init__(config, **kwargs) Creates a new service client
activate_model(model_id, **kwargs) Activates the model.
activate_model_deployment(…) Activates the model deployment.
activate_notebook_session(…) Activates the notebook session.
cancel_job_run(job_run_id, **kwargs) Cancels an IN_PROGRESS job run.
cancel_work_request(work_request_id, **kwargs) Cancels a work request that has not started.
change_job_compartment(job_id, …) Changes a job’s compartment
change_job_run_compartment(job_run_id, …) Changes a job run’s compartment
change_model_compartment(model_id, …) Moves a model resource into a different compartment.
change_model_deployment_compartment(…) Moves a model deployment into a different compartment.
change_notebook_session_compartment(…) Moves a notebook session resource into a different compartment.
change_project_compartment(project_id, …) Moves a project resource into a different compartment.
create_job(create_job_details, **kwargs) Creates a job.
create_job_artifact(job_id, job_artifact, …) Uploads a job artifact.
create_job_run(create_job_run_details, **kwargs) Creates a job run.
create_model(create_model_details, **kwargs) Creates a new model.
create_model_artifact(model_id, …) Creates model artifact for specified model.
create_model_deployment(…) Creates a new model deployment.
create_model_provenance(model_id, …) Creates provenance information for the specified model.
create_notebook_session(…) Creates a new notebook session.
create_project(create_project_details, **kwargs) Creates a new project.
deactivate_model(model_id, **kwargs) Deactivates the model.
deactivate_model_deployment(…) Deactivates the model deployment.
deactivate_notebook_session(…) Deactivates the notebook session.
delete_job(job_id, **kwargs) Deletes a job.
delete_job_run(job_run_id, **kwargs) Deletes a job run.
delete_model(model_id, **kwargs) Deletes the specified model.
delete_model_deployment(model_deployment_id, …) Deletes the specified model deployment.
delete_notebook_session(notebook_session_id, …) Deletes the specified notebook session.
delete_project(project_id, **kwargs) Deletes the specified project.
get_job(job_id, **kwargs) Gets a job.
get_job_artifact_content(job_id, **kwargs) Downloads job artifact content for specified job.
get_job_run(job_run_id, **kwargs) Gets a job run.
get_model(model_id, **kwargs) Gets the specified model’s information.
get_model_artifact_content(model_id, **kwargs) Downloads model artifact content for specified model.
get_model_deployment(model_deployment_id, …) Retrieves the model deployment for the specified modelDeploymentId.
get_model_provenance(model_id, **kwargs) Gets provenance information for specified model.
get_notebook_session(notebook_session_id, …) Gets the specified notebook session’s information.
get_project(project_id, **kwargs) Gets the specified project’s information.
get_work_request(work_request_id, **kwargs) Gets the specified work request’s information.
head_job_artifact(job_id, **kwargs) Gets job artifact metadata.
head_model_artifact(model_id, **kwargs) Gets model artifact metadata for specified model.
list_fast_launch_job_configs(compartment_id, …) List fast launch capable job configs in the specified compartment.
list_job_runs(compartment_id, **kwargs) List out job runs.
list_job_shapes(compartment_id, **kwargs) List job shapes available in the specified compartment.
list_jobs(compartment_id, **kwargs) List jobs in the specified compartment.
list_model_deployment_shapes(compartment_id, …) Lists the valid model deployment shapes.
list_model_deployments(compartment_id, **kwargs) Lists all model deployments in the specified compartment.
list_models(compartment_id, **kwargs) Lists models in the specified compartment.
list_notebook_session_shapes(compartment_id, …) Lists the valid notebook session shapes.
list_notebook_sessions(compartment_id, **kwargs) Lists the notebook sessions in the specified compartment.
list_projects(compartment_id, **kwargs) Lists projects in the specified compartment.
list_work_request_errors(work_request_id, …) Lists work request errors for the specified work request.
list_work_request_logs(work_request_id, **kwargs) Lists work request logs for the specified work request.
list_work_requests(compartment_id, **kwargs) Lists work requests in the specified compartment.
update_job(job_id, update_job_details, **kwargs) Updates a job.
update_job_run(job_run_id, …) Updates a job run.
update_model(model_id, update_model_details, …) Updates the properties of a model.
update_model_deployment(model_deployment_id, …) Updates the properties of a model deployment.
update_model_provenance(model_id, …) Updates the provenance information for the specified model.
update_notebook_session(notebook_session_id, …) Updates the properties of a notebook session.
update_project(project_id, …) Updates the properties of a project.
__init__(config, **kwargs)

Creates a new service client

Parameters:
  • config (dict) – Configuration keys and values as per SDK and Tool Configuration. The from_file() method can be used to load configuration from a file. Alternatively, a dict can be passed. You can validate_config the dict using validate_config()
  • service_endpoint (str) – (optional) The endpoint of the service to call using this client. For example https://iaas.us-ashburn-1.oraclecloud.com. If this keyword argument is not provided then it will be derived using the region in the config parameter. You should only provide this keyword argument if you have an explicit need to specify a service endpoint.
  • timeout (float or tuple(float, float)) – (optional) The connection and read timeouts for the client. The default values are connection timeout 10 seconds and read timeout 60 seconds. This keyword argument can be provided as a single float, in which case the value provided is used for both the read and connection timeouts, or as a tuple of two floats. If a tuple is provided then the first value is used as the connection timeout and the second value as the read timeout.
  • signer (AbstractBaseSigner) –

    (optional) The signer to use when signing requests made by the service client. The default is to use a Signer based on the values provided in the config parameter.

    One use case for this parameter is for Instance Principals authentication by passing an instance of InstancePrincipalsSecurityTokenSigner as the value for this keyword argument

  • retry_strategy (obj) –

    (optional) A retry strategy to apply to all calls made by this service client (i.e. at the client level). There is no retry strategy applied by default. Retry strategies can also be applied at the operation level by passing a retry_strategy keyword argument as part of calling the operation. Any value provided at the operation level will override whatever is specified at the client level.

    This should be one of the strategies available in the retry module. A convenience DEFAULT_RETRY_STRATEGY is also available. The specifics of the default retry strategy are described here.

  • circuit_breaker_strategy (obj) – (optional) A circuit breaker strategy to apply to all calls made by this service client (i.e. at the client level). This client uses DEFAULT_CIRCUIT_BREAKER_STRATEGY as default if no circuit breaker strategy is provided. The specifics of circuit breaker strategy are described here.
  • circuit_breaker_callback (function) – (optional) Callback function to receive any exceptions triggerred by the circuit breaker.
  • allow_control_chars – (optional) allow_control_chars is a boolean to indicate whether or not this client should allow control characters in the response object. By default, the client will not allow control characters to be in the response object.
activate_model(model_id, **kwargs)

Activates the model.

Parameters:
  • model_id (str) –

    (required) The OCID of the model.

  • if_match (str) – (optional) For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource is updated or deleted only if the etag you provide matches the resource’s current etag value.
  • opc_request_id (str) – (optional) Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID.
  • retry_strategy (obj) –

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. This operation uses DEFAULT_RETRY_STRATEGY as default if no retry strategy is provided. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

  • allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
Returns:

A Response object with data of type Model

Return type:

Response

Example:

Click here to see an example of how to use activate_model API.

activate_model_deployment(model_deployment_id, **kwargs)

Activates the model deployment.

Parameters:
  • model_deployment_id (str) –

    (required) The OCID of the model deployment.

  • if_match (str) – (optional) For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource is updated or deleted only if the etag you provide matches the resource’s current etag value.
  • opc_request_id (str) – (optional) Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID.
  • retry_strategy (obj) –

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. This operation will not retry by default, users can also use the convenient DEFAULT_RETRY_STRATEGY provided by the SDK to enable retries for it. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

  • allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
Returns:

A Response object with data of type None

Return type:

Response

Example:

Click here to see an example of how to use activate_model_deployment API.

activate_notebook_session(notebook_session_id, **kwargs)

Activates the notebook session.

Parameters:
  • notebook_session_id (str) –

    (required) The OCID of the notebook session.

  • if_match (str) – (optional) For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource is updated or deleted only if the etag you provide matches the resource’s current etag value.
  • opc_request_id (str) – (optional) Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID.
  • retry_strategy (obj) –

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. This operation will not retry by default, users can also use the convenient DEFAULT_RETRY_STRATEGY provided by the SDK to enable retries for it. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

  • allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
Returns:

A Response object with data of type None

Return type:

Response

Example:

Click here to see an example of how to use activate_notebook_session API.

cancel_job_run(job_run_id, **kwargs)

Cancels an IN_PROGRESS job run.

Parameters:
  • job_run_id (str) –

    (required) The OCID of the job run.

  • opc_request_id (str) – (optional) Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID.
  • if_match (str) – (optional) For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource is updated or deleted only if the etag you provide matches the resource’s current etag value.
  • retry_strategy (obj) –

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. This operation uses DEFAULT_RETRY_STRATEGY as default if no retry strategy is provided. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

  • allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
Returns:

A Response object with data of type None

Return type:

Response

Example:

Click here to see an example of how to use cancel_job_run API.

cancel_work_request(work_request_id, **kwargs)

Cancels a work request that has not started.

Parameters:
  • work_request_id (str) –

    (required) The OCID of the work request.

  • if_match (str) – (optional) For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource is updated or deleted only if the etag you provide matches the resource’s current etag value.
  • opc_request_id (str) – (optional) Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID.
  • retry_strategy (obj) –

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. This operation will not retry by default, users can also use the convenient DEFAULT_RETRY_STRATEGY provided by the SDK to enable retries for it. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

  • allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
Returns:

A Response object with data of type None

Return type:

Response

Example:

Click here to see an example of how to use cancel_work_request API.

change_job_compartment(job_id, change_job_compartment_details, **kwargs)

Changes a job’s compartment

Parameters:
  • job_id (str) –

    (required) The OCID of the job.

  • change_job_compartment_details (oci.data_science.models.ChangeJobCompartmentDetails) – (required) Details for changing the compartment of a job.
  • if_match (str) – (optional) For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource is updated or deleted only if the etag you provide matches the resource’s current etag value.
  • opc_request_id (str) – (optional) Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID.
  • retry_strategy (obj) –

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. This operation will not retry by default, users can also use the convenient DEFAULT_RETRY_STRATEGY provided by the SDK to enable retries for it. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

  • allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
Returns:

A Response object with data of type None

Return type:

Response

Example:

Click here to see an example of how to use change_job_compartment API.

change_job_run_compartment(job_run_id, change_job_run_compartment_details, **kwargs)

Changes a job run’s compartment

Parameters:
  • job_run_id (str) –

    (required) The OCID of the job run.

  • change_job_run_compartment_details (oci.data_science.models.ChangeJobRunCompartmentDetails) – (required) Details for changing the compartment of a job.
  • if_match (str) – (optional) For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource is updated or deleted only if the etag you provide matches the resource’s current etag value.
  • opc_request_id (str) – (optional) Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID.
  • retry_strategy (obj) –

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. This operation will not retry by default, users can also use the convenient DEFAULT_RETRY_STRATEGY provided by the SDK to enable retries for it. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

  • allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
Returns:

A Response object with data of type None

Return type:

Response

Example:

Click here to see an example of how to use change_job_run_compartment API.

change_model_compartment(model_id, change_model_compartment_details, **kwargs)

Moves a model resource into a different compartment.

Parameters:
  • model_id (str) –

    (required) The OCID of the model.

  • change_model_compartment_details (oci.data_science.models.ChangeModelCompartmentDetails) – (required) Details for changing the compartment of a model.
  • if_match (str) – (optional) For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource is updated or deleted only if the etag you provide matches the resource’s current etag value.
  • opc_request_id (str) – (optional) Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID.
  • opc_retry_token (str) – (optional) A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected.
  • retry_strategy (obj) –

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. This operation will not retry by default, users can also use the convenient DEFAULT_RETRY_STRATEGY provided by the SDK to enable retries for it. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

  • allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
Returns:

A Response object with data of type None

Return type:

Response

Example:

Click here to see an example of how to use change_model_compartment API.

change_model_deployment_compartment(model_deployment_id, change_model_deployment_compartment_details, **kwargs)

Moves a model deployment into a different compartment. When provided, If-Match is checked against ETag values of the resource.

Parameters:
  • model_deployment_id (str) –

    (required) The OCID of the model deployment.

  • change_model_deployment_compartment_details (oci.data_science.models.ChangeModelDeploymentCompartmentDetails) – (required) Details for changing the compartment of a model deployment.
  • if_match (str) – (optional) For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource is updated or deleted only if the etag you provide matches the resource’s current etag value.
  • opc_request_id (str) – (optional) Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID.
  • opc_retry_token (str) – (optional) A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected.
  • retry_strategy (obj) –

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. This operation will not retry by default, users can also use the convenient DEFAULT_RETRY_STRATEGY provided by the SDK to enable retries for it. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

  • allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
Returns:

A Response object with data of type None

Return type:

Response

Example:

Click here to see an example of how to use change_model_deployment_compartment API.

change_notebook_session_compartment(notebook_session_id, change_notebook_session_compartment_details, **kwargs)

Moves a notebook session resource into a different compartment.

Parameters:
  • notebook_session_id (str) –

    (required) The OCID of the notebook session.

  • change_notebook_session_compartment_details (oci.data_science.models.ChangeNotebookSessionCompartmentDetails) – (required) Details for changing the compartment of a notebook session.
  • if_match (str) – (optional) For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource is updated or deleted only if the etag you provide matches the resource’s current etag value.
  • opc_request_id (str) – (optional) Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID.
  • opc_retry_token (str) – (optional) A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected.
  • retry_strategy (obj) –

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. This operation will not retry by default, users can also use the convenient DEFAULT_RETRY_STRATEGY provided by the SDK to enable retries for it. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

  • allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
Returns:

A Response object with data of type None

Return type:

Response

Example:

Click here to see an example of how to use change_notebook_session_compartment API.

change_project_compartment(project_id, change_project_compartment_details, **kwargs)

Moves a project resource into a different compartment.

Parameters:
  • project_id (str) –

    (required) The OCID of the project.

  • change_project_compartment_details (oci.data_science.models.ChangeProjectCompartmentDetails) – (required) Details for changing the compartment of a project.
  • if_match (str) – (optional) For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource is updated or deleted only if the etag you provide matches the resource’s current etag value.
  • opc_request_id (str) – (optional) Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID.
  • opc_retry_token (str) – (optional) A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected.
  • retry_strategy (obj) –

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. This operation will not retry by default, users can also use the convenient DEFAULT_RETRY_STRATEGY provided by the SDK to enable retries for it. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

  • allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
Returns:

A Response object with data of type None

Return type:

Response

Example:

Click here to see an example of how to use change_project_compartment API.

create_job(create_job_details, **kwargs)

Creates a job.

Parameters:
  • create_job_details (oci.data_science.models.CreateJobDetails) – (required) Details for creating a new job.
  • opc_request_id (str) – (optional) Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID.
  • opc_retry_token (str) – (optional) A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected.
  • retry_strategy (obj) –

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. This operation uses DEFAULT_RETRY_STRATEGY as default if no retry strategy is provided. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

  • allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
Returns:

A Response object with data of type Job

Return type:

Response

Example:

Click here to see an example of how to use create_job API.

create_job_artifact(job_id, job_artifact, **kwargs)

Uploads a job artifact.

Parameters:
  • job_id (str) –

    (required) The OCID of the job.

  • job_artifact (stream) – (required) The job artifact to upload.
  • content_length (int) – (optional) The content length of the body.
  • opc_request_id (str) – (optional) Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID.
  • opc_retry_token (str) – (optional) A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected.
  • content_disposition (str) – (optional) This header is for specifying a filename during upload. It is used to identify the file type and validate if the file type is supported. Example: –content-disposition “attachment; filename=hello-world.py”
  • retry_strategy (obj) –

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. This operation will not retry by default, users can also use the convenient DEFAULT_RETRY_STRATEGY provided by the SDK to enable retries for it. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

  • allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
  • buffer_limit (int) –

    (optional) A buffer limit for the stream to be buffered. buffer_limit is used to set the buffer size capacity. Streams will be read until the size of the buffer reaches the buffer_limit. If the stream size is greater than the buffer_limit, a BufferError exception will be thrown.

    The buffer_limit parameter is used when the stream object does not have a seek, tell, or fileno property for the Python Request library to calculate out the content length. If buffer_limit is not passed, then the buffer_limit will be defaulted to 100MB. Large streams can cause the process to freeze, consider passing in content-length for large streams instead.

Returns:

A Response object with data of type None

Return type:

Response

Example:

Click here to see an example of how to use create_job_artifact API.

create_job_run(create_job_run_details, **kwargs)

Creates a job run.

Parameters:
  • create_job_run_details (oci.data_science.models.CreateJobRunDetails) – (required) Details for creating a new job run.
  • opc_request_id (str) – (optional) Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID.
  • opc_retry_token (str) – (optional) A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected.
  • retry_strategy (obj) –

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. This operation uses DEFAULT_RETRY_STRATEGY as default if no retry strategy is provided. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

  • allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
Returns:

A Response object with data of type JobRun

Return type:

Response

Example:

Click here to see an example of how to use create_job_run API.

create_model(create_model_details, **kwargs)

Creates a new model.

Parameters:
  • create_model_details (oci.data_science.models.CreateModelDetails) – (required) Details for creating a new model.
  • opc_request_id (str) – (optional) Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID.
  • opc_retry_token (str) – (optional) A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected.
  • retry_strategy (obj) –

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. This operation uses DEFAULT_RETRY_STRATEGY as default if no retry strategy is provided. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

  • allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
Returns:

A Response object with data of type Model

Return type:

Response

Example:

Click here to see an example of how to use create_model API.

create_model_artifact(model_id, model_artifact, **kwargs)

Creates model artifact for specified model.

Parameters:
  • model_id (str) –

    (required) The OCID of the model.

  • model_artifact (stream) – (required) The model artifact to upload.
  • content_length (int) – (optional) The content length of the body.
  • opc_request_id (str) – (optional) Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID.
  • opc_retry_token (str) – (optional) A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected.
  • content_disposition (str) –

    (optional) This header allows you to specify a filename during upload. This file name is used to dispose of the file contents while downloading the file. If this optional field is not populated in the request, then the OCID of the model is used for the file name when downloading. Example: `{“Content-Disposition”: “attachment”

    ”filename”=”model.tar.gz” “Content-Length”: “2347” “Content-Type”: “application/gzip”}`
  • retry_strategy (obj) –

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. This operation uses DEFAULT_RETRY_STRATEGY as default if no retry strategy is provided. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

  • allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
  • buffer_limit (int) –

    (optional) A buffer limit for the stream to be buffered. buffer_limit is used to set the buffer size capacity. Streams will be read until the size of the buffer reaches the buffer_limit. If the stream size is greater than the buffer_limit, a BufferError exception will be thrown.

    The buffer_limit parameter is used when the stream object does not have a seek, tell, or fileno property for the Python Request library to calculate out the content length. If buffer_limit is not passed, then the buffer_limit will be defaulted to 100MB. Large streams can cause the process to freeze, consider passing in content-length for large streams instead.

Returns:

A Response object with data of type None

Return type:

Response

Example:

Click here to see an example of how to use create_model_artifact API.

create_model_deployment(create_model_deployment_details, **kwargs)

Creates a new model deployment.

Parameters:
  • create_model_deployment_details (oci.data_science.models.CreateModelDeploymentDetails) – (required) Details for creating a new model deployment.
  • opc_request_id (str) – (optional) Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID.
  • opc_retry_token (str) – (optional) A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected.
  • retry_strategy (obj) –

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. This operation uses DEFAULT_RETRY_STRATEGY as default if no retry strategy is provided. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

  • allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
Returns:

A Response object with data of type ModelDeployment

Return type:

Response

Example:

Click here to see an example of how to use create_model_deployment API.

create_model_provenance(model_id, create_model_provenance_details, **kwargs)

Creates provenance information for the specified model.

Parameters:
  • model_id (str) –

    (required) The OCID of the model.

  • create_model_provenance_details (oci.data_science.models.CreateModelProvenanceDetails) – (required) Provenance information for specified model.
  • opc_request_id (str) – (optional) Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID.
  • opc_retry_token (str) – (optional) A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected.
  • retry_strategy (obj) –

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. This operation uses DEFAULT_RETRY_STRATEGY as default if no retry strategy is provided. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

  • allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
Returns:

A Response object with data of type ModelProvenance

Return type:

Response

Example:

Click here to see an example of how to use create_model_provenance API.

create_notebook_session(create_notebook_session_details, **kwargs)

Creates a new notebook session.

Parameters:
  • create_notebook_session_details (oci.data_science.models.CreateNotebookSessionDetails) – (required) Details for creating a new notebook session.
  • opc_request_id (str) – (optional) Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID.
  • opc_retry_token (str) – (optional) A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected.
  • retry_strategy (obj) –

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. This operation uses DEFAULT_RETRY_STRATEGY as default if no retry strategy is provided. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

  • allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
Returns:

A Response object with data of type NotebookSession

Return type:

Response

Example:

Click here to see an example of how to use create_notebook_session API.

create_project(create_project_details, **kwargs)

Creates a new project.

Parameters:
  • create_project_details (oci.data_science.models.CreateProjectDetails) – (required) Details for creating a new project.
  • opc_request_id (str) – (optional) Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID.
  • opc_retry_token (str) – (optional) A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected.
  • retry_strategy (obj) –

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. This operation uses DEFAULT_RETRY_STRATEGY as default if no retry strategy is provided. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

  • allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
Returns:

A Response object with data of type Project

Return type:

Response

Example:

Click here to see an example of how to use create_project API.

deactivate_model(model_id, **kwargs)

Deactivates the model.

Parameters:
  • model_id (str) –

    (required) The OCID of the model.

  • if_match (str) – (optional) For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource is updated or deleted only if the etag you provide matches the resource’s current etag value.
  • opc_request_id (str) – (optional) Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID.
  • retry_strategy (obj) –

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. This operation uses DEFAULT_RETRY_STRATEGY as default if no retry strategy is provided. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

  • allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
Returns:

A Response object with data of type Model

Return type:

Response

Example:

Click here to see an example of how to use deactivate_model API.

deactivate_model_deployment(model_deployment_id, **kwargs)

Deactivates the model deployment.

Parameters:
  • model_deployment_id (str) –

    (required) The OCID of the model deployment.

  • if_match (str) – (optional) For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource is updated or deleted only if the etag you provide matches the resource’s current etag value.
  • opc_request_id (str) – (optional) Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID.
  • retry_strategy (obj) –

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. This operation will not retry by default, users can also use the convenient DEFAULT_RETRY_STRATEGY provided by the SDK to enable retries for it. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

  • allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
Returns:

A Response object with data of type None

Return type:

Response

Example:

Click here to see an example of how to use deactivate_model_deployment API.

deactivate_notebook_session(notebook_session_id, **kwargs)

Deactivates the notebook session.

Parameters:
  • notebook_session_id (str) –

    (required) The OCID of the notebook session.

  • if_match (str) – (optional) For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource is updated or deleted only if the etag you provide matches the resource’s current etag value.
  • opc_request_id (str) – (optional) Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID.
  • retry_strategy (obj) –

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. This operation will not retry by default, users can also use the convenient DEFAULT_RETRY_STRATEGY provided by the SDK to enable retries for it. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

  • allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
Returns:

A Response object with data of type None

Return type:

Response

Example:

Click here to see an example of how to use deactivate_notebook_session API.

delete_job(job_id, **kwargs)

Deletes a job.

Parameters:
  • job_id (str) –

    (required) The OCID of the job.

  • if_match (str) – (optional) For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource is updated or deleted only if the etag you provide matches the resource’s current etag value.
  • opc_request_id (str) – (optional) Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID.
  • delete_related_job_runs (bool) – (optional) Delete all JobRuns associated with this job.
  • retry_strategy (obj) –

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. This operation uses DEFAULT_RETRY_STRATEGY as default if no retry strategy is provided. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

  • allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
Returns:

A Response object with data of type None

Return type:

Response

Example:

Click here to see an example of how to use delete_job API.

delete_job_run(job_run_id, **kwargs)

Deletes a job run.

Parameters:
  • job_run_id (str) –

    (required) The OCID of the job run.

  • if_match (str) – (optional) For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource is updated or deleted only if the etag you provide matches the resource’s current etag value.
  • opc_request_id (str) – (optional) Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID.
  • retry_strategy (obj) –

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. This operation uses DEFAULT_RETRY_STRATEGY as default if no retry strategy is provided. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

  • allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
Returns:

A Response object with data of type None

Return type:

Response

Example:

Click here to see an example of how to use delete_job_run API.

delete_model(model_id, **kwargs)

Deletes the specified model.

Parameters:
  • model_id (str) –

    (required) The OCID of the model.

  • if_match (str) – (optional) For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource is updated or deleted only if the etag you provide matches the resource’s current etag value.
  • opc_request_id (str) – (optional) Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID.
  • retry_strategy (obj) –

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. This operation uses DEFAULT_RETRY_STRATEGY as default if no retry strategy is provided. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

  • allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
Returns:

A Response object with data of type None

Return type:

Response

Example:

Click here to see an example of how to use delete_model API.

delete_model_deployment(model_deployment_id, **kwargs)

Deletes the specified model deployment. Any unsaved work in this model deployment is lost.

Parameters:
  • model_deployment_id (str) –

    (required) The OCID of the model deployment.

  • if_match (str) – (optional) For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource is updated or deleted only if the etag you provide matches the resource’s current etag value.
  • opc_request_id (str) – (optional) Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID.
  • retry_strategy (obj) –

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. This operation uses DEFAULT_RETRY_STRATEGY as default if no retry strategy is provided. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

  • allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
Returns:

A Response object with data of type None

Return type:

Response

Example:

Click here to see an example of how to use delete_model_deployment API.

delete_notebook_session(notebook_session_id, **kwargs)

Deletes the specified notebook session. Any unsaved work in this notebook session are lost.

Parameters:
  • notebook_session_id (str) –

    (required) The OCID of the notebook session.

  • if_match (str) – (optional) For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource is updated or deleted only if the etag you provide matches the resource’s current etag value.
  • opc_request_id (str) – (optional) Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID.
  • retry_strategy (obj) –

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. This operation uses DEFAULT_RETRY_STRATEGY as default if no retry strategy is provided. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

  • allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
Returns:

A Response object with data of type None

Return type:

Response

Example:

Click here to see an example of how to use delete_notebook_session API.

delete_project(project_id, **kwargs)

Deletes the specified project. This operation fails unless all associated resources (notebook sessions or models) are in a DELETED state. You must delete all associated resources before deleting a project.

Parameters:
  • project_id (str) –

    (required) The OCID of the project.

  • if_match (str) – (optional) For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource is updated or deleted only if the etag you provide matches the resource’s current etag value.
  • opc_request_id (str) – (optional) Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID.
  • retry_strategy (obj) –

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. This operation uses DEFAULT_RETRY_STRATEGY as default if no retry strategy is provided. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

  • allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
Returns:

A Response object with data of type None

Return type:

Response

Example:

Click here to see an example of how to use delete_project API.

get_job(job_id, **kwargs)

Gets a job.

Parameters:
  • job_id (str) –

    (required) The OCID of the job.

  • opc_request_id (str) – (optional) Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID.
  • retry_strategy (obj) –

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. This operation uses DEFAULT_RETRY_STRATEGY as default if no retry strategy is provided. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

  • allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
Returns:

A Response object with data of type Job

Return type:

Response

Example:

Click here to see an example of how to use get_job API.

get_job_artifact_content(job_id, **kwargs)

Downloads job artifact content for specified job.

Parameters:
  • job_id (str) –

    (required) The OCID of the job.

  • opc_request_id (str) – (optional) Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID.
  • range (str) –

    (optional) Optional byte range to fetch, as described in RFC 7233, section 2.1. Note that only a single range of bytes is supported.

  • retry_strategy (obj) –

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. This operation uses DEFAULT_RETRY_STRATEGY as default if no retry strategy is provided. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

  • allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
Returns:

A Response object with data of type stream

Return type:

Response

Example:

Click here to see an example of how to use get_job_artifact_content API.

get_job_run(job_run_id, **kwargs)

Gets a job run.

Parameters:
  • job_run_id (str) –

    (required) The OCID of the job run.

  • opc_request_id (str) – (optional) Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID.
  • retry_strategy (obj) –

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. This operation uses DEFAULT_RETRY_STRATEGY as default if no retry strategy is provided. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

  • allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
Returns:

A Response object with data of type JobRun

Return type:

Response

Example:

Click here to see an example of how to use get_job_run API.

get_model(model_id, **kwargs)

Gets the specified model’s information.

Parameters:
  • model_id (str) –

    (required) The OCID of the model.

  • opc_request_id (str) – (optional) Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID.
  • retry_strategy (obj) –

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. This operation uses DEFAULT_RETRY_STRATEGY as default if no retry strategy is provided. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

  • allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
Returns:

A Response object with data of type Model

Return type:

Response

Example:

Click here to see an example of how to use get_model API.

get_model_artifact_content(model_id, **kwargs)

Downloads model artifact content for specified model.

Parameters:
  • model_id (str) –

    (required) The OCID of the model.

  • opc_request_id (str) – (optional) Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID.
  • range (str) –

    (optional) Optional byte range to fetch, as described in RFC 7233, section 2.1. Note that only a single range of bytes is supported.

  • retry_strategy (obj) –

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. This operation uses DEFAULT_RETRY_STRATEGY as default if no retry strategy is provided. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

  • allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
Returns:

A Response object with data of type stream

Return type:

Response

Example:

Click here to see an example of how to use get_model_artifact_content API.

get_model_deployment(model_deployment_id, **kwargs)

Retrieves the model deployment for the specified modelDeploymentId.

Parameters:
  • model_deployment_id (str) –

    (required) The OCID of the model deployment.

  • opc_request_id (str) – (optional) Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID.
  • retry_strategy (obj) –

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. This operation uses DEFAULT_RETRY_STRATEGY as default if no retry strategy is provided. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

  • allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
Returns:

A Response object with data of type ModelDeployment

Return type:

Response

Example:

Click here to see an example of how to use get_model_deployment API.

get_model_provenance(model_id, **kwargs)

Gets provenance information for specified model.

Parameters:
  • model_id (str) –

    (required) The OCID of the model.

  • opc_request_id (str) – (optional) Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID.
  • retry_strategy (obj) –

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. This operation uses DEFAULT_RETRY_STRATEGY as default if no retry strategy is provided. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

  • allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
Returns:

A Response object with data of type ModelProvenance

Return type:

Response

Example:

Click here to see an example of how to use get_model_provenance API.

get_notebook_session(notebook_session_id, **kwargs)

Gets the specified notebook session’s information.

Parameters:
  • notebook_session_id (str) –

    (required) The OCID of the notebook session.

  • opc_request_id (str) – (optional) Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID.
  • retry_strategy (obj) –

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. This operation uses DEFAULT_RETRY_STRATEGY as default if no retry strategy is provided. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

  • allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
Returns:

A Response object with data of type NotebookSession

Return type:

Response

Example:

Click here to see an example of how to use get_notebook_session API.

get_project(project_id, **kwargs)

Gets the specified project’s information.

Parameters:
  • project_id (str) –

    (required) The OCID of the project.

  • opc_request_id (str) – (optional) Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID.
  • retry_strategy (obj) –

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. This operation uses DEFAULT_RETRY_STRATEGY as default if no retry strategy is provided. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

  • allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
Returns:

A Response object with data of type Project

Return type:

Response

Example:

Click here to see an example of how to use get_project API.

get_work_request(work_request_id, **kwargs)

Gets the specified work request’s information.

Parameters:
  • work_request_id (str) –

    (required) The OCID of the work request.

  • opc_request_id (str) – (optional) Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID.
  • retry_strategy (obj) –

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. This operation will not retry by default, users can also use the convenient DEFAULT_RETRY_STRATEGY provided by the SDK to enable retries for it. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

  • allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
Returns:

A Response object with data of type WorkRequest

Return type:

Response

Example:

Click here to see an example of how to use get_work_request API.

head_job_artifact(job_id, **kwargs)

Gets job artifact metadata.

Parameters:
  • job_id (str) –

    (required) The OCID of the job.

  • opc_request_id (str) – (optional) Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID.
  • retry_strategy (obj) –

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. This operation uses DEFAULT_RETRY_STRATEGY as default if no retry strategy is provided. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

  • allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
Returns:

A Response object with data of type None

Return type:

Response

Example:

Click here to see an example of how to use head_job_artifact API.

head_model_artifact(model_id, **kwargs)

Gets model artifact metadata for specified model.

Parameters:
  • model_id (str) –

    (required) The OCID of the model.

  • opc_request_id (str) – (optional) Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID.
  • retry_strategy (obj) –

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. This operation uses DEFAULT_RETRY_STRATEGY as default if no retry strategy is provided. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

  • allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
Returns:

A Response object with data of type None

Return type:

Response

Example:

Click here to see an example of how to use head_model_artifact API.

list_fast_launch_job_configs(compartment_id, **kwargs)

List fast launch capable job configs in the specified compartment.

Parameters:
  • compartment_id (str) –

    (required) <b>Filter</b> results by the OCID of the compartment.

  • opc_request_id (str) – (optional) Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID.
  • limit (int) –

    (optional) For list pagination. The maximum number of results per page, or items to return in a paginated “List” call. 1 is the minimum, 1000 is the maximum. See List Pagination.

    Example: 500

  • page (str) –

    (optional) For list pagination. The value of the opc-next-page response header from the previous “List” call.

    See List Pagination.

  • retry_strategy (obj) –

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. This operation uses DEFAULT_RETRY_STRATEGY as default if no retry strategy is provided. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

  • allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
Returns:

A Response object with data of type list of FastLaunchJobConfigSummary

Return type:

Response

Example:

Click here to see an example of how to use list_fast_launch_job_configs API.

list_job_runs(compartment_id, **kwargs)

List out job runs.

Parameters:
  • compartment_id (str) –

    (required) <b>Filter</b> results by the OCID of the compartment.

  • id (str) –

    (optional) <b>Filter</b> results by OCID. Must be an OCID of the correct type for the resource type.

  • job_id (str) –

    (optional) The OCID of the job.

  • created_by (str) –

    (optional) <b>Filter</b> results by the OCID of the user who created the resource.

  • display_name (str) – (optional) <b>Filter</b> results by its user-friendly name.
  • opc_request_id (str) – (optional) Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID.
  • limit (int) –

    (optional) For list pagination. The maximum number of results per page, or items to return in a paginated “List” call. 1 is the minimum, 1000 is the maximum. See List Pagination.

    Example: 500

  • page (str) –

    (optional) For list pagination. The value of the opc-next-page response header from the previous “List” call.

    See List Pagination.

  • sort_order (str) –

    (optional) Specifies sort order to use, either ASC (ascending) or DESC (descending).

    Allowed values are: “ASC”, “DESC”

  • sort_by (str) –

    (optional) Specifies the field to sort by. Accepts only one field. By default, when you sort by timeCreated, the results are shown in descending order. When you sort by displayName, the results are shown in ascending order. Sort order for the displayName field is case sensitive.

    Allowed values are: “timeCreated”, “displayName”

  • lifecycle_state (str) –

    (optional) <b>Filter</b> results by the specified lifecycle state. Must be a valid state for the resource type.

    Allowed values are: “ACCEPTED”, “IN_PROGRESS”, “FAILED”, “SUCCEEDED”, “CANCELING”, “CANCELED”, “DELETED”, “NEEDS_ATTENTION”

  • retry_strategy (obj) –

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. This operation uses DEFAULT_RETRY_STRATEGY as default if no retry strategy is provided. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

  • allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
Returns:

A Response object with data of type list of JobRunSummary

Return type:

Response

Example:

Click here to see an example of how to use list_job_runs API.

list_job_shapes(compartment_id, **kwargs)

List job shapes available in the specified compartment.

Parameters:
  • compartment_id (str) –

    (required) <b>Filter</b> results by the OCID of the compartment.

  • opc_request_id (str) – (optional) Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID.
  • limit (int) –

    (optional) For list pagination. The maximum number of results per page, or items to return in a paginated “List” call. 1 is the minimum, 1000 is the maximum. See List Pagination.

    Example: 500

  • page (str) –

    (optional) For list pagination. The value of the opc-next-page response header from the previous “List” call.

    See List Pagination.

  • retry_strategy (obj) –

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. This operation uses DEFAULT_RETRY_STRATEGY as default if no retry strategy is provided. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

  • allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
Returns:

A Response object with data of type list of JobShapeSummary

Return type:

Response

Example:

Click here to see an example of how to use list_job_shapes API.

list_jobs(compartment_id, **kwargs)

List jobs in the specified compartment.

Parameters:
  • compartment_id (str) –

    (required) <b>Filter</b> results by the OCID of the compartment.

  • project_id (str) –

    (optional) <b>Filter</b> results by the OCID of the project.

  • id (str) –

    (optional) <b>Filter</b> results by OCID. Must be an OCID of the correct type for the resource type.

  • display_name (str) – (optional) <b>Filter</b> results by its user-friendly name.
  • lifecycle_state (str) –

    (optional) <b>Filter</b> results by the specified lifecycle state. Must be a valid

    state for the resource type.

    Allowed values are: “CREATING”, “ACTIVE”, “DELETING”, “FAILED”, “DELETED”

  • created_by (str) –

    (optional) <b>Filter</b> results by the OCID of the user who created the resource.

  • limit (int) –

    (optional) For list pagination. The maximum number of results per page, or items to return in a paginated “List” call. 1 is the minimum, 1000 is the maximum. See List Pagination.

    Example: 500

  • page (str) –

    (optional) For list pagination. The value of the opc-next-page response header from the previous “List” call.

    See List Pagination.

  • sort_order (str) –

    (optional) Specifies sort order to use, either ASC (ascending) or DESC (descending).

    Allowed values are: “ASC”, “DESC”

  • sort_by (str) –

    (optional) Specifies the field to sort by. Accepts only one field. By default, when you sort by timeCreated, the results are shown in descending order. When you sort by displayName, the results are shown in ascending order. Sort order for the displayName field is case sensitive.

    Allowed values are: “timeCreated”, “displayName”

  • opc_request_id (str) – (optional) Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID.
  • retry_strategy (obj) –

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. This operation uses DEFAULT_RETRY_STRATEGY as default if no retry strategy is provided. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

  • allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
Returns:

A Response object with data of type list of JobSummary

Return type:

Response

Example:

Click here to see an example of how to use list_jobs API.

list_model_deployment_shapes(compartment_id, **kwargs)

Lists the valid model deployment shapes.

Parameters:
  • compartment_id (str) –

    (required) <b>Filter</b> results by the OCID of the compartment.

  • opc_request_id (str) – (optional) Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID.
  • limit (int) –

    (optional) For list pagination. The maximum number of results per page, or items to return in a paginated “List” call. 1 is the minimum, 1000 is the maximum. See List Pagination.

    Example: 500

  • page (str) –

    (optional) For list pagination. The value of the opc-next-page response header from the previous “List” call.

    See List Pagination.

  • retry_strategy (obj) –

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. This operation uses DEFAULT_RETRY_STRATEGY as default if no retry strategy is provided. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

  • allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
Returns:

A Response object with data of type list of ModelDeploymentShapeSummary

Return type:

Response

Example:

Click here to see an example of how to use list_model_deployment_shapes API.

list_model_deployments(compartment_id, **kwargs)

Lists all model deployments in the specified compartment. Only one parameter other than compartmentId may also be included in a query. The query must include compartmentId. If the query does not include compartmentId, or includes compartmentId but two or more other parameters an error is returned.

Parameters:
  • compartment_id (str) –

    (required) <b>Filter</b> results by the OCID of the compartment.

  • id (str) –

    (optional) <b>Filter</b> results by OCID. Must be an OCID of the correct type for the resource type.

  • project_id (str) –

    (optional) <b>Filter</b> results by the OCID of the project.

  • display_name (str) – (optional) <b>Filter</b> results by its user-friendly name.
  • lifecycle_state (str) –

    (optional) <b>Filter</b> results by the specified lifecycle state. Must be a valid state for the resource type.

    Allowed values are: “CREATING”, “ACTIVE”, “DELETING”, “FAILED”, “INACTIVE”, “UPDATING”, “DELETED”, “NEEDS_ATTENTION”

  • created_by (str) –

    (optional) <b>Filter</b> results by the OCID of the user who created the resource.

  • limit (int) –

    (optional) For list pagination. The maximum number of results per page, or items to return in a paginated “List” call. 1 is the minimum, 1000 is the maximum. See List Pagination.

    Example: 500

  • page (str) –

    (optional) For list pagination. The value of the opc-next-page response header from the previous “List” call.

    See List Pagination.

  • sort_order (str) –

    (optional) Specifies sort order to use, either ASC (ascending) or DESC (descending).

    Allowed values are: “ASC”, “DESC”

  • sort_by (str) –

    (optional) Specifies the field to sort by. Accepts only one field. By default, when you sort by timeCreated, results are shown in descending order. When you sort by displayName, results are shown in ascending order. Sort order for the displayName field is case sensitive.

    Allowed values are: “timeCreated”, “displayName”

  • opc_request_id (str) – (optional) Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID.
  • retry_strategy (obj) –

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. This operation uses DEFAULT_RETRY_STRATEGY as default if no retry strategy is provided. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

  • allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
Returns:

A Response object with data of type list of ModelDeploymentSummary

Return type:

Response

Example:

Click here to see an example of how to use list_model_deployments API.

list_models(compartment_id, **kwargs)

Lists models in the specified compartment.

Parameters:
  • compartment_id (str) –

    (required) <b>Filter</b> results by the OCID of the compartment.

  • id (str) –

    (optional) <b>Filter</b> results by OCID. Must be an OCID of the correct type for the resource type.

  • project_id (str) –

    (optional) <b>Filter</b> results by the OCID of the project.

  • display_name (str) – (optional) <b>Filter</b> results by its user-friendly name.
  • lifecycle_state (str) –

    (optional) <b>Filter</b> results by the specified lifecycle state. Must be a valid state for the resource type.

    Allowed values are: “ACTIVE”, “DELETED”, “FAILED”, “INACTIVE”

  • created_by (str) –

    (optional) <b>Filter</b> results by the OCID of the user who created the resource.

  • limit (int) –

    (optional) For list pagination. The maximum number of results per page, or items to return in a paginated “List” call. 1 is the minimum, 1000 is the maximum. See List Pagination.

    Example: 500

  • page (str) –

    (optional) For list pagination. The value of the opc-next-page response header from the previous “List” call.

    See List Pagination.

  • sort_order (str) –

    (optional) Specifies sort order to use, either ASC (ascending) or DESC (descending).

    Allowed values are: “ASC”, “DESC”

  • sort_by (str) –

    (optional) Specifies the field to sort by. Accepts only one field. By default, when you sort by timeCreated, the results are shown in descending order. All other fields default to ascending order. Sort order for the displayName field is case sensitive.

    Allowed values are: “timeCreated”, “displayName”, “lifecycleState”

  • opc_request_id (str) – (optional) Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID.
  • retry_strategy (obj) –

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. This operation uses DEFAULT_RETRY_STRATEGY as default if no retry strategy is provided. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

  • allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
Returns:

A Response object with data of type list of ModelSummary

Return type:

Response

Example:

Click here to see an example of how to use list_models API.

list_notebook_session_shapes(compartment_id, **kwargs)

Lists the valid notebook session shapes.

Parameters:
  • compartment_id (str) –

    (required) <b>Filter</b> results by the OCID of the compartment.

  • opc_request_id (str) – (optional) Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID.
  • limit (int) –

    (optional) For list pagination. The maximum number of results per page, or items to return in a paginated “List” call. 1 is the minimum, 1000 is the maximum. See List Pagination.

    Example: 500

  • page (str) –

    (optional) For list pagination. The value of the opc-next-page response header from the previous “List” call.

    See List Pagination.

  • retry_strategy (obj) –

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. This operation uses DEFAULT_RETRY_STRATEGY as default if no retry strategy is provided. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

  • allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
Returns:

A Response object with data of type list of NotebookSessionShapeSummary

Return type:

Response

Example:

Click here to see an example of how to use list_notebook_session_shapes API.

list_notebook_sessions(compartment_id, **kwargs)

Lists the notebook sessions in the specified compartment.

Parameters:
  • compartment_id (str) –

    (required) <b>Filter</b> results by the OCID of the compartment.

  • id (str) –

    (optional) <b>Filter</b> results by OCID. Must be an OCID of the correct type for the resource type.

  • project_id (str) –

    (optional) <b>Filter</b> results by the OCID of the project.

  • display_name (str) – (optional) <b>Filter</b> results by its user-friendly name.
  • lifecycle_state (str) –

    (optional) <b>Filter</b> results by the specified lifecycle state. Must be a valid state for the resource type.

    Allowed values are: “CREATING”, “ACTIVE”, “DELETING”, “DELETED”, “FAILED”, “INACTIVE”, “UPDATING”

  • created_by (str) –

    (optional) <b>Filter</b> results by the OCID of the user who created the resource.

  • limit (int) –

    (optional) For list pagination. The maximum number of results per page, or items to return in a paginated “List” call. 1 is the minimum, 1000 is the maximum. See List Pagination.

    Example: 500

  • page (str) –

    (optional) For list pagination. The value of the opc-next-page response header from the previous “List” call.

    See List Pagination.

  • sort_order (str) –

    (optional) Specifies sort order to use, either ASC (ascending) or DESC (descending).

    Allowed values are: “ASC”, “DESC”

  • sort_by (str) –

    (optional) Specifies the field to sort by. Accepts only one field. By default, when you sort by timeCreated, the results are shown in descending order. When you sort by displayName, results are shown in ascending order. Sort order for the displayName field is case sensitive.

    Allowed values are: “timeCreated”, “displayName”

  • opc_request_id (str) – (optional) Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID.
  • retry_strategy (obj) –

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. This operation uses DEFAULT_RETRY_STRATEGY as default if no retry strategy is provided. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

  • allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
Returns:

A Response object with data of type list of NotebookSessionSummary

Return type:

Response

Example:

Click here to see an example of how to use list_notebook_sessions API.

list_projects(compartment_id, **kwargs)

Lists projects in the specified compartment.

Parameters:
  • compartment_id (str) –

    (required) <b>Filter</b> results by the OCID of the compartment.

  • id (str) –

    (optional) <b>Filter</b> results by OCID. Must be an OCID of the correct type for the resource type.

  • display_name (str) – (optional) <b>Filter</b> results by its user-friendly name.
  • lifecycle_state (str) –

    (optional) <b>Filter</b> results by the specified lifecycle state. Must be a valid state for the resource type.

    Allowed values are: “ACTIVE”, “DELETING”, “DELETED”

  • created_by (str) –

    (optional) <b>Filter</b> results by the OCID of the user who created the resource.

  • limit (int) –

    (optional) For list pagination. The maximum number of results per page, or items to return in a paginated “List” call. 1 is the minimum, 1000 is the maximum. See List Pagination.

    Example: 500

  • page (str) –

    (optional) For list pagination. The value of the opc-next-page response header from the previous “List” call.

    See List Pagination.

  • sort_order (str) –

    (optional) Specifies sort order to use, either ASC (ascending) or DESC (descending).

    Allowed values are: “ASC”, “DESC”

  • sort_by (str) –

    (optional) Specifies the field to sort by. Accepts only one field. By default, when you sort by timeCreated, the results are shown in descending order. When you sort by displayName, the results are shown in ascending order. Sort order for the displayName field is case sensitive.

    Allowed values are: “timeCreated”, “displayName”

  • opc_request_id (str) – (optional) Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID.
  • retry_strategy (obj) –

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. This operation uses DEFAULT_RETRY_STRATEGY as default if no retry strategy is provided. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

  • allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
Returns:

A Response object with data of type list of ProjectSummary

Return type:

Response

Example:

Click here to see an example of how to use list_projects API.

list_work_request_errors(work_request_id, **kwargs)

Lists work request errors for the specified work request.

Parameters:
  • work_request_id (str) –

    (required) The OCID of the work request.

  • opc_request_id (str) – (optional) Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID.
  • retry_strategy (obj) –

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. This operation will not retry by default, users can also use the convenient DEFAULT_RETRY_STRATEGY provided by the SDK to enable retries for it. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

  • allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
Returns:

A Response object with data of type list of WorkRequestError

Return type:

Response

Example:

Click here to see an example of how to use list_work_request_errors API.

list_work_request_logs(work_request_id, **kwargs)

Lists work request logs for the specified work request.

Parameters:
  • work_request_id (str) –

    (required) The OCID of the work request.

  • opc_request_id (str) – (optional) Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID.
  • retry_strategy (obj) –

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. This operation will not retry by default, users can also use the convenient DEFAULT_RETRY_STRATEGY provided by the SDK to enable retries for it. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

  • allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
Returns:

A Response object with data of type list of WorkRequestLogEntry

Return type:

Response

Example:

Click here to see an example of how to use list_work_request_logs API.

list_work_requests(compartment_id, **kwargs)

Lists work requests in the specified compartment.

Parameters:
  • compartment_id (str) –

    (required) <b>Filter</b> results by the OCID of the compartment.

  • id (str) –

    (optional) <b>Filter</b> results by OCID. Must be an OCID of the correct type for the resource type.

  • operation_type (str) –

    (optional) <b>Filter</b> results by the type of the operation associated with the work request.

    Allowed values are: “NOTEBOOK_SESSION_CREATE”, “NOTEBOOK_SESSION_DELETE”, “NOTEBOOK_SESSION_ACTIVATE”, “NOTEBOOK_SESSION_DEACTIVATE”, “MODEL_DEPLOYMENT_CREATE”, “MODEL_DEPLOYMENT_DELETE”, “MODEL_DEPLOYMENT_ACTIVATE”, “MODEL_DEPLOYMENT_DEACTIVATE”, “MODEL_DEPLOYMENT_UPDATE”, “PROJECT_DELETE”, “WORKREQUEST_CANCEL”, “JOB_DELETE”

  • status (str) –

    (optional) <b>Filter</b> results by work request status.

    Allowed values are: “ACCEPTED”, “IN_PROGRESS”, “FAILED”, “SUCCEEDED”, “CANCELING”, “CANCELED”

  • limit (int) –

    (optional) For list pagination. The maximum number of results per page, or items to return in a paginated “List” call. 1 is the minimum, 1000 is the maximum. See List Pagination.

    Example: 500

  • page (str) –

    (optional) For list pagination. The value of the opc-next-page response header from the previous “List” call.

    See List Pagination.

  • sort_order (str) –

    (optional) Specifies sort order to use, either ASC (ascending) or DESC (descending).

    Allowed values are: “ASC”, “DESC”

  • sort_by (str) –

    (optional) Specifies the field to sort by. Accepts only one field. By default, when you sort by time fields, the results are shown in descending order. All other fields default to ascending order.

    Allowed values are: “operationType”, “status”, “timeAccepted”

  • opc_request_id (str) – (optional) Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID.
  • retry_strategy (obj) –

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. This operation will not retry by default, users can also use the convenient DEFAULT_RETRY_STRATEGY provided by the SDK to enable retries for it. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

  • allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
Returns:

A Response object with data of type list of WorkRequestSummary

Return type:

Response

Example:

Click here to see an example of how to use list_work_requests API.

update_job(job_id, update_job_details, **kwargs)

Updates a job.

Parameters:
  • job_id (str) –

    (required) The OCID of the job.

  • update_job_details (oci.data_science.models.UpdateJobDetails) – (required) Details for updating a job.
  • opc_request_id (str) – (optional) Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID.
  • if_match (str) – (optional) For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource is updated or deleted only if the etag you provide matches the resource’s current etag value.
  • retry_strategy (obj) –

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. This operation uses DEFAULT_RETRY_STRATEGY as default if no retry strategy is provided. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

  • allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
Returns:

A Response object with data of type Job

Return type:

Response

Example:

Click here to see an example of how to use update_job API.

update_job_run(job_run_id, update_job_run_details, **kwargs)

Updates a job run.

Parameters:
  • job_run_id (str) –

    (required) The OCID of the job run.

  • update_job_run_details (oci.data_science.models.UpdateJobRunDetails) – (required) Details for updating a job.
  • opc_request_id (str) – (optional) Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID.
  • if_match (str) – (optional) For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource is updated or deleted only if the etag you provide matches the resource’s current etag value.
  • retry_strategy (obj) –

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. This operation uses DEFAULT_RETRY_STRATEGY as default if no retry strategy is provided. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

  • allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
Returns:

A Response object with data of type JobRun

Return type:

Response

Example:

Click here to see an example of how to use update_job_run API.

update_model(model_id, update_model_details, **kwargs)

Updates the properties of a model. You can update the displayName, description, freeformTags, and definedTags properties.

Parameters:
  • model_id (str) –

    (required) The OCID of the model.

  • update_model_details (oci.data_science.models.UpdateModelDetails) – (required) Details for updating a model. You can update the displayName, description, freeformTags, and definedTags properties.
  • if_match (str) – (optional) For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource is updated or deleted only if the etag you provide matches the resource’s current etag value.
  • opc_request_id (str) – (optional) Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID.
  • retry_strategy (obj) –

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. This operation uses DEFAULT_RETRY_STRATEGY as default if no retry strategy is provided. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

  • allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
Returns:

A Response object with data of type Model

Return type:

Response

Example:

Click here to see an example of how to use update_model API.

update_model_deployment(model_deployment_id, update_model_deployment_details, **kwargs)

Updates the properties of a model deployment. Some of the properties of modelDeploymentConfigurationDetails or CategoryLogDetails can also be updated with zero down time when the model deployment’s lifecycle state is ACTIVE or NEEDS_ATTENTION i.e instanceShapeName, instanceCount and modelId, separately loadBalancerShape or CategoryLogDetails can also be updated independently. All of the fields can be updated when the deployment is in the INACTIVE lifecycle state. Changes will take effect the next time the model deployment is activated.

Parameters:
  • model_deployment_id (str) –

    (required) The OCID of the model deployment.

  • update_model_deployment_details (oci.data_science.models.UpdateModelDeploymentDetails) – (required) Details for updating a model deployment. Some of the properties of modelDeploymentConfigurationDetails or CategoryLogDetails can also be updated with zero down time when the model deployment’s lifecycle state is ACTIVE or NEEDS_ATTENTION i.e instanceShapeName, instanceCount and modelId, separately loadBalancerShape or CategoryLogDetails can also be updated independently. All of the fields can be updated when the deployment is in the INACTIVE lifecycle state. Changes will take effect the next time the model deployment is activated.
  • if_match (str) – (optional) For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource is updated or deleted only if the etag you provide matches the resource’s current etag value.
  • opc_request_id (str) – (optional) Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID.
  • retry_strategy (obj) –

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. This operation uses DEFAULT_RETRY_STRATEGY as default if no retry strategy is provided. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

  • allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
Returns:

A Response object with data of type None

Return type:

Response

Example:

Click here to see an example of how to use update_model_deployment API.

update_model_provenance(model_id, update_model_provenance_details, **kwargs)

Updates the provenance information for the specified model.

Parameters:
  • model_id (str) –

    (required) The OCID of the model.

  • update_model_provenance_details (oci.data_science.models.UpdateModelProvenanceDetails) – (required) Provenance information for the specified model.
  • opc_request_id (str) – (optional) Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID.
  • if_match (str) – (optional) For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource is updated or deleted only if the etag you provide matches the resource’s current etag value.
  • retry_strategy (obj) –

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. This operation uses DEFAULT_RETRY_STRATEGY as default if no retry strategy is provided. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

  • allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
Returns:

A Response object with data of type ModelProvenance

Return type:

Response

Example:

Click here to see an example of how to use update_model_provenance API.

update_notebook_session(notebook_session_id, update_notebook_session_details, **kwargs)

Updates the properties of a notebook session. You can update the displayName, freeformTags, and definedTags properties. When the notebook session is in the INACTIVE lifecycle state, you can update notebookSessionConfigurationDetails and change shape, subnetId, and blockStorageSizeInGBs. Changes to the notebookSessionConfigurationDetails take effect the next time the ActivateNotebookSession action is invoked on the notebook session resource.

Parameters:
  • notebook_session_id (str) –

    (required) The OCID of the notebook session.

  • update_notebook_session_details (oci.data_science.models.UpdateNotebookSessionDetails) – (required) Details for updating a notebook session. notebookSessionConfigurationDetails can only be updated while the notebook session is in the INACTIVE state. Changes to the notebookSessionConfigurationDetails take effect the next time the ActivateNotebookSession action is invoked on the notebook session resource.
  • if_match (str) – (optional) For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource is updated or deleted only if the etag you provide matches the resource’s current etag value.
  • opc_request_id (str) – (optional) Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID.
  • retry_strategy (obj) –

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. This operation uses DEFAULT_RETRY_STRATEGY as default if no retry strategy is provided. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

  • allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
Returns:

A Response object with data of type NotebookSession

Return type:

Response

Example:

Click here to see an example of how to use update_notebook_session API.

update_project(project_id, update_project_details, **kwargs)

Updates the properties of a project. You can update the displayName, description, freeformTags, and definedTags properties.

Parameters:
  • project_id (str) –

    (required) The OCID of the project.

  • update_project_details (oci.data_science.models.UpdateProjectDetails) – (required) Details for updating a project. You can update the displayName, description, freeformTags, and definedTags properties.
  • if_match (str) – (optional) For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource is updated or deleted only if the etag you provide matches the resource’s current etag value.
  • opc_request_id (str) – (optional) Unique Oracle assigned identifier for the request. If you need to contact Oracle about a particular request, then provide the request ID.
  • retry_strategy (obj) –

    (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level.

    This should be one of the strategies available in the retry module. This operation uses DEFAULT_RETRY_STRATEGY as default if no retry strategy is provided. The specifics of the default retry strategy are described here.

    To have this operation explicitly not perform any retries, pass an instance of NoneRetryStrategy.

  • allow_control_chars (bool) – (optional) allow_control_chars is a boolean to indicate whether or not this request should allow control characters in the response object. By default, the response will not allow control characters in strings
Returns:

A Response object with data of type Project

Return type:

Response

Example:

Click here to see an example of how to use update_project API.