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 @@ -276,6 +276,7 @@ namespace Together
typeof(global::Together.JsonConverters.AnyOfJsonConverter<global::Together.RerankRequestModel?, string>),
typeof(global::Together.JsonConverters.OneOfJsonConverter<string, object>),
typeof(global::Together.JsonConverters.OneOfJsonConverter<string, object>),
typeof(global::Together.JsonConverters.OneOfJsonConverter<global::Together.EvaluationClassifyResults, global::Together.EvaluationScoreResults, global::Together.EvaluationCompareResults>),
typeof(global::Together.JsonConverters.OneOfJsonConverter<int?, global::Together.RequestBatchSize?>),
typeof(global::Together.JsonConverters.OneOfJsonConverter<bool?, global::Together.RequestTrainOnInputs?>),
typeof(global::Together.JsonConverters.OneOfJsonConverter<global::Together.TrainingMethodSFT, global::Together.TrainingMethodDPO>),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -291,9 +291,7 @@ partial void ProcessEvaluationUpdateResponseContent(
/// <param name="error">
/// Error message
/// </param>
/// <param name="results">
/// Job results (required when status is 'completed')
/// </param>
/// <param name="results"></param>
/// <param name="status">
/// The new status for the job
/// </param>
Expand All @@ -303,7 +301,7 @@ partial void ProcessEvaluationUpdateResponseContent(
string id,
global::Together.EvaluationUpdateRequestStatus status,
string? error = default,
object? results = default,
global::Together.OneOf<global::Together.EvaluationClassifyResults, global::Together.EvaluationScoreResults, global::Together.EvaluationCompareResults>? results = default,
global::System.Threading.CancellationToken cancellationToken = default)
{
var __request = new global::Together.EvaluationUpdateRequest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,7 @@ public partial interface IEvaluationsClient
/// <param name="error">
/// Error message
/// </param>
/// <param name="results">
/// Job results (required when status is 'completed')
/// </param>
/// <param name="results"></param>
/// <param name="status">
/// The new status for the job
/// </param>
Expand All @@ -37,7 +35,7 @@ public partial interface IEvaluationsClient
string id,
global::Together.EvaluationUpdateRequestStatus status,
string? error = default,
object? results = default,
global::Together.OneOf<global::Together.EvaluationClassifyResults, global::Together.EvaluationScoreResults, global::Together.EvaluationCompareResults>? results = default,
global::System.Threading.CancellationToken cancellationToken = default);
}
}
350 changes: 179 additions & 171 deletions src/libs/Together/Generated/Together.JsonSerializerContextTypes.g.cs

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ namespace Together
public sealed partial class EvaluationScoreResults
{
/// <summary>
/// Aggregated score statistics
///
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("aggregated_scores")]
public object? AggregatedScores { get; set; }
public global::Together.EvaluationScoreResultsAggregatedScores? AggregatedScores { get; set; }

/// <summary>
/// number of failed samples generated from model
Expand Down Expand Up @@ -59,9 +59,7 @@ public sealed partial class EvaluationScoreResults
/// <summary>
/// Initializes a new instance of the <see cref="EvaluationScoreResults" /> class.
/// </summary>
/// <param name="aggregatedScores">
/// Aggregated score statistics
/// </param>
/// <param name="aggregatedScores"></param>
/// <param name="failedSamples">
/// number of failed samples generated from model
/// </param>
Expand All @@ -84,7 +82,7 @@ public sealed partial class EvaluationScoreResults
[global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
#endif
public EvaluationScoreResults(
object? aggregatedScores,
global::Together.EvaluationScoreResultsAggregatedScores? aggregatedScores,
double? failedSamples,
double? generationFailCount,
double? invalidScoreCount,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,58 @@
namespace Together
{
/// <summary>
/// Aggregated score statistics
///
/// </summary>
public sealed partial class EvaluationScoreResultsAggregatedScores
{
/// <summary>
///
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("mean_score")]
public float? MeanScore { get; set; }

/// <summary>
///
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("pass_percentage")]
public float? PassPercentage { get; set; }

/// <summary>
///
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("std_score")]
public float? StdScore { get; set; }

/// <summary>
/// Additional properties that are not explicitly defined in the schema
/// </summary>
[global::System.Text.Json.Serialization.JsonExtensionData]
public global::System.Collections.Generic.IDictionary<string, object> AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary<string, object>();

/// <summary>
/// Initializes a new instance of the <see cref="EvaluationScoreResultsAggregatedScores" /> class.
/// </summary>
/// <param name="meanScore"></param>
/// <param name="passPercentage"></param>
/// <param name="stdScore"></param>
#if NET7_0_OR_GREATER
[global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
#endif
public EvaluationScoreResultsAggregatedScores(
float? meanScore,
float? passPercentage,
float? stdScore)
{
this.MeanScore = meanScore;
this.PassPercentage = passPercentage;
this.StdScore = stdScore;
}

/// <summary>
/// Initializes a new instance of the <see cref="EvaluationScoreResultsAggregatedScores" /> class.
/// </summary>
public EvaluationScoreResultsAggregatedScores()
{
}
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@

#pragma warning disable CS0618 // Type or member is obsolete

#nullable enable

namespace Together
Expand All @@ -15,10 +17,11 @@ public sealed partial class EvaluationUpdateRequest
public string? Error { get; set; }

/// <summary>
/// Job results (required when status is 'completed')
///
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("results")]
public object? Results { get; set; }
[global::System.Text.Json.Serialization.JsonConverter(typeof(global::Together.JsonConverters.OneOfJsonConverter<global::Together.EvaluationClassifyResults, global::Together.EvaluationScoreResults, global::Together.EvaluationCompareResults>))]
public global::Together.OneOf<global::Together.EvaluationClassifyResults, global::Together.EvaluationScoreResults, global::Together.EvaluationCompareResults>? Results { get; set; }

/// <summary>
/// The new status for the job
Expand All @@ -40,9 +43,7 @@ public sealed partial class EvaluationUpdateRequest
/// <param name="error">
/// Error message
/// </param>
/// <param name="results">
/// Job results (required when status is 'completed')
/// </param>
/// <param name="results"></param>
/// <param name="status">
/// The new status for the job
/// </param>
Expand All @@ -52,7 +53,7 @@ public sealed partial class EvaluationUpdateRequest
public EvaluationUpdateRequest(
global::Together.EvaluationUpdateRequestStatus status,
string? error,
object? results)
global::Together.OneOf<global::Together.EvaluationClassifyResults, global::Together.EvaluationScoreResults, global::Together.EvaluationCompareResults>? results)
{
this.Status = status;
this.Error = error;
Expand Down

This file was deleted.

This file was deleted.

17 changes: 14 additions & 3 deletions src/libs/Together/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1040,8 +1040,10 @@ paths:
type: string
description: Error message
results:
type: object
description: Job results (required when status is 'completed')
oneOf:
- $ref: '#/components/schemas/EvaluationClassifyResults'
- $ref: '#/components/schemas/EvaluationScoreResults'
- $ref: '#/components/schemas/EvaluationCompareResults'
status:
enum:
- completed
Expand Down Expand Up @@ -4000,7 +4002,16 @@ components:
properties:
aggregated_scores:
type: object
description: Aggregated score statistics
properties:
mean_score:
type: number
format: float
pass_percentage:
type: number
format: float
std_score:
type: number
format: float
failed_samples:
type: number
description: number of failed samples generated from model
Expand Down
Loading