oci logo
Oracle Cloud Infrastructure v0.6.0, Jan 23 23

oci.DataScience.ModelProvenance

This resource provides the Model Provenance resource in Oracle Cloud Infrastructure Data Science service.

Creates provenance information for the specified model.

Example Usage

using System.Collections.Generic;
using Pulumi;
using Oci = Pulumi.Oci;

return await Deployment.RunAsync(() => 
{
    var testModelProvenance = new Oci.DataScience.ModelProvenance("testModelProvenance", new()
    {
        ModelId = oci_datascience_model.Test_model.Id,
        GitBranch = @var.Model_provenance_git_branch,
        GitCommit = @var.Model_provenance_git_commit,
        RepositoryUrl = @var.Model_provenance_repository_url,
        ScriptDir = @var.Model_provenance_script_dir,
        TrainingId = oci_datascience_training.Test_training.Id,
        TrainingScript = @var.Model_provenance_training_script,
    });

});
package main

import (
	"github.com/pulumi/pulumi-oci/sdk/go/oci/DataScience"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := DataScience.NewModelProvenance(ctx, "testModelProvenance", &DataScience.ModelProvenanceArgs{
			ModelId:        pulumi.Any(oci_datascience_model.Test_model.Id),
			GitBranch:      pulumi.Any(_var.Model_provenance_git_branch),
			GitCommit:      pulumi.Any(_var.Model_provenance_git_commit),
			RepositoryUrl:  pulumi.Any(_var.Model_provenance_repository_url),
			ScriptDir:      pulumi.Any(_var.Model_provenance_script_dir),
			TrainingId:     pulumi.Any(oci_datascience_training.Test_training.Id),
			TrainingScript: pulumi.Any(_var.Model_provenance_training_script),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.DataScience.ModelProvenance;
import com.pulumi.oci.DataScience.ModelProvenanceArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var testModelProvenance = new ModelProvenance("testModelProvenance", ModelProvenanceArgs.builder()        
            .modelId(oci_datascience_model.test_model().id())
            .gitBranch(var_.model_provenance_git_branch())
            .gitCommit(var_.model_provenance_git_commit())
            .repositoryUrl(var_.model_provenance_repository_url())
            .scriptDir(var_.model_provenance_script_dir())
            .trainingId(oci_datascience_training.test_training().id())
            .trainingScript(var_.model_provenance_training_script())
            .build());

    }
}
import pulumi
import pulumi_oci as oci

test_model_provenance = oci.data_science.ModelProvenance("testModelProvenance",
    model_id=oci_datascience_model["test_model"]["id"],
    git_branch=var["model_provenance_git_branch"],
    git_commit=var["model_provenance_git_commit"],
    repository_url=var["model_provenance_repository_url"],
    script_dir=var["model_provenance_script_dir"],
    training_id=oci_datascience_training["test_training"]["id"],
    training_script=var["model_provenance_training_script"])
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";

const testModelProvenance = new oci.datascience.ModelProvenance("testModelProvenance", {
    modelId: oci_datascience_model.test_model.id,
    gitBranch: _var.model_provenance_git_branch,
    gitCommit: _var.model_provenance_git_commit,
    repositoryUrl: _var.model_provenance_repository_url,
    scriptDir: _var.model_provenance_script_dir,
    trainingId: oci_datascience_training.test_training.id,
    trainingScript: _var.model_provenance_training_script,
});
resources:
  testModelProvenance:
    type: oci:DataScience:ModelProvenance
    properties:
      #Required
      modelId: ${oci_datascience_model.test_model.id}
      #Optional
      gitBranch: ${var.model_provenance_git_branch}
      gitCommit: ${var.model_provenance_git_commit}
      repositoryUrl: ${var.model_provenance_repository_url}
      scriptDir: ${var.model_provenance_script_dir}
      trainingId: ${oci_datascience_training.test_training.id}
      trainingScript: ${var.model_provenance_training_script}

Create ModelProvenance Resource

new ModelProvenance(name: string, args: ModelProvenanceArgs, opts?: CustomResourceOptions);
@overload
def ModelProvenance(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    git_branch: Optional[str] = None,
                    git_commit: Optional[str] = None,
                    model_id: Optional[str] = None,
                    repository_url: Optional[str] = None,
                    script_dir: Optional[str] = None,
                    training_id: Optional[str] = None,
                    training_script: Optional[str] = None)
@overload
def ModelProvenance(resource_name: str,
                    args: ModelProvenanceArgs,
                    opts: Optional[ResourceOptions] = None)
func NewModelProvenance(ctx *Context, name string, args ModelProvenanceArgs, opts ...ResourceOption) (*ModelProvenance, error)
public ModelProvenance(string name, ModelProvenanceArgs args, CustomResourceOptions? opts = null)
public ModelProvenance(String name, ModelProvenanceArgs args)
public ModelProvenance(String name, ModelProvenanceArgs args, CustomResourceOptions options)
type: oci:DataScience:ModelProvenance
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args ModelProvenanceArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
args ModelProvenanceArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args ModelProvenanceArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args ModelProvenanceArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args ModelProvenanceArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

ModelProvenance Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

The ModelProvenance resource accepts the following input properties:

ModelId string

The OCID of the model.

GitBranch string

(Updatable) For model reproducibility purposes. Branch of the git repository associated with model training.

GitCommit string

(Updatable) For model reproducibility purposes. Commit ID of the git repository associated with model training.

RepositoryUrl string

(Updatable) For model reproducibility purposes. URL of the git repository associated with model training.

ScriptDir string

(Updatable) For model reproducibility purposes. Path to model artifacts.

TrainingId string

(Updatable) The OCID of a training session(Job or NotebookSession) in which the model was trained. It is used for model reproducibility purposes.

TrainingScript string

(Updatable) For model reproducibility purposes. Path to the python script or notebook in which the model was trained."

ModelId string

The OCID of the model.

GitBranch string

(Updatable) For model reproducibility purposes. Branch of the git repository associated with model training.

GitCommit string

(Updatable) For model reproducibility purposes. Commit ID of the git repository associated with model training.

RepositoryUrl string

(Updatable) For model reproducibility purposes. URL of the git repository associated with model training.

ScriptDir string

(Updatable) For model reproducibility purposes. Path to model artifacts.

TrainingId string

(Updatable) The OCID of a training session(Job or NotebookSession) in which the model was trained. It is used for model reproducibility purposes.

TrainingScript string

(Updatable) For model reproducibility purposes. Path to the python script or notebook in which the model was trained."

modelId String

The OCID of the model.

gitBranch String

(Updatable) For model reproducibility purposes. Branch of the git repository associated with model training.

gitCommit String

(Updatable) For model reproducibility purposes. Commit ID of the git repository associated with model training.

repositoryUrl String

(Updatable) For model reproducibility purposes. URL of the git repository associated with model training.

scriptDir String

(Updatable) For model reproducibility purposes. Path to model artifacts.

trainingId String

(Updatable) The OCID of a training session(Job or NotebookSession) in which the model was trained. It is used for model reproducibility purposes.

trainingScript String

(Updatable) For model reproducibility purposes. Path to the python script or notebook in which the model was trained."

modelId string

The OCID of the model.

gitBranch string

(Updatable) For model reproducibility purposes. Branch of the git repository associated with model training.

gitCommit string

(Updatable) For model reproducibility purposes. Commit ID of the git repository associated with model training.

repositoryUrl string

(Updatable) For model reproducibility purposes. URL of the git repository associated with model training.

scriptDir string

(Updatable) For model reproducibility purposes. Path to model artifacts.

trainingId string

(Updatable) The OCID of a training session(Job or NotebookSession) in which the model was trained. It is used for model reproducibility purposes.

trainingScript string

(Updatable) For model reproducibility purposes. Path to the python script or notebook in which the model was trained."

model_id str

The OCID of the model.

git_branch str

(Updatable) For model reproducibility purposes. Branch of the git repository associated with model training.

git_commit str

(Updatable) For model reproducibility purposes. Commit ID of the git repository associated with model training.

repository_url str

(Updatable) For model reproducibility purposes. URL of the git repository associated with model training.

script_dir str

(Updatable) For model reproducibility purposes. Path to model artifacts.

training_id str

(Updatable) The OCID of a training session(Job or NotebookSession) in which the model was trained. It is used for model reproducibility purposes.

training_script str

(Updatable) For model reproducibility purposes. Path to the python script or notebook in which the model was trained."

modelId String

The OCID of the model.

gitBranch String

(Updatable) For model reproducibility purposes. Branch of the git repository associated with model training.

gitCommit String

(Updatable) For model reproducibility purposes. Commit ID of the git repository associated with model training.

repositoryUrl String

(Updatable) For model reproducibility purposes. URL of the git repository associated with model training.

scriptDir String

(Updatable) For model reproducibility purposes. Path to model artifacts.

trainingId String

(Updatable) The OCID of a training session(Job or NotebookSession) in which the model was trained. It is used for model reproducibility purposes.

trainingScript String

(Updatable) For model reproducibility purposes. Path to the python script or notebook in which the model was trained."

Outputs

All input properties are implicitly available as output properties. Additionally, the ModelProvenance resource produces the following output properties:

Id string

The provider-assigned unique ID for this managed resource.

Id string

The provider-assigned unique ID for this managed resource.

id String

The provider-assigned unique ID for this managed resource.

id string

The provider-assigned unique ID for this managed resource.

id str

The provider-assigned unique ID for this managed resource.

id String

The provider-assigned unique ID for this managed resource.

Look up Existing ModelProvenance Resource

Get an existing ModelProvenance resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: ModelProvenanceState, opts?: CustomResourceOptions): ModelProvenance
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        git_branch: Optional[str] = None,
        git_commit: Optional[str] = None,
        model_id: Optional[str] = None,
        repository_url: Optional[str] = None,
        script_dir: Optional[str] = None,
        training_id: Optional[str] = None,
        training_script: Optional[str] = None) -> ModelProvenance
func GetModelProvenance(ctx *Context, name string, id IDInput, state *ModelProvenanceState, opts ...ResourceOption) (*ModelProvenance, error)
public static ModelProvenance Get(string name, Input<string> id, ModelProvenanceState? state, CustomResourceOptions? opts = null)
public static ModelProvenance get(String name, Output<String> id, ModelProvenanceState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
GitBranch string

(Updatable) For model reproducibility purposes. Branch of the git repository associated with model training.

GitCommit string

(Updatable) For model reproducibility purposes. Commit ID of the git repository associated with model training.

ModelId string

The OCID of the model.

RepositoryUrl string

(Updatable) For model reproducibility purposes. URL of the git repository associated with model training.

ScriptDir string

(Updatable) For model reproducibility purposes. Path to model artifacts.

TrainingId string

(Updatable) The OCID of a training session(Job or NotebookSession) in which the model was trained. It is used for model reproducibility purposes.

TrainingScript string

(Updatable) For model reproducibility purposes. Path to the python script or notebook in which the model was trained."

GitBranch string

(Updatable) For model reproducibility purposes. Branch of the git repository associated with model training.

GitCommit string

(Updatable) For model reproducibility purposes. Commit ID of the git repository associated with model training.

ModelId string

The OCID of the model.

RepositoryUrl string

(Updatable) For model reproducibility purposes. URL of the git repository associated with model training.

ScriptDir string

(Updatable) For model reproducibility purposes. Path to model artifacts.

TrainingId string

(Updatable) The OCID of a training session(Job or NotebookSession) in which the model was trained. It is used for model reproducibility purposes.

TrainingScript string

(Updatable) For model reproducibility purposes. Path to the python script or notebook in which the model was trained."

gitBranch String

(Updatable) For model reproducibility purposes. Branch of the git repository associated with model training.

gitCommit String

(Updatable) For model reproducibility purposes. Commit ID of the git repository associated with model training.

modelId String

The OCID of the model.

repositoryUrl String

(Updatable) For model reproducibility purposes. URL of the git repository associated with model training.

scriptDir String

(Updatable) For model reproducibility purposes. Path to model artifacts.

trainingId String

(Updatable) The OCID of a training session(Job or NotebookSession) in which the model was trained. It is used for model reproducibility purposes.

trainingScript String

(Updatable) For model reproducibility purposes. Path to the python script or notebook in which the model was trained."

gitBranch string

(Updatable) For model reproducibility purposes. Branch of the git repository associated with model training.

gitCommit string

(Updatable) For model reproducibility purposes. Commit ID of the git repository associated with model training.

modelId string

The OCID of the model.

repositoryUrl string

(Updatable) For model reproducibility purposes. URL of the git repository associated with model training.

scriptDir string

(Updatable) For model reproducibility purposes. Path to model artifacts.

trainingId string

(Updatable) The OCID of a training session(Job or NotebookSession) in which the model was trained. It is used for model reproducibility purposes.

trainingScript string

(Updatable) For model reproducibility purposes. Path to the python script or notebook in which the model was trained."

git_branch str

(Updatable) For model reproducibility purposes. Branch of the git repository associated with model training.

git_commit str

(Updatable) For model reproducibility purposes. Commit ID of the git repository associated with model training.

model_id str

The OCID of the model.

repository_url str

(Updatable) For model reproducibility purposes. URL of the git repository associated with model training.

script_dir str

(Updatable) For model reproducibility purposes. Path to model artifacts.

training_id str

(Updatable) The OCID of a training session(Job or NotebookSession) in which the model was trained. It is used for model reproducibility purposes.

training_script str

(Updatable) For model reproducibility purposes. Path to the python script or notebook in which the model was trained."

gitBranch String

(Updatable) For model reproducibility purposes. Branch of the git repository associated with model training.

gitCommit String

(Updatable) For model reproducibility purposes. Commit ID of the git repository associated with model training.

modelId String

The OCID of the model.

repositoryUrl String

(Updatable) For model reproducibility purposes. URL of the git repository associated with model training.

scriptDir String

(Updatable) For model reproducibility purposes. Path to model artifacts.

trainingId String

(Updatable) The OCID of a training session(Job or NotebookSession) in which the model was trained. It is used for model reproducibility purposes.

trainingScript String

(Updatable) For model reproducibility purposes. Path to the python script or notebook in which the model was trained."

Import

ModelProvenances can be imported using the id, e.g.

 $ pulumi import oci:DataScience/modelProvenance:ModelProvenance test_model_provenance "models/{modelId}/provenance"

Package Details

Repository
oci pulumi/pulumi-oci
License
Apache-2.0
Notes

This Pulumi package is based on the oci Terraform Provider.