Table of Contents

Class SupervisedTuningDataStats

Namespace
Google.GenAI.Types
Assembly
Google.GenAI.dll

Tuning data statistics for Supervised Tuning. This data type is not supported in Gemini API.

public record SupervisedTuningDataStats : IEquatable<SupervisedTuningDataStats>
Inheritance
SupervisedTuningDataStats
Implements
Inherited Members

Properties

DroppedExampleReasons

Output only. For each index in truncated_example_indices, the user-facing reason why the example was dropped.

[JsonPropertyName("droppedExampleReasons")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public List<string>? DroppedExampleReasons { get; set; }

Property Value

List<string>

TotalBillableCharacterCount

Output only. Number of billable characters in the tuning dataset.

[JsonPropertyName("totalBillableCharacterCount")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonConverter(typeof(StringToNullableLongConverter))]
public long? TotalBillableCharacterCount { get; set; }

Property Value

long?

TotalBillableTokenCount

Output only. Number of billable tokens in the tuning dataset.

[JsonPropertyName("totalBillableTokenCount")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonConverter(typeof(StringToNullableLongConverter))]
public long? TotalBillableTokenCount { get; set; }

Property Value

long?

TotalTruncatedExampleCount

Output only. The number of examples in the dataset that have been dropped. An example can be dropped for reasons including: too many tokens, contains an invalid image, contains too many images, etc.

[JsonPropertyName("totalTruncatedExampleCount")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonConverter(typeof(StringToNullableLongConverter))]
public long? TotalTruncatedExampleCount { get; set; }

Property Value

long?

TotalTuningCharacterCount

Output only. Number of tuning characters in the tuning dataset.

[JsonPropertyName("totalTuningCharacterCount")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonConverter(typeof(StringToNullableLongConverter))]
public long? TotalTuningCharacterCount { get; set; }

Property Value

long?

TruncatedExampleIndices

Output only. A partial sample of the indices (starting from 1) of the dropped examples.

[JsonPropertyName("truncatedExampleIndices")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonConverter(typeof(StringToNullableLongListConverter))]
public List<long>? TruncatedExampleIndices { get; set; }

Property Value

List<long>

TuningDatasetExampleCount

Output only. Number of examples in the tuning dataset.

[JsonPropertyName("tuningDatasetExampleCount")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonConverter(typeof(StringToNullableLongConverter))]
public long? TuningDatasetExampleCount { get; set; }

Property Value

long?

TuningStepCount

Output only. Number of tuning steps for this Tuning Job.

[JsonPropertyName("tuningStepCount")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonConverter(typeof(StringToNullableLongConverter))]
public long? TuningStepCount { get; set; }

Property Value

long?

UserDatasetExamples

Output only. Sample user messages in the training dataset uri.

[JsonPropertyName("userDatasetExamples")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public List<Content>? UserDatasetExamples { get; set; }

Property Value

List<Content>

UserInputTokenDistribution

Output only. Dataset distributions for the user input tokens.

[JsonPropertyName("userInputTokenDistribution")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public SupervisedTuningDatasetDistribution? UserInputTokenDistribution { get; set; }

Property Value

SupervisedTuningDatasetDistribution

UserMessagePerExampleDistribution

Output only. Dataset distributions for the messages per example.

[JsonPropertyName("userMessagePerExampleDistribution")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public SupervisedTuningDatasetDistribution? UserMessagePerExampleDistribution { get; set; }

Property Value

SupervisedTuningDatasetDistribution

UserOutputTokenDistribution

Output only. Dataset distributions for the user output tokens.

[JsonPropertyName("userOutputTokenDistribution")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public SupervisedTuningDatasetDistribution? UserOutputTokenDistribution { get; set; }

Property Value

SupervisedTuningDatasetDistribution

Methods

FromJson(string, JsonSerializerOptions?)

Deserializes a JSON string to a SupervisedTuningDataStats object.

public static SupervisedTuningDataStats? FromJson(string jsonString, JsonSerializerOptions? options = null)

Parameters

jsonString string

The JSON string to deserialize.

options JsonSerializerOptions

Optional JsonSerializerOptions.

Returns

SupervisedTuningDataStats

The deserialized SupervisedTuningDataStats object, or null if deserialization fails.