1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. GenerativeAi
  5. getModel
Oracle Cloud Infrastructure v2.31.0 published on Thursday, Apr 17, 2025 by Pulumi

oci.GenerativeAi.getModel

Explore with Pulumi AI

Oracle Cloud Infrastructure v2.31.0 published on Thursday, Apr 17, 2025 by Pulumi

This data source provides details about a specific Model resource in Oracle Cloud Infrastructure Generative AI service.

Gets information about a custom model.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";

const testModel = oci.GenerativeAi.getModel({
    modelId: testModelOciGenerativeAiModel.id,
});
Copy
import pulumi
import pulumi_oci as oci

test_model = oci.GenerativeAi.get_model(model_id=test_model_oci_generative_ai_model["id"])
Copy
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := generativeai.GetModel(ctx, &generativeai.GetModelArgs{
			ModelId: testModelOciGenerativeAiModel.Id,
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Oci = Pulumi.Oci;

return await Deployment.RunAsync(() => 
{
    var testModel = Oci.GenerativeAi.GetModel.Invoke(new()
    {
        ModelId = testModelOciGenerativeAiModel.Id,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.GenerativeAi.GenerativeAiFunctions;
import com.pulumi.oci.GenerativeAi.inputs.GetModelArgs;
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) {
        final var testModel = GenerativeAiFunctions.getModel(GetModelArgs.builder()
            .modelId(testModelOciGenerativeAiModel.id())
            .build());

    }
}
Copy
variables:
  testModel:
    fn::invoke:
      function: oci:GenerativeAi:getModel
      arguments:
        modelId: ${testModelOciGenerativeAiModel.id}
Copy

Using getModel

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getModel(args: GetModelArgs, opts?: InvokeOptions): Promise<GetModelResult>
function getModelOutput(args: GetModelOutputArgs, opts?: InvokeOptions): Output<GetModelResult>
Copy
def get_model(model_id: Optional[str] = None,
              opts: Optional[InvokeOptions] = None) -> GetModelResult
def get_model_output(model_id: Optional[pulumi.Input[str]] = None,
              opts: Optional[InvokeOptions] = None) -> Output[GetModelResult]
Copy
func GetModel(ctx *Context, args *GetModelArgs, opts ...InvokeOption) (*GetModelResult, error)
func GetModelOutput(ctx *Context, args *GetModelOutputArgs, opts ...InvokeOption) GetModelResultOutput
Copy

> Note: This function is named GetModel in the Go SDK.

public static class GetModel 
{
    public static Task<GetModelResult> InvokeAsync(GetModelArgs args, InvokeOptions? opts = null)
    public static Output<GetModelResult> Invoke(GetModelInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetModelResult> getModel(GetModelArgs args, InvokeOptions options)
public static Output<GetModelResult> getModel(GetModelArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: oci:GenerativeAi/getModel:getModel
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

ModelId This property is required. string
The model OCID
ModelId This property is required. string
The model OCID
modelId This property is required. String
The model OCID
modelId This property is required. string
The model OCID
model_id This property is required. str
The model OCID
modelId This property is required. String
The model OCID

getModel Result

The following output properties are available:

BaseModelId string
The OCID of the base model that's used for fine-tuning. For pretrained models, the value is null.
Capabilities List<string>
Describes what this model can be used for.
CompartmentId string
The compartment OCID for fine-tuned models. For pretrained models, this value is null.
DefinedTags Dictionary<string, string>
Description string
An optional description of the model.
DisplayName string
A user-friendly name.
FineTuneDetails List<GetModelFineTuneDetail>
Details about fine-tuning a custom model.
FreeformTags Dictionary<string, string>
Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
Id string
An ID that uniquely identifies a pretrained or fine-tuned model.
IsLongTermSupported bool
Whether a model is supported long-term. Only applicable to base models.
LifecycleDetails string
A message describing the current state of the model in more detail that can provide actionable information.
ModelId string
ModelMetrics List<GetModelModelMetric>
Model metrics during the creation of a new model.
State string
The lifecycle state of the model.
SystemTags Dictionary<string, string>
System tags for this resource. Each key is predefined and scoped to a namespace. Example: {"orcl-cloud.free-tier-retained": "true"}
TimeCreated string
The date and time that the model was created in the format of an RFC3339 datetime string.
TimeDeprecated string
Corresponds to the time when the custom model and its associated foundation model will be deprecated.
TimeUpdated string
The date and time that the model was updated in the format of an RFC3339 datetime string.
Type string
The model type indicating whether this is a pretrained/base model or a custom/fine-tuned model.
Vendor string
The provider of the base model.
Version string
The version of the model.
BaseModelId string
The OCID of the base model that's used for fine-tuning. For pretrained models, the value is null.
Capabilities []string
Describes what this model can be used for.
CompartmentId string
The compartment OCID for fine-tuned models. For pretrained models, this value is null.
DefinedTags map[string]string
Description string
An optional description of the model.
DisplayName string
A user-friendly name.
FineTuneDetails []GetModelFineTuneDetail
Details about fine-tuning a custom model.
FreeformTags map[string]string
Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
Id string
An ID that uniquely identifies a pretrained or fine-tuned model.
IsLongTermSupported bool
Whether a model is supported long-term. Only applicable to base models.
LifecycleDetails string
A message describing the current state of the model in more detail that can provide actionable information.
ModelId string
ModelMetrics []GetModelModelMetric
Model metrics during the creation of a new model.
State string
The lifecycle state of the model.
SystemTags map[string]string
System tags for this resource. Each key is predefined and scoped to a namespace. Example: {"orcl-cloud.free-tier-retained": "true"}
TimeCreated string
The date and time that the model was created in the format of an RFC3339 datetime string.
TimeDeprecated string
Corresponds to the time when the custom model and its associated foundation model will be deprecated.
TimeUpdated string
The date and time that the model was updated in the format of an RFC3339 datetime string.
Type string
The model type indicating whether this is a pretrained/base model or a custom/fine-tuned model.
Vendor string
The provider of the base model.
Version string
The version of the model.
baseModelId String
The OCID of the base model that's used for fine-tuning. For pretrained models, the value is null.
capabilities List<String>
Describes what this model can be used for.
compartmentId String
The compartment OCID for fine-tuned models. For pretrained models, this value is null.
definedTags Map<String,String>
description String
An optional description of the model.
displayName String
A user-friendly name.
fineTuneDetails List<GetModelFineTuneDetail>
Details about fine-tuning a custom model.
freeformTags Map<String,String>
Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
id String
An ID that uniquely identifies a pretrained or fine-tuned model.
isLongTermSupported Boolean
Whether a model is supported long-term. Only applicable to base models.
lifecycleDetails String
A message describing the current state of the model in more detail that can provide actionable information.
modelId String
modelMetrics List<GetModelModelMetric>
Model metrics during the creation of a new model.
state String
The lifecycle state of the model.
systemTags Map<String,String>
System tags for this resource. Each key is predefined and scoped to a namespace. Example: {"orcl-cloud.free-tier-retained": "true"}
timeCreated String
The date and time that the model was created in the format of an RFC3339 datetime string.
timeDeprecated String
Corresponds to the time when the custom model and its associated foundation model will be deprecated.
timeUpdated String
The date and time that the model was updated in the format of an RFC3339 datetime string.
type String
The model type indicating whether this is a pretrained/base model or a custom/fine-tuned model.
vendor String
The provider of the base model.
version String
The version of the model.
baseModelId string
The OCID of the base model that's used for fine-tuning. For pretrained models, the value is null.
capabilities string[]
Describes what this model can be used for.
compartmentId string
The compartment OCID for fine-tuned models. For pretrained models, this value is null.
definedTags {[key: string]: string}
description string
An optional description of the model.
displayName string
A user-friendly name.
fineTuneDetails GetModelFineTuneDetail[]
Details about fine-tuning a custom model.
freeformTags {[key: string]: string}
Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
id string
An ID that uniquely identifies a pretrained or fine-tuned model.
isLongTermSupported boolean
Whether a model is supported long-term. Only applicable to base models.
lifecycleDetails string
A message describing the current state of the model in more detail that can provide actionable information.
modelId string
modelMetrics GetModelModelMetric[]
Model metrics during the creation of a new model.
state string
The lifecycle state of the model.
systemTags {[key: string]: string}
System tags for this resource. Each key is predefined and scoped to a namespace. Example: {"orcl-cloud.free-tier-retained": "true"}
timeCreated string
The date and time that the model was created in the format of an RFC3339 datetime string.
timeDeprecated string
Corresponds to the time when the custom model and its associated foundation model will be deprecated.
timeUpdated string
The date and time that the model was updated in the format of an RFC3339 datetime string.
type string
The model type indicating whether this is a pretrained/base model or a custom/fine-tuned model.
vendor string
The provider of the base model.
version string
The version of the model.
base_model_id str
The OCID of the base model that's used for fine-tuning. For pretrained models, the value is null.
capabilities Sequence[str]
Describes what this model can be used for.
compartment_id str
The compartment OCID for fine-tuned models. For pretrained models, this value is null.
defined_tags Mapping[str, str]
description str
An optional description of the model.
display_name str
A user-friendly name.
fine_tune_details Sequence[generativeai.GetModelFineTuneDetail]
Details about fine-tuning a custom model.
freeform_tags Mapping[str, str]
Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
id str
An ID that uniquely identifies a pretrained or fine-tuned model.
is_long_term_supported bool
Whether a model is supported long-term. Only applicable to base models.
lifecycle_details str
A message describing the current state of the model in more detail that can provide actionable information.
model_id str
model_metrics Sequence[generativeai.GetModelModelMetric]
Model metrics during the creation of a new model.
state str
The lifecycle state of the model.
system_tags Mapping[str, str]
System tags for this resource. Each key is predefined and scoped to a namespace. Example: {"orcl-cloud.free-tier-retained": "true"}
time_created str
The date and time that the model was created in the format of an RFC3339 datetime string.
time_deprecated str
Corresponds to the time when the custom model and its associated foundation model will be deprecated.
time_updated str
The date and time that the model was updated in the format of an RFC3339 datetime string.
type str
The model type indicating whether this is a pretrained/base model or a custom/fine-tuned model.
vendor str
The provider of the base model.
version str
The version of the model.
baseModelId String
The OCID of the base model that's used for fine-tuning. For pretrained models, the value is null.
capabilities List<String>
Describes what this model can be used for.
compartmentId String
The compartment OCID for fine-tuned models. For pretrained models, this value is null.
definedTags Map<String>
description String
An optional description of the model.
displayName String
A user-friendly name.
fineTuneDetails List<Property Map>
Details about fine-tuning a custom model.
freeformTags Map<String>
Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
id String
An ID that uniquely identifies a pretrained or fine-tuned model.
isLongTermSupported Boolean
Whether a model is supported long-term. Only applicable to base models.
lifecycleDetails String
A message describing the current state of the model in more detail that can provide actionable information.
modelId String
modelMetrics List<Property Map>
Model metrics during the creation of a new model.
state String
The lifecycle state of the model.
systemTags Map<String>
System tags for this resource. Each key is predefined and scoped to a namespace. Example: {"orcl-cloud.free-tier-retained": "true"}
timeCreated String
The date and time that the model was created in the format of an RFC3339 datetime string.
timeDeprecated String
Corresponds to the time when the custom model and its associated foundation model will be deprecated.
timeUpdated String
The date and time that the model was updated in the format of an RFC3339 datetime string.
type String
The model type indicating whether this is a pretrained/base model or a custom/fine-tuned model.
vendor String
The provider of the base model.
version String
The version of the model.

Supporting Types

GetModelFineTuneDetail

DedicatedAiClusterId This property is required. string
The OCID of the dedicated AI cluster this fine-tuning runs on.
TrainingConfigs This property is required. List<GetModelFineTuneDetailTrainingConfig>
The fine-tuning method and hyperparameters used for fine-tuning a custom model.
TrainingDatasets This property is required. List<GetModelFineTuneDetailTrainingDataset>
The dataset used to fine-tune the model.
DedicatedAiClusterId This property is required. string
The OCID of the dedicated AI cluster this fine-tuning runs on.
TrainingConfigs This property is required. []GetModelFineTuneDetailTrainingConfig
The fine-tuning method and hyperparameters used for fine-tuning a custom model.
TrainingDatasets This property is required. []GetModelFineTuneDetailTrainingDataset
The dataset used to fine-tune the model.
dedicatedAiClusterId This property is required. String
The OCID of the dedicated AI cluster this fine-tuning runs on.
trainingConfigs This property is required. List<GetModelFineTuneDetailTrainingConfig>
The fine-tuning method and hyperparameters used for fine-tuning a custom model.
trainingDatasets This property is required. List<GetModelFineTuneDetailTrainingDataset>
The dataset used to fine-tune the model.
dedicatedAiClusterId This property is required. string
The OCID of the dedicated AI cluster this fine-tuning runs on.
trainingConfigs This property is required. GetModelFineTuneDetailTrainingConfig[]
The fine-tuning method and hyperparameters used for fine-tuning a custom model.
trainingDatasets This property is required. GetModelFineTuneDetailTrainingDataset[]
The dataset used to fine-tune the model.
dedicated_ai_cluster_id This property is required. str
The OCID of the dedicated AI cluster this fine-tuning runs on.
training_configs This property is required. Sequence[generativeai.GetModelFineTuneDetailTrainingConfig]
The fine-tuning method and hyperparameters used for fine-tuning a custom model.
training_datasets This property is required. Sequence[generativeai.GetModelFineTuneDetailTrainingDataset]
The dataset used to fine-tune the model.
dedicatedAiClusterId This property is required. String
The OCID of the dedicated AI cluster this fine-tuning runs on.
trainingConfigs This property is required. List<Property Map>
The fine-tuning method and hyperparameters used for fine-tuning a custom model.
trainingDatasets This property is required. List<Property Map>
The dataset used to fine-tune the model.

GetModelFineTuneDetailTrainingConfig

EarlyStoppingPatience This property is required. int
Stop training if the loss metric does not improve beyond 'early_stopping_threshold' for this many times of evaluation.
EarlyStoppingThreshold This property is required. double
How much the loss must improve to prevent early stopping.
LearningRate This property is required. double
The initial learning rate to be used during training
LogModelMetricsIntervalInSteps This property is required. int
Determines how frequently to log model metrics.
LoraAlpha This property is required. int
This parameter represents the scaling factor for the weight matrices in LoRA.
LoraDropout This property is required. double
This parameter indicates the dropout probability for LoRA layers.
LoraR This property is required. int
This parameter represents the LoRA rank of the update matrices.
NumOfLastLayers This property is required. int
The number of last layers to be fine-tuned.
TotalTrainingEpochs This property is required. int
The maximum number of training epochs to run for.
TrainingBatchSize This property is required. int
The batch size used during training.
TrainingConfigType This property is required. string
The fine-tuning method for training a custom model.
EarlyStoppingPatience This property is required. int
Stop training if the loss metric does not improve beyond 'early_stopping_threshold' for this many times of evaluation.
EarlyStoppingThreshold This property is required. float64
How much the loss must improve to prevent early stopping.
LearningRate This property is required. float64
The initial learning rate to be used during training
LogModelMetricsIntervalInSteps This property is required. int
Determines how frequently to log model metrics.
LoraAlpha This property is required. int
This parameter represents the scaling factor for the weight matrices in LoRA.
LoraDropout This property is required. float64
This parameter indicates the dropout probability for LoRA layers.
LoraR This property is required. int
This parameter represents the LoRA rank of the update matrices.
NumOfLastLayers This property is required. int
The number of last layers to be fine-tuned.
TotalTrainingEpochs This property is required. int
The maximum number of training epochs to run for.
TrainingBatchSize This property is required. int
The batch size used during training.
TrainingConfigType This property is required. string
The fine-tuning method for training a custom model.
earlyStoppingPatience This property is required. Integer
Stop training if the loss metric does not improve beyond 'early_stopping_threshold' for this many times of evaluation.
earlyStoppingThreshold This property is required. Double
How much the loss must improve to prevent early stopping.
learningRate This property is required. Double
The initial learning rate to be used during training
logModelMetricsIntervalInSteps This property is required. Integer
Determines how frequently to log model metrics.
loraAlpha This property is required. Integer
This parameter represents the scaling factor for the weight matrices in LoRA.
loraDropout This property is required. Double
This parameter indicates the dropout probability for LoRA layers.
loraR This property is required. Integer
This parameter represents the LoRA rank of the update matrices.
numOfLastLayers This property is required. Integer
The number of last layers to be fine-tuned.
totalTrainingEpochs This property is required. Integer
The maximum number of training epochs to run for.
trainingBatchSize This property is required. Integer
The batch size used during training.
trainingConfigType This property is required. String
The fine-tuning method for training a custom model.
earlyStoppingPatience This property is required. number
Stop training if the loss metric does not improve beyond 'early_stopping_threshold' for this many times of evaluation.
earlyStoppingThreshold This property is required. number
How much the loss must improve to prevent early stopping.
learningRate This property is required. number
The initial learning rate to be used during training
logModelMetricsIntervalInSteps This property is required. number
Determines how frequently to log model metrics.
loraAlpha This property is required. number
This parameter represents the scaling factor for the weight matrices in LoRA.
loraDropout This property is required. number
This parameter indicates the dropout probability for LoRA layers.
loraR This property is required. number
This parameter represents the LoRA rank of the update matrices.
numOfLastLayers This property is required. number
The number of last layers to be fine-tuned.
totalTrainingEpochs This property is required. number
The maximum number of training epochs to run for.
trainingBatchSize This property is required. number
The batch size used during training.
trainingConfigType This property is required. string
The fine-tuning method for training a custom model.
early_stopping_patience This property is required. int
Stop training if the loss metric does not improve beyond 'early_stopping_threshold' for this many times of evaluation.
early_stopping_threshold This property is required. float
How much the loss must improve to prevent early stopping.
learning_rate This property is required. float
The initial learning rate to be used during training
log_model_metrics_interval_in_steps This property is required. int
Determines how frequently to log model metrics.
lora_alpha This property is required. int
This parameter represents the scaling factor for the weight matrices in LoRA.
lora_dropout This property is required. float
This parameter indicates the dropout probability for LoRA layers.
lora_r This property is required. int
This parameter represents the LoRA rank of the update matrices.
num_of_last_layers This property is required. int
The number of last layers to be fine-tuned.
total_training_epochs This property is required. int
The maximum number of training epochs to run for.
training_batch_size This property is required. int
The batch size used during training.
training_config_type This property is required. str
The fine-tuning method for training a custom model.
earlyStoppingPatience This property is required. Number
Stop training if the loss metric does not improve beyond 'early_stopping_threshold' for this many times of evaluation.
earlyStoppingThreshold This property is required. Number
How much the loss must improve to prevent early stopping.
learningRate This property is required. Number
The initial learning rate to be used during training
logModelMetricsIntervalInSteps This property is required. Number
Determines how frequently to log model metrics.
loraAlpha This property is required. Number
This parameter represents the scaling factor for the weight matrices in LoRA.
loraDropout This property is required. Number
This parameter indicates the dropout probability for LoRA layers.
loraR This property is required. Number
This parameter represents the LoRA rank of the update matrices.
numOfLastLayers This property is required. Number
The number of last layers to be fine-tuned.
totalTrainingEpochs This property is required. Number
The maximum number of training epochs to run for.
trainingBatchSize This property is required. Number
The batch size used during training.
trainingConfigType This property is required. String
The fine-tuning method for training a custom model.

GetModelFineTuneDetailTrainingDataset

Bucket This property is required. string
The Object Storage bucket name.
DatasetType This property is required. string
The type of the data asset.
Namespace This property is required. string
The Object Storage namespace.
Object This property is required. string
The Object Storage object name.
Bucket This property is required. string
The Object Storage bucket name.
DatasetType This property is required. string
The type of the data asset.
Namespace This property is required. string
The Object Storage namespace.
Object This property is required. string
The Object Storage object name.
bucket This property is required. String
The Object Storage bucket name.
datasetType This property is required. String
The type of the data asset.
namespace This property is required. String
The Object Storage namespace.
object This property is required. String
The Object Storage object name.
bucket This property is required. string
The Object Storage bucket name.
datasetType This property is required. string
The type of the data asset.
namespace This property is required. string
The Object Storage namespace.
object This property is required. string
The Object Storage object name.
bucket This property is required. str
The Object Storage bucket name.
dataset_type This property is required. str
The type of the data asset.
namespace This property is required. str
The Object Storage namespace.
object This property is required. str
The Object Storage object name.
bucket This property is required. String
The Object Storage bucket name.
datasetType This property is required. String
The type of the data asset.
namespace This property is required. String
The Object Storage namespace.
object This property is required. String
The Object Storage object name.

GetModelModelMetric

FinalAccuracy This property is required. double
Fine-tuned model accuracy.
FinalLoss This property is required. double
Fine-tuned model loss.
ModelMetricsType This property is required. string
The type of the model metrics. Each type of model can expect a different set of model metrics.
FinalAccuracy This property is required. float64
Fine-tuned model accuracy.
FinalLoss This property is required. float64
Fine-tuned model loss.
ModelMetricsType This property is required. string
The type of the model metrics. Each type of model can expect a different set of model metrics.
finalAccuracy This property is required. Double
Fine-tuned model accuracy.
finalLoss This property is required. Double
Fine-tuned model loss.
modelMetricsType This property is required. String
The type of the model metrics. Each type of model can expect a different set of model metrics.
finalAccuracy This property is required. number
Fine-tuned model accuracy.
finalLoss This property is required. number
Fine-tuned model loss.
modelMetricsType This property is required. string
The type of the model metrics. Each type of model can expect a different set of model metrics.
final_accuracy This property is required. float
Fine-tuned model accuracy.
final_loss This property is required. float
Fine-tuned model loss.
model_metrics_type This property is required. str
The type of the model metrics. Each type of model can expect a different set of model metrics.
finalAccuracy This property is required. Number
Fine-tuned model accuracy.
finalLoss This property is required. Number
Fine-tuned model loss.
modelMetricsType This property is required. String
The type of the model metrics. Each type of model can expect a different set of model metrics.

Package Details

Repository
oci pulumi/pulumi-oci
License
Apache-2.0
Notes
This Pulumi package is based on the oci Terraform Provider.
Oracle Cloud Infrastructure v2.31.0 published on Thursday, Apr 17, 2025 by Pulumi