Oracle Cloud Infrastructure v2.11.0 published on Thursday, Sep 19, 2024 by Pulumi
oci.GenerativeAi.getModel
Explore with Pulumi AI
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,
});
import pulumi
import pulumi_oci as oci
test_model = oci.GenerativeAi.get_model(model_id=test_model_oci_generative_ai_model["id"])
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
})
}
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,
});
});
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());
}
}
variables:
testModel:
fn::invoke:
Function: oci:GenerativeAi:getModel
Arguments:
modelId: ${testModelOciGenerativeAiModel.id}
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>
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]
func GetModel(ctx *Context, args *GetModelArgs, opts ...InvokeOption) (*GetModelResult, error)
func GetModelOutput(ctx *Context, args *GetModelOutputArgs, opts ...InvokeOption) GetModelResultOutput
> 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)
}
public static CompletableFuture<GetModelResult> getModel(GetModelArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: oci:GenerativeAi/getModel:getModel
arguments:
# arguments dictionary
The following arguments are supported:
- Model
Id string - The model OCID
- Model
Id string - The model OCID
- model
Id String - The model OCID
- model
Id string - The model OCID
- model_
id str - The model OCID
- model
Id String - The model OCID
getModel Result
The following output properties are available:
- Base
Model stringId - 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.
- Compartment
Id string - The compartment OCID for fine-tuned models. For pretrained models, this value is null.
- Dictionary<string, string>
- Description string
- An optional description of the model.
- Display
Name string - A user-friendly name.
- Fine
Tune List<GetDetails Model Fine Tune Detail> - Details about fine-tuning a custom model.
- 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.
- Is
Long boolTerm Supported - Whether a model is supported long-term. Only applicable to base models.
- Lifecycle
Details string - A message describing the current state of the model in more detail that can provide actionable information.
- Model
Id string - Model
Metrics List<GetModel Model Metric> - Model metrics during the creation of a new model.
- State string
- The lifecycle state of the model.
- Dictionary<string, string>
- System tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"orcl-cloud.free-tier-retained": "true"}
- Time
Created string - The date and time that the model was created in the format of an RFC3339 datetime string.
- Time
Deprecated string - Corresponds to the time when the custom model and its associated foundation model will be deprecated.
- Time
Updated 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 stringId - 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.
- Compartment
Id string - The compartment OCID for fine-tuned models. For pretrained models, this value is null.
- map[string]string
- Description string
- An optional description of the model.
- Display
Name string - A user-friendly name.
- Fine
Tune []GetDetails Model Fine Tune Detail - Details about fine-tuning a custom model.
- 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.
- Is
Long boolTerm Supported - Whether a model is supported long-term. Only applicable to base models.
- Lifecycle
Details string - A message describing the current state of the model in more detail that can provide actionable information.
- Model
Id string - Model
Metrics []GetModel Model Metric - Model metrics during the creation of a new model.
- State string
- The lifecycle state of the model.
- map[string]string
- System tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"orcl-cloud.free-tier-retained": "true"}
- Time
Created string - The date and time that the model was created in the format of an RFC3339 datetime string.
- Time
Deprecated string - Corresponds to the time when the custom model and its associated foundation model will be deprecated.
- Time
Updated 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 StringId - 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.
- compartment
Id String - The compartment OCID for fine-tuned models. For pretrained models, this value is null.
- Map<String,String>
- description String
- An optional description of the model.
- display
Name String - A user-friendly name.
- fine
Tune List<GetDetails Model Fine Tune Detail> - Details about fine-tuning a custom model.
- 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.
- is
Long BooleanTerm Supported - Whether a model is supported long-term. Only applicable to base models.
- lifecycle
Details String - A message describing the current state of the model in more detail that can provide actionable information.
- model
Id String - model
Metrics List<GetModel Model Metric> - Model metrics during the creation of a new model.
- state String
- The lifecycle state of the model.
- Map<String,String>
- System tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"orcl-cloud.free-tier-retained": "true"}
- time
Created String - The date and time that the model was created in the format of an RFC3339 datetime string.
- time
Deprecated String - Corresponds to the time when the custom model and its associated foundation model will be deprecated.
- time
Updated 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 stringId - 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.
- compartment
Id string - The compartment OCID for fine-tuned models. For pretrained models, this value is null.
- {[key: string]: string}
- description string
- An optional description of the model.
- display
Name string - A user-friendly name.
- fine
Tune GetDetails Model Fine Tune Detail[] - Details about fine-tuning a custom model.
- {[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.
- is
Long booleanTerm Supported - Whether a model is supported long-term. Only applicable to base models.
- lifecycle
Details string - A message describing the current state of the model in more detail that can provide actionable information.
- model
Id string - model
Metrics GetModel Model Metric[] - Model metrics during the creation of a new model.
- state string
- The lifecycle state of the model.
- {[key: string]: string}
- System tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"orcl-cloud.free-tier-retained": "true"}
- time
Created string - The date and time that the model was created in the format of an RFC3339 datetime string.
- time
Deprecated string - Corresponds to the time when the custom model and its associated foundation model will be deprecated.
- time
Updated 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_ strid - 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.
- Mapping[str, str]
- description str
- An optional description of the model.
- display_
name str - A user-friendly name.
- fine_
tune_ Sequence[generativeai.details Get Model Fine Tune Detail] - Details about fine-tuning a custom model.
- 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_ boolterm_ supported - 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.Get Model Model Metric] - Model metrics during the creation of a new model.
- state str
- The lifecycle state of the model.
- 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.
- base
Model StringId - 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.
- compartment
Id String - The compartment OCID for fine-tuned models. For pretrained models, this value is null.
- Map<String>
- description String
- An optional description of the model.
- display
Name String - A user-friendly name.
- fine
Tune List<Property Map>Details - Details about fine-tuning a custom model.
- 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.
- is
Long BooleanTerm Supported - Whether a model is supported long-term. Only applicable to base models.
- lifecycle
Details String - A message describing the current state of the model in more detail that can provide actionable information.
- model
Id String - model
Metrics List<Property Map> - Model metrics during the creation of a new model.
- state String
- The lifecycle state of the model.
- Map<String>
- System tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"orcl-cloud.free-tier-retained": "true"}
- time
Created String - The date and time that the model was created in the format of an RFC3339 datetime string.
- time
Deprecated String - Corresponds to the time when the custom model and its associated foundation model will be deprecated.
- time
Updated 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
- Dedicated
Ai stringCluster Id - The OCID of the dedicated AI cluster this fine-tuning runs on.
- Training
Configs List<GetModel Fine Tune Detail Training Config> - The fine-tuning method and hyperparameters used for fine-tuning a custom model.
- Training
Datasets List<GetModel Fine Tune Detail Training Dataset> - The dataset used to fine-tune the model.
- Dedicated
Ai stringCluster Id - The OCID of the dedicated AI cluster this fine-tuning runs on.
- Training
Configs []GetModel Fine Tune Detail Training Config - The fine-tuning method and hyperparameters used for fine-tuning a custom model.
- Training
Datasets []GetModel Fine Tune Detail Training Dataset - The dataset used to fine-tune the model.
- dedicated
Ai StringCluster Id - The OCID of the dedicated AI cluster this fine-tuning runs on.
- training
Configs List<GetModel Fine Tune Detail Training Config> - The fine-tuning method and hyperparameters used for fine-tuning a custom model.
- training
Datasets List<GetModel Fine Tune Detail Training Dataset> - The dataset used to fine-tune the model.
- dedicated
Ai stringCluster Id - The OCID of the dedicated AI cluster this fine-tuning runs on.
- training
Configs GetModel Fine Tune Detail Training Config[] - The fine-tuning method and hyperparameters used for fine-tuning a custom model.
- training
Datasets GetModel Fine Tune Detail Training Dataset[] - The dataset used to fine-tune the model.
- dedicated_
ai_ strcluster_ id - The OCID of the dedicated AI cluster this fine-tuning runs on.
- training_
configs Sequence[generativeai.Get Model Fine Tune Detail Training Config] - The fine-tuning method and hyperparameters used for fine-tuning a custom model.
- training_
datasets Sequence[generativeai.Get Model Fine Tune Detail Training Dataset] - The dataset used to fine-tune the model.
- dedicated
Ai StringCluster Id - The OCID of the dedicated AI cluster this fine-tuning runs on.
- training
Configs List<Property Map> - The fine-tuning method and hyperparameters used for fine-tuning a custom model.
- training
Datasets List<Property Map> - The dataset used to fine-tune the model.
GetModelFineTuneDetailTrainingConfig
- Early
Stopping intPatience - Stop training if the loss metric does not improve beyond 'early_stopping_threshold' for this many times of evaluation.
- Early
Stopping doubleThreshold - How much the loss must improve to prevent early stopping.
- Learning
Rate double - The initial learning rate to be used during training
- Log
Model intMetrics Interval In Steps - Determines how frequently to log model metrics.
- Lora
Alpha int - This parameter represents the scaling factor for the weight matrices in LoRA.
- Lora
Dropout double - This parameter indicates the dropout probability for LoRA layers.
- Lora
R int - This parameter represents the LoRA rank of the update matrices.
- Num
Of intLast Layers - The number of last layers to be fine-tuned.
- Total
Training intEpochs - The maximum number of training epochs to run for.
- Training
Batch intSize - The batch size used during training.
- Training
Config stringType - The fine-tuning method for training a custom model.
- Early
Stopping intPatience - Stop training if the loss metric does not improve beyond 'early_stopping_threshold' for this many times of evaluation.
- Early
Stopping float64Threshold - How much the loss must improve to prevent early stopping.
- Learning
Rate float64 - The initial learning rate to be used during training
- Log
Model intMetrics Interval In Steps - Determines how frequently to log model metrics.
- Lora
Alpha int - This parameter represents the scaling factor for the weight matrices in LoRA.
- Lora
Dropout float64 - This parameter indicates the dropout probability for LoRA layers.
- Lora
R int - This parameter represents the LoRA rank of the update matrices.
- Num
Of intLast Layers - The number of last layers to be fine-tuned.
- Total
Training intEpochs - The maximum number of training epochs to run for.
- Training
Batch intSize - The batch size used during training.
- Training
Config stringType - The fine-tuning method for training a custom model.
- early
Stopping IntegerPatience - Stop training if the loss metric does not improve beyond 'early_stopping_threshold' for this many times of evaluation.
- early
Stopping DoubleThreshold - How much the loss must improve to prevent early stopping.
- learning
Rate Double - The initial learning rate to be used during training
- log
Model IntegerMetrics Interval In Steps - Determines how frequently to log model metrics.
- lora
Alpha Integer - This parameter represents the scaling factor for the weight matrices in LoRA.
- lora
Dropout Double - This parameter indicates the dropout probability for LoRA layers.
- lora
R Integer - This parameter represents the LoRA rank of the update matrices.
- num
Of IntegerLast Layers - The number of last layers to be fine-tuned.
- total
Training IntegerEpochs - The maximum number of training epochs to run for.
- training
Batch IntegerSize - The batch size used during training.
- training
Config StringType - The fine-tuning method for training a custom model.
- early
Stopping numberPatience - Stop training if the loss metric does not improve beyond 'early_stopping_threshold' for this many times of evaluation.
- early
Stopping numberThreshold - How much the loss must improve to prevent early stopping.
- learning
Rate number - The initial learning rate to be used during training
- log
Model numberMetrics Interval In Steps - Determines how frequently to log model metrics.
- lora
Alpha number - This parameter represents the scaling factor for the weight matrices in LoRA.
- lora
Dropout number - This parameter indicates the dropout probability for LoRA layers.
- lora
R number - This parameter represents the LoRA rank of the update matrices.
- num
Of numberLast Layers - The number of last layers to be fine-tuned.
- total
Training numberEpochs - The maximum number of training epochs to run for.
- training
Batch numberSize - The batch size used during training.
- training
Config stringType - The fine-tuning method for training a custom model.
- early_
stopping_ intpatience - Stop training if the loss metric does not improve beyond 'early_stopping_threshold' for this many times of evaluation.
- early_
stopping_ floatthreshold - How much the loss must improve to prevent early stopping.
- learning_
rate float - The initial learning rate to be used during training
- log_
model_ intmetrics_ interval_ in_ steps - Determines how frequently to log model metrics.
- lora_
alpha int - This parameter represents the scaling factor for the weight matrices in LoRA.
- lora_
dropout float - This parameter indicates the dropout probability for LoRA layers.
- lora_
r int - This parameter represents the LoRA rank of the update matrices.
- num_
of_ intlast_ layers - The number of last layers to be fine-tuned.
- total_
training_ intepochs - The maximum number of training epochs to run for.
- training_
batch_ intsize - The batch size used during training.
- training_
config_ strtype - The fine-tuning method for training a custom model.
- early
Stopping NumberPatience - Stop training if the loss metric does not improve beyond 'early_stopping_threshold' for this many times of evaluation.
- early
Stopping NumberThreshold - How much the loss must improve to prevent early stopping.
- learning
Rate Number - The initial learning rate to be used during training
- log
Model NumberMetrics Interval In Steps - Determines how frequently to log model metrics.
- lora
Alpha Number - This parameter represents the scaling factor for the weight matrices in LoRA.
- lora
Dropout Number - This parameter indicates the dropout probability for LoRA layers.
- lora
R Number - This parameter represents the LoRA rank of the update matrices.
- num
Of NumberLast Layers - The number of last layers to be fine-tuned.
- total
Training NumberEpochs - The maximum number of training epochs to run for.
- training
Batch NumberSize - The batch size used during training.
- training
Config StringType - The fine-tuning method for training a custom model.
GetModelFineTuneDetailTrainingDataset
- Bucket string
- The Object Storage bucket name.
- Dataset
Type string - The type of the data asset.
- Namespace string
- The Object Storage namespace.
- Object string
- The Object Storage object name.
- Bucket string
- The Object Storage bucket name.
- Dataset
Type string - The type of the data asset.
- Namespace string
- The Object Storage namespace.
- Object string
- The Object Storage object name.
- bucket String
- The Object Storage bucket name.
- dataset
Type String - The type of the data asset.
- namespace String
- The Object Storage namespace.
- object String
- The Object Storage object name.
- bucket string
- The Object Storage bucket name.
- dataset
Type string - The type of the data asset.
- namespace string
- The Object Storage namespace.
- object string
- The Object Storage object name.
- bucket str
- The Object Storage bucket name.
- dataset_
type str - The type of the data asset.
- namespace str
- The Object Storage namespace.
- object str
- The Object Storage object name.
- bucket String
- The Object Storage bucket name.
- dataset
Type String - The type of the data asset.
- namespace String
- The Object Storage namespace.
- object String
- The Object Storage object name.
GetModelModelMetric
- Final
Accuracy double - Fine-tuned model accuracy.
- Final
Loss double - Fine-tuned model loss.
- Model
Metrics stringType - The type of the model metrics. Each type of model can expect a different set of model metrics.
- Final
Accuracy float64 - Fine-tuned model accuracy.
- Final
Loss float64 - Fine-tuned model loss.
- Model
Metrics stringType - The type of the model metrics. Each type of model can expect a different set of model metrics.
- final
Accuracy Double - Fine-tuned model accuracy.
- final
Loss Double - Fine-tuned model loss.
- model
Metrics StringType - The type of the model metrics. Each type of model can expect a different set of model metrics.
- final
Accuracy number - Fine-tuned model accuracy.
- final
Loss number - Fine-tuned model loss.
- model
Metrics stringType - The type of the model metrics. Each type of model can expect a different set of model metrics.
- final_
accuracy float - Fine-tuned model accuracy.
- final_
loss float - Fine-tuned model loss.
- model_
metrics_ strtype - The type of the model metrics. Each type of model can expect a different set of model metrics.
- final
Accuracy Number - Fine-tuned model accuracy.
- final
Loss Number - Fine-tuned model loss.
- model
Metrics StringType - 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.