Oracle Cloud Infrastructure v2.4.0 published on Thursday, Jul 25, 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 - 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, object>
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"}
- Description string
- Display
Name string - Fine
Tune List<GetDetails Model Fine Tune Detail> - Dictionary<string, object>
- Id string
- An ID that uniquely identifies a pretrained or fine-tuned model.
- Is
Long boolTerm Supported - Lifecycle
Details string - Model
Id string - Model
Metrics List<GetModel Model Metric> - State string
- The lifecycle state of the model.
- Dictionary<string, object>
- Time
Created string - Time
Deprecated string - Corresponds to the time when the custom model and its associated foundation model will be deprecated.
- Time
Updated string - Type string
- The model type indicating whether this is a pretrained/base model or a custom/fine-tuned model.
- Vendor string
- Version string
- The version of the model.
- Base
Model stringId - 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]interface{}
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"}
- Description string
- Display
Name string - Fine
Tune []GetDetails Model Fine Tune Detail - map[string]interface{}
- Id string
- An ID that uniquely identifies a pretrained or fine-tuned model.
- Is
Long boolTerm Supported - Lifecycle
Details string - Model
Id string - Model
Metrics []GetModel Model Metric - State string
- The lifecycle state of the model.
- map[string]interface{}
- Time
Created string - Time
Deprecated string - Corresponds to the time when the custom model and its associated foundation model will be deprecated.
- Time
Updated string - Type string
- The model type indicating whether this is a pretrained/base model or a custom/fine-tuned model.
- Vendor string
- Version string
- The version of the model.
- base
Model StringId - 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,Object>
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"}
- description String
- display
Name String - fine
Tune List<GetDetails Model Fine Tune Detail> - Map<String,Object>
- id String
- An ID that uniquely identifies a pretrained or fine-tuned model.
- is
Long BooleanTerm Supported - lifecycle
Details String - model
Id String - model
Metrics List<GetModel Model Metric> - state String
- The lifecycle state of the model.
- Map<String,Object>
- time
Created String - time
Deprecated String - Corresponds to the time when the custom model and its associated foundation model will be deprecated.
- time
Updated String - type String
- The model type indicating whether this is a pretrained/base model or a custom/fine-tuned model.
- vendor String
- version String
- The version of the model.
- base
Model stringId - 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]: any}
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"}
- description string
- display
Name string - fine
Tune GetDetails Model Fine Tune Detail[] - {[key: string]: any}
- id string
- An ID that uniquely identifies a pretrained or fine-tuned model.
- is
Long booleanTerm Supported - lifecycle
Details string - model
Id string - model
Metrics GetModel Model Metric[] - state string
- The lifecycle state of the model.
- {[key: string]: any}
- time
Created string - time
Deprecated string - Corresponds to the time when the custom model and its associated foundation model will be deprecated.
- time
Updated string - type string
- The model type indicating whether this is a pretrained/base model or a custom/fine-tuned model.
- vendor string
- version string
- The version of the model.
- base_
model_ strid - 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, Any]
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"}
- description str
- display_
name str - fine_
tune_ Sequence[generativeai.details Get Model Fine Tune Detail] - Mapping[str, Any]
- id str
- An ID that uniquely identifies a pretrained or fine-tuned model.
- is_
long_ boolterm_ supported - lifecycle_
details str - model_
id str - model_
metrics Sequence[generativeai.Get Model Model Metric] - state str
- The lifecycle state of the model.
- Mapping[str, Any]
- time_
created str - time_
deprecated str - Corresponds to the time when the custom model and its associated foundation model will be deprecated.
- time_
updated str - type str
- The model type indicating whether this is a pretrained/base model or a custom/fine-tuned model.
- vendor str
- version str
- The version of the model.
- base
Model StringId - 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<Any>
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"}
- description String
- display
Name String - fine
Tune List<Property Map>Details - Map<Any>
- id String
- An ID that uniquely identifies a pretrained or fine-tuned model.
- is
Long BooleanTerm Supported - lifecycle
Details String - model
Id String - model
Metrics List<Property Map> - state String
- The lifecycle state of the model.
- Map<Any>
- time
Created String - time
Deprecated String - Corresponds to the time when the custom model and its associated foundation model will be deprecated.
- time
Updated String - type String
- The model type indicating whether this is a pretrained/base model or a custom/fine-tuned model.
- vendor String
- version String
- The version of the model.
Supporting Types
GetModelFineTuneDetail
GetModelFineTuneDetailTrainingConfig
- Early
Stopping intPatience - Early
Stopping doubleThreshold - Learning
Rate double - Log
Model intMetrics Interval In Steps - Lora
Alpha int - Lora
Dropout double - Lora
R int - Num
Of intLast Layers - Total
Training intEpochs - Training
Batch intSize - Training
Config stringType
- Early
Stopping intPatience - Early
Stopping float64Threshold - Learning
Rate float64 - Log
Model intMetrics Interval In Steps - Lora
Alpha int - Lora
Dropout float64 - Lora
R int - Num
Of intLast Layers - Total
Training intEpochs - Training
Batch intSize - Training
Config stringType
- early
Stopping IntegerPatience - early
Stopping DoubleThreshold - learning
Rate Double - log
Model IntegerMetrics Interval In Steps - lora
Alpha Integer - lora
Dropout Double - lora
R Integer - num
Of IntegerLast Layers - total
Training IntegerEpochs - training
Batch IntegerSize - training
Config StringType
- early
Stopping numberPatience - early
Stopping numberThreshold - learning
Rate number - log
Model numberMetrics Interval In Steps - lora
Alpha number - lora
Dropout number - lora
R number - num
Of numberLast Layers - total
Training numberEpochs - training
Batch numberSize - training
Config stringType
- early
Stopping NumberPatience - early
Stopping NumberThreshold - learning
Rate Number - log
Model NumberMetrics Interval In Steps - lora
Alpha Number - lora
Dropout Number - lora
R Number - num
Of NumberLast Layers - total
Training NumberEpochs - training
Batch NumberSize - training
Config StringType
GetModelFineTuneDetailTrainingDataset
- Bucket string
- Dataset
Type string - Namespace string
- Object string
- Bucket string
- Dataset
Type string - Namespace string
- Object string
- bucket String
- dataset
Type String - namespace String
- object String
- bucket string
- dataset
Type string - namespace string
- object string
- bucket str
- dataset_
type str - namespace str
- object str
- bucket String
- dataset
Type String - namespace String
- object String
GetModelModelMetric
- Final
Accuracy double - Final
Loss double - Model
Metrics stringType
- Final
Accuracy float64 - Final
Loss float64 - Model
Metrics stringType
- final
Accuracy Double - final
Loss Double - model
Metrics StringType
- final
Accuracy number - final
Loss number - model
Metrics stringType
- final_
accuracy float - final_
loss float - model_
metrics_ strtype
- final
Accuracy Number - final
Loss Number - model
Metrics StringType
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
oci
Terraform Provider.