Class OutputBucketConfiguration
S3 bucket configuration for the output data.
Inherited Members
Namespace: Amazon.CDK.AWS.StepFunctions.Tasks
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class OutputBucketConfiguration : IOutputBucketConfiguration, IDataBucketConfiguration
Syntax (vb)
Public Class OutputBucketConfiguration Implements IOutputBucketConfiguration, IDataBucketConfiguration
Remarks
ExampleMetadata: infused
Examples
using Amazon.CDK.Aws_bedrock;
using Amazon.CDK.AWS.KMS;
IBucket outputBucket;
IBucket trainingBucket;
IBucket validationBucket;
IKey kmsKey;
IVpc vpc;
var model = FoundationModel.FromFoundationModelId(this, "Model", FoundationModelIdentifier.AMAZON_TITAN_TEXT_G1_EXPRESS_V1);
var task = new BedrockCreateModelCustomizationJob(this, "CreateModelCustomizationJob", new BedrockCreateModelCustomizationJobProps {
BaseModel = model,
ClientRequestToken = "MyToken",
CustomizationType = CustomizationType.FINE_TUNING,
CustomModelKmsKey = kmsKey,
CustomModelName = "MyCustomModel", // required
CustomModelTags = new [] { new CustomModelTag { Key = "key1", Value = "value1" } },
HyperParameters = new Dictionary<string, string> {
{ "batchSize", "10" }
},
JobName = "MyCustomizationJob", // required
JobTags = new [] { new CustomModelTag { Key = "key2", Value = "value2" } },
OutputData = new OutputBucketConfiguration {
Bucket = outputBucket, // required
Path = "output-data/"
},
TrainingData = new TrainingBucketConfiguration {
Bucket = trainingBucket,
Path = "training-data/data.json"
}, // required
// If you don't provide validation data, you have to specify `Evaluation percentage` hyperparameter.
ValidationData = new [] { new ValidationBucketConfiguration {
Bucket = validationBucket,
Path = "validation-data/data.json"
} },
VpcConfig = new Dictionary<string, ISecurityGroup[]> {
{ "securityGroups", new [] { new SecurityGroup(this, "SecurityGroup", new SecurityGroupProps { Vpc = vpc }) } },
{ "subnets", vpc.PrivateSubnets }
}
});
Synopsis
Constructors
OutputBucketConfiguration() | S3 bucket configuration for the output data. |
Properties
Bucket | The S3 bucket. |
Path | Path to file or directory within the bucket. |
Constructors
OutputBucketConfiguration()
S3 bucket configuration for the output data.
public OutputBucketConfiguration()
Remarks
ExampleMetadata: infused
Examples
using Amazon.CDK.Aws_bedrock;
using Amazon.CDK.AWS.KMS;
IBucket outputBucket;
IBucket trainingBucket;
IBucket validationBucket;
IKey kmsKey;
IVpc vpc;
var model = FoundationModel.FromFoundationModelId(this, "Model", FoundationModelIdentifier.AMAZON_TITAN_TEXT_G1_EXPRESS_V1);
var task = new BedrockCreateModelCustomizationJob(this, "CreateModelCustomizationJob", new BedrockCreateModelCustomizationJobProps {
BaseModel = model,
ClientRequestToken = "MyToken",
CustomizationType = CustomizationType.FINE_TUNING,
CustomModelKmsKey = kmsKey,
CustomModelName = "MyCustomModel", // required
CustomModelTags = new [] { new CustomModelTag { Key = "key1", Value = "value1" } },
HyperParameters = new Dictionary<string, string> {
{ "batchSize", "10" }
},
JobName = "MyCustomizationJob", // required
JobTags = new [] { new CustomModelTag { Key = "key2", Value = "value2" } },
OutputData = new OutputBucketConfiguration {
Bucket = outputBucket, // required
Path = "output-data/"
},
TrainingData = new TrainingBucketConfiguration {
Bucket = trainingBucket,
Path = "training-data/data.json"
}, // required
// If you don't provide validation data, you have to specify `Evaluation percentage` hyperparameter.
ValidationData = new [] { new ValidationBucketConfiguration {
Bucket = validationBucket,
Path = "validation-data/data.json"
} },
VpcConfig = new Dictionary<string, ISecurityGroup[]> {
{ "securityGroups", new [] { new SecurityGroup(this, "SecurityGroup", new SecurityGroupProps { Vpc = vpc }) } },
{ "subnets", vpc.PrivateSubnets }
}
});
Properties
Bucket
The S3 bucket.
public IBucket Bucket { get; set; }
Property Value
Remarks
ExampleMetadata: infused
Path
Path to file or directory within the bucket.
public string? Path { get; set; }
Property Value
Remarks
Default: - root of the bucket