Table of Contents

Class DatasetStats

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

Statistics computed over a tuning dataset. This data type is not supported in Gemini API.

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

Properties

DroppedExampleIndices

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

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

Property Value

List<long>

DroppedExampleReasons

Output only. For each index in dropped_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?

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?

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 DatasetDistribution? UserInputTokenDistribution { get; set; }

Property Value

DatasetDistribution

UserMessagePerExampleDistribution

Output only. Dataset distributions for the messages per example.

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

Property Value

DatasetDistribution

UserOutputTokenDistribution

Output only. Dataset distributions for the user output tokens.

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

Property Value

DatasetDistribution

Methods

FromJson(string, JsonSerializerOptions?)

Deserializes a JSON string to a DatasetStats object.

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

Parameters

jsonString string

The JSON string to deserialize.

options JsonSerializerOptions

Optional JsonSerializerOptions.

Returns

DatasetStats

The deserialized DatasetStats object, or null if deserialization fails.