Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -501,55 +501,18 @@ partial void ProcessTrainDatasetModelResponseContent(
/// Name for the trained model. Must be 5-30 characters, alphanumeric with spaces and hyphens allowed.<br/>
/// Example: my-custom-model
/// </param>
/// <param name="trainingSteps">
/// Number of training steps. Must be between 100 and 20000 and a multiple of 100. Defaults to 1000.<br/>
/// Example: 1000
/// </param>
/// <param name="loraRank">
/// LoRA rank for model training. Must be one of 64, 128, or 256. Defaults to 128. Note: lora_rank 256 requires num_chips &gt;= 64.<br/>
/// Example: 64
/// </param>
/// <param name="numChips">
/// Number of TPU chips to use. Allowed values depend on the base_model_version: V_3_1 supports 16, 32, or 64, V_4_0 supports 128.<br/>
/// Example: 32
/// </param>
/// <param name="baseModelVersion">
/// Base model version to train on. Defaults to V_3_1.<br/>
/// Default Value: V_3_1<br/>
/// Example: V_3_1
/// </param>
/// <param name="ema">
/// Exponential moving average decay rate. Must be greater than 0.<br/>
/// Example: 0.999F
/// </param>
/// <param name="learningRate">
/// Learning rate for the optimizer. Must be greater than 0.<br/>
/// Example: 0.0001F
/// </param>
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::System.InvalidOperationException"></exception>
public async global::System.Threading.Tasks.Task<global::Ideogram.TrainDatasetModelResponse> TrainDatasetModelAsync(
string datasetId,
string modelName,
int? trainingSteps = default,
int? loraRank = default,
int? numChips = default,
global::Ideogram.TrainDatasetModelRequestBaseModelVersion? baseModelVersion = default,
double? ema = default,
double? learningRate = default,
global::Ideogram.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
{
var __request = new global::Ideogram.TrainDatasetModelRequest
{
ModelName = modelName,
TrainingSteps = trainingSteps,
LoraRank = loraRank,
NumChips = numChips,
BaseModelVersion = baseModelVersion,
Ema = ema,
LearningRate = learningRate,
};

return await TrainDatasetModelAsync(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,43 +28,12 @@ public partial interface IDatasetsClient
/// Name for the trained model. Must be 5-30 characters, alphanumeric with spaces and hyphens allowed.<br/>
/// Example: my-custom-model
/// </param>
/// <param name="trainingSteps">
/// Number of training steps. Must be between 100 and 20000 and a multiple of 100. Defaults to 1000.<br/>
/// Example: 1000
/// </param>
/// <param name="loraRank">
/// LoRA rank for model training. Must be one of 64, 128, or 256. Defaults to 128. Note: lora_rank 256 requires num_chips &gt;= 64.<br/>
/// Example: 64
/// </param>
/// <param name="numChips">
/// Number of TPU chips to use. Allowed values depend on the base_model_version: V_3_1 supports 16, 32, or 64, V_4_0 supports 128.<br/>
/// Example: 32
/// </param>
/// <param name="baseModelVersion">
/// Base model version to train on. Defaults to V_3_1.<br/>
/// Default Value: V_3_1<br/>
/// Example: V_3_1
/// </param>
/// <param name="ema">
/// Exponential moving average decay rate. Must be greater than 0.<br/>
/// Example: 0.999F
/// </param>
/// <param name="learningRate">
/// Learning rate for the optimizer. Must be greater than 0.<br/>
/// Example: 0.0001F
/// </param>
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::System.InvalidOperationException"></exception>
global::System.Threading.Tasks.Task<global::Ideogram.TrainDatasetModelResponse> TrainDatasetModelAsync(
string datasetId,
string modelName,
int? trainingSteps = default,
int? loraRank = default,
int? numChips = default,
global::Ideogram.TrainDatasetModelRequestBaseModelVersion? baseModelVersion = default,
double? ema = default,
double? learningRate = default,
global::Ideogram.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
#nullable enable

namespace Ideogram
{
public partial interface IModelsClient
{
/// <summary>
/// Train a custom Ideogram v3 model<br/>
/// Start training a custom Ideogram v3 model from a dataset using default hyperparameters. The dataset must contain at least 15 images and a maximum of 100 images.
/// </summary>
/// <param name="request"></param>
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::Ideogram.ApiException"></exception>
global::System.Threading.Tasks.Task<global::Ideogram.TrainDatasetModelResponse> TrainModelV3Async(

global::Ideogram.TrainModelV3Request request,
global::Ideogram.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
/// <summary>
/// Train a custom Ideogram v3 model<br/>
/// Start training a custom Ideogram v3 model from a dataset using default hyperparameters. The dataset must contain at least 15 images and a maximum of 100 images.
/// </summary>
/// <param name="datasetId">
/// ID of the dataset to train the model from.<br/>
/// Example: abc123
/// </param>
/// <param name="modelName">
/// Name for the trained model. Must be 5-30 characters, alphanumeric with spaces and hyphens allowed.<br/>
/// Example: my-custom-model
/// </param>
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::System.InvalidOperationException"></exception>
global::System.Threading.Tasks.Task<global::Ideogram.TrainDatasetModelResponse> TrainModelV3Async(
string datasetId,
string modelName,
global::Ideogram.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
#nullable enable

namespace Ideogram
{
public partial interface IModelsClient
{
/// <summary>
/// Train a custom Ideogram v3 model with advanced hyperparameters<br/>
/// Start training a custom Ideogram v3 model from a dataset with caller-supplied hyperparameters (training steps, LoRA rank, EMA decay, learning rate). All hyperparameters are optional and fall back to defaults when omitted. The dataset must contain at least 15 images and a maximum of 100 images. Returns the model ID and training status.
/// </summary>
/// <param name="request"></param>
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::Ideogram.ApiException"></exception>
global::System.Threading.Tasks.Task<global::Ideogram.TrainDatasetModelResponse> TrainModelV3AdvancedAsync(

global::Ideogram.TrainModelV3AdvancedRequest request,
global::Ideogram.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
/// <summary>
/// Train a custom Ideogram v3 model with advanced hyperparameters<br/>
/// Start training a custom Ideogram v3 model from a dataset with caller-supplied hyperparameters (training steps, LoRA rank, EMA decay, learning rate). All hyperparameters are optional and fall back to defaults when omitted. The dataset must contain at least 15 images and a maximum of 100 images. Returns the model ID and training status.
/// </summary>
/// <param name="datasetId">
/// ID of the dataset to train the model from.<br/>
/// Example: abc123
/// </param>
/// <param name="modelName">
/// Name for the trained model. Must be 5-30 characters, alphanumeric with spaces and hyphens allowed.<br/>
/// Example: my-custom-model
/// </param>
/// <param name="trainingSteps">
/// Number of training steps. Must be between 100 and 10000 and a multiple of 100. Defaults to 1000.<br/>
/// Example: 1000
/// </param>
/// <param name="loraRank">
/// LoRA rank for model training. Must be one of 64 or 128. Defaults to 128. Higher rank increases model capacity at the cost of longer training and larger weights.<br/>
/// Example: 64
/// </param>
/// <param name="ema">
/// Exponential moving average decay rate for the model weights. Must be between 0 and 1 (exclusive). Typical values are 0.99-0.9999; higher values produce smoother weight averages but respond more slowly to training updates.<br/>
/// Example: 0.999F
/// </param>
/// <param name="learningRate">
/// Learning rate for the optimizer. Must be greater than 0. Typical values for LoRA fine-tuning are 1e-5 to 1e-4; larger values train faster but risk instability.<br/>
/// Example: 0.0001F
/// </param>
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::System.InvalidOperationException"></exception>
global::System.Threading.Tasks.Task<global::Ideogram.TrainDatasetModelResponse> TrainModelV3AdvancedAsync(
string datasetId,
string modelName,
int? trainingSteps = default,
int? loraRank = default,
double? ema = default,
double? learningRate = default,
global::Ideogram.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
}
}

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,6 @@ namespace Ideogram

typeof(global::Ideogram.JsonConverters.DatasetAssetFailureReasonNullableJsonConverter),

typeof(global::Ideogram.JsonConverters.TrainDatasetModelRequestBaseModelVersionJsonConverter),

typeof(global::Ideogram.JsonConverters.TrainDatasetModelRequestBaseModelVersionNullableJsonConverter),

typeof(global::Ideogram.JsonConverters.ModelStatusJsonConverter),

typeof(global::Ideogram.JsonConverters.ModelStatusNullableJsonConverter),
Expand Down Expand Up @@ -345,16 +341,17 @@ namespace Ideogram
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Ideogram.UploadDatasetAssetsRequest))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Ideogram.TrainDatasetModelResponse))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Ideogram.TrainDatasetModelRequest))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Ideogram.TrainDatasetModelRequestBaseModelVersion), TypeInfoPropertyName = "TrainDatasetModelRequestBaseModelVersion2")]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(double))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Ideogram.ListModelsResponse))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList<global::Ideogram.CustomModel>))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Ideogram.CustomModel))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Ideogram.ModelStatus), TypeInfoPropertyName = "ModelStatus2")]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList<global::Ideogram.TrainingRun>))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Ideogram.TrainingRun))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Ideogram.TrainingRunStatus), TypeInfoPropertyName = "TrainingRunStatus2")]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(double))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Ideogram.GetModelResponse))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Ideogram.TrainModelV3Request))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Ideogram.TrainModelV3AdvancedRequest))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Ideogram.ColorPaletteWithPresetName))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Ideogram.ColorPaletteWithMembers))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Ideogram.ColorPalettePresetName), TypeInfoPropertyName = "ColorPalettePresetName2")]
Expand Down
Loading