diff --git a/src/libs/Baseten/Generated/Baseten.BasetenClient.CreateLoopsDeploymentsByDeploymentIdMetrics.g.cs b/src/libs/Baseten/Generated/Baseten.BasetenClient.CreateLoopsDeploymentsByDeploymentIdMetrics.g.cs new file mode 100644 index 0000000..ed58407 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.BasetenClient.CreateLoopsDeploymentsByDeploymentIdMetrics.g.cs @@ -0,0 +1,503 @@ + +#nullable enable + +namespace Baseten +{ + public partial class BasetenClient + { + + + private static readonly global::Baseten.EndPointSecurityRequirement s_CreateLoopsDeploymentsByDeploymentIdMetricsSecurityRequirement0 = + new global::Baseten.EndPointSecurityRequirement + { + Authorizations = new global::Baseten.EndPointAuthorizationRequirement[] + { new global::Baseten.EndPointAuthorizationRequirement + { + Type = "Http", + SchemeId = "HttpBearer", + Location = "Header", + Name = "Bearer", + FriendlyName = "Bearer", + }, + }, + }; + private static readonly global::Baseten.EndPointSecurityRequirement[] s_CreateLoopsDeploymentsByDeploymentIdMetricsSecurityRequirements = + new global::Baseten.EndPointSecurityRequirement[] + { s_CreateLoopsDeploymentsByDeploymentIdMetricsSecurityRequirement0, + }; + partial void PrepareCreateLoopsDeploymentsByDeploymentIdMetricsArguments( + global::System.Net.Http.HttpClient httpClient, + ref string deploymentId, + global::Baseten.GetLoopsDeploymentMetricsRequestV1 request); + partial void PrepareCreateLoopsDeploymentsByDeploymentIdMetricsRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string deploymentId, + global::Baseten.GetLoopsDeploymentMetricsRequestV1 request); + partial void ProcessCreateLoopsDeploymentsByDeploymentIdMetricsResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessCreateLoopsDeploymentsByDeploymentIdMetricsResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Get metrics for a Loops trainer deployment.
+ /// Returns per-node GPU/CPU/memory utilization and Knative queue-proxy request rate / concurrency / latency for the trainer pods. The sampler half of a Loops deployment is an OracleVersion and uses the existing model-metrics endpoint. + ///
+ /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + /// + /// curl --request POST \
+ /// --url https://api.baseten.co/v1/loops/deployments/{deployment_id}/metrics \
+ /// --header "Authorization: Api-Key $BASETEN_API_KEY" \
+ /// --data '{
+ /// "end_epoch_millis": null,
+ /// "start_epoch_millis": null
+ /// }' + ///
+ public async global::System.Threading.Tasks.Task CreateLoopsDeploymentsByDeploymentIdMetricsAsync( + string deploymentId, + + global::Baseten.GetLoopsDeploymentMetricsRequestV1 request, + global::Baseten.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await CreateLoopsDeploymentsByDeploymentIdMetricsAsResponseAsync( + deploymentId: deploymentId, + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Get metrics for a Loops trainer deployment.
+ /// Returns per-node GPU/CPU/memory utilization and Knative queue-proxy request rate / concurrency / latency for the trainer pods. The sampler half of a Loops deployment is an OracleVersion and uses the existing model-metrics endpoint. + ///
+ /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + /// + /// curl --request POST \
+ /// --url https://api.baseten.co/v1/loops/deployments/{deployment_id}/metrics \
+ /// --header "Authorization: Api-Key $BASETEN_API_KEY" \
+ /// --data '{
+ /// "end_epoch_millis": null,
+ /// "start_epoch_millis": null
+ /// }' + ///
+ public async global::System.Threading.Tasks.Task> CreateLoopsDeploymentsByDeploymentIdMetricsAsResponseAsync( + string deploymentId, + + global::Baseten.GetLoopsDeploymentMetricsRequestV1 request, + global::Baseten.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: HttpClient); + PrepareCreateLoopsDeploymentsByDeploymentIdMetricsArguments( + httpClient: HttpClient, + deploymentId: ref deploymentId, + request: request); + + + var __authorizations = global::Baseten.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_CreateLoopsDeploymentsByDeploymentIdMetricsSecurityRequirements, + operationName: "CreateLoopsDeploymentsByDeploymentIdMetricsAsync"); + + using var __timeoutCancellationTokenSource = global::Baseten.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::Baseten.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::Baseten.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: true); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::Baseten.PathBuilder( + path: $"/v1/loops/deployments/{deploymentId}/metrics", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + __path = global::Baseten.AutoSDKRequestOptionsSupport.AppendQueryParameters( + path: __path, + clientParameters: Options.QueryParameters, + requestParameters: requestOptions?.QueryParameters); + var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Post, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in __authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2" || + __authorization.Type == "OpenIdConnect") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + var __httpRequestContentBody = request.ToJson(JsonSerializerContext); + var __httpRequestContent = new global::System.Net.Http.StringContent( + content: __httpRequestContentBody, + encoding: global::System.Text.Encoding.UTF8, + mediaType: "application/json"); + __httpRequest.Content = __httpRequestContent; + global::Baseten.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareCreateLoopsDeploymentsByDeploymentIdMetricsRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + deploymentId: deploymentId!, + request: request); + + return __httpRequest; + } + + global::System.Net.Http.HttpRequestMessage? __httpRequest = null; + global::System.Net.Http.HttpResponseMessage? __response = null; + var __attemptNumber = 0; + try + { + for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++) + { + __attemptNumber = __attempt; + __httpRequest = __CreateHttpRequest(); + await global::Baseten.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::Baseten.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "createLoopsDeploymentsByDeploymentIdMetrics", + methodName: "CreateLoopsDeploymentsByDeploymentIdMetricsAsync", + pathTemplate: "$\"/v1/loops/deployments/{deploymentId}/metrics\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + try + { + __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + } + catch (global::System.Net.Http.HttpRequestException __exception) + { + var __retryDelay = global::Baseten.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::Baseten.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Baseten.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "createLoopsDeploymentsByDeploymentIdMetrics", + methodName: "CreateLoopsDeploymentsByDeploymentIdMetricsAsync", + pathTemplate: "$\"/v1/loops/deployments/{deploymentId}/metrics\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: __exception, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + if (!__willRetry) + { + throw; + } + + __httpRequest.Dispose(); + __httpRequest = null; + await global::Baseten.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::Baseten.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::Baseten.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::Baseten.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Baseten.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "createLoopsDeploymentsByDeploymentIdMetrics", + methodName: "CreateLoopsDeploymentsByDeploymentIdMetricsAsync", + pathTemplate: "$\"/v1/loops/deployments/{deploymentId}/metrics\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + __response.Dispose(); + __response = null; + __httpRequest.Dispose(); + __httpRequest = null; + await global::Baseten.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + break; + } + + if (__response == null) + { + throw new global::System.InvalidOperationException("No response received."); + } + + using (__response) + { + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessCreateLoopsDeploymentsByDeploymentIdMetricsResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Baseten.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Baseten.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "createLoopsDeploymentsByDeploymentIdMetrics", + methodName: "CreateLoopsDeploymentsByDeploymentIdMetricsAsync", + pathTemplate: "$\"/v1/loops/deployments/{deploymentId}/metrics\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + else + { + await global::Baseten.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Baseten.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "createLoopsDeploymentsByDeploymentIdMetrics", + methodName: "CreateLoopsDeploymentsByDeploymentIdMetricsAsync", + pathTemplate: "$\"/v1/loops/deployments/{deploymentId}/metrics\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + + if (__effectiveReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessCreateLoopsDeploymentsByDeploymentIdMetricsResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + var __value = global::Baseten.GetLoopsDeploymentMetricsResponseV1.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Baseten.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Baseten.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + throw new global::Baseten.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + using var __content = await __response.Content.ReadAsStreamAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + var __value = await global::Baseten.GetLoopsDeploymentMetricsResponseV1.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Baseten.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Baseten.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw new global::Baseten.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + + } + } + finally + { + __httpRequest?.Dispose(); + } + } + /// + /// Get metrics for a Loops trainer deployment.
+ /// Returns per-node GPU/CPU/memory utilization and Knative queue-proxy request rate / concurrency / latency for the trainer pods. The sampler half of a Loops deployment is an OracleVersion and uses the existing model-metrics endpoint. + ///
+ /// + /// + /// Epoch millis to end fetching metrics.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + /// + /// + /// Epoch millis to start fetching metrics.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task CreateLoopsDeploymentsByDeploymentIdMetricsAsync( + string deploymentId, + int? endEpochMillis = default, + int? startEpochMillis = default, + global::Baseten.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __request = new global::Baseten.GetLoopsDeploymentMetricsRequestV1 + { + EndEpochMillis = endEpochMillis, + StartEpochMillis = startEpochMillis, + }; + + return await CreateLoopsDeploymentsByDeploymentIdMetricsAsync( + deploymentId: deploymentId, + request: __request, + requestOptions: requestOptions, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/libs/Baseten/Generated/Baseten.IBasetenClient.CreateLoopsDeploymentsByDeploymentIdMetrics.g.cs b/src/libs/Baseten/Generated/Baseten.IBasetenClient.CreateLoopsDeploymentsByDeploymentIdMetrics.g.cs new file mode 100644 index 0000000..030782b --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.IBasetenClient.CreateLoopsDeploymentsByDeploymentIdMetrics.g.cs @@ -0,0 +1,78 @@ +#nullable enable + +namespace Baseten +{ + public partial interface IBasetenClient + { + /// + /// Get metrics for a Loops trainer deployment.
+ /// Returns per-node GPU/CPU/memory utilization and Knative queue-proxy request rate / concurrency / latency for the trainer pods. The sampler half of a Loops deployment is an OracleVersion and uses the existing model-metrics endpoint. + ///
+ /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + /// + /// curl --request POST \
+ /// --url https://api.baseten.co/v1/loops/deployments/{deployment_id}/metrics \
+ /// --header "Authorization: Api-Key $BASETEN_API_KEY" \
+ /// --data '{
+ /// "end_epoch_millis": null,
+ /// "start_epoch_millis": null
+ /// }' + ///
+ global::System.Threading.Tasks.Task CreateLoopsDeploymentsByDeploymentIdMetricsAsync( + string deploymentId, + + global::Baseten.GetLoopsDeploymentMetricsRequestV1 request, + global::Baseten.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get metrics for a Loops trainer deployment.
+ /// Returns per-node GPU/CPU/memory utilization and Knative queue-proxy request rate / concurrency / latency for the trainer pods. The sampler half of a Loops deployment is an OracleVersion and uses the existing model-metrics endpoint. + ///
+ /// + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + /// + /// curl --request POST \
+ /// --url https://api.baseten.co/v1/loops/deployments/{deployment_id}/metrics \
+ /// --header "Authorization: Api-Key $BASETEN_API_KEY" \
+ /// --data '{
+ /// "end_epoch_millis": null,
+ /// "start_epoch_millis": null
+ /// }' + ///
+ global::System.Threading.Tasks.Task> CreateLoopsDeploymentsByDeploymentIdMetricsAsResponseAsync( + string deploymentId, + + global::Baseten.GetLoopsDeploymentMetricsRequestV1 request, + global::Baseten.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Get metrics for a Loops trainer deployment.
+ /// Returns per-node GPU/CPU/memory utilization and Knative queue-proxy request rate / concurrency / latency for the trainer pods. The sampler half of a Loops deployment is an OracleVersion and uses the existing model-metrics endpoint. + ///
+ /// + /// + /// Epoch millis to end fetching metrics.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + /// + /// + /// Epoch millis to start fetching metrics.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task CreateLoopsDeploymentsByDeploymentIdMetricsAsync( + string deploymentId, + int? endEpochMillis = default, + int? startEpochMillis = default, + global::Baseten.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/Baseten/Generated/Baseten.JsonSerializerContext.g.cs b/src/libs/Baseten/Generated/Baseten.JsonSerializerContext.g.cs index 33acc08..4e729b1 100644 --- a/src/libs/Baseten/Generated/Baseten.JsonSerializerContext.g.cs +++ b/src/libs/Baseten/Generated/Baseten.JsonSerializerContext.g.cs @@ -396,6 +396,15 @@ namespace Baseten [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.DeactivateLoopsDeploymentResponseV1))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.GetLoopsDeploymentResponseV1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.GetLoopsDeploymentMetricsRequestV1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.InferenceVolumeByStatusDatapointV1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.LoopsDeploymentMetricsV1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.ResponseTimeDatapointV1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.LoopsDeploymentNodeMetricsV1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.GetLoopsDeploymentMetricsResponseV1))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.TrainingGpuCapacityItemV1))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.GetTrainingGpuCapacityResponseV1))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] @@ -515,6 +524,9 @@ namespace Baseten [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))] diff --git a/src/libs/Baseten/Generated/Baseten.JsonSerializerContextTypes.g.cs b/src/libs/Baseten/Generated/Baseten.JsonSerializerContextTypes.g.cs index ab1adf5..f64fec3 100644 --- a/src/libs/Baseten/Generated/Baseten.JsonSerializerContextTypes.g.cs +++ b/src/libs/Baseten/Generated/Baseten.JsonSerializerContextTypes.g.cs @@ -1020,335 +1020,371 @@ public sealed partial class JsonSerializerContextTypes /// /// /// - public global::Baseten.TrainingGpuCapacityItemV1? Type248 { get; set; } + public global::Baseten.GetLoopsDeploymentMetricsRequestV1? Type248 { get; set; } /// /// /// - public global::Baseten.GetTrainingGpuCapacityResponseV1? Type249 { get; set; } + public global::Baseten.InferenceVolumeByStatusDatapointV1? Type249 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type250 { get; set; } + public global::Baseten.LoopsDeploymentMetricsV1? Type250 { get; set; } /// /// /// - public global::Baseten.GetBlobCredentialsResponseV1? Type251 { get; set; } + public global::System.Collections.Generic.IList? Type251 { get; set; } /// /// /// - public global::Baseten.APIKeyCategory? Type252 { get; set; } + public global::Baseten.ResponseTimeDatapointV1? Type252 { get; set; } /// /// /// - public global::Baseten.CreateAPIKeyRequestV1? Type253 { get; set; } + public global::System.Collections.Generic.IList? Type253 { get; set; } /// /// /// - public global::Baseten.APIKeyV1? Type254 { get; set; } + public global::System.Collections.Generic.IList? Type254 { get; set; } /// /// /// - public global::Baseten.APIKeyInfoV1? Type255 { get; set; } + public global::Baseten.LoopsDeploymentNodeMetricsV1? Type255 { get; set; } /// /// /// - public global::Baseten.APIKeysV1? Type256 { get; set; } + public global::Baseten.GetLoopsDeploymentMetricsResponseV1? Type256 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type257 { get; set; } + public global::Baseten.TrainingGpuCapacityItemV1? Type257 { get; set; } /// /// /// - public global::Baseten.APIKeyTombstoneV1? Type258 { get; set; } + public global::Baseten.GetTrainingGpuCapacityResponseV1? Type258 { get; set; } /// /// /// - public global::Baseten.ModelWeightSnapshotV1? Type259 { get; set; } + public global::System.Collections.Generic.IList? Type259 { get; set; } /// /// /// - public global::Baseten.CreateModelWeightSnapshotRequestV1? Type260 { get; set; } + public global::Baseten.GetBlobCredentialsResponseV1? Type260 { get; set; } /// /// /// - public global::Baseten.CreateLLMModelRequestV1? Type261 { get; set; } + public global::Baseten.APIKeyCategory? Type261 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type262 { get; set; } + public global::Baseten.CreateAPIKeyRequestV1? Type262 { get; set; } /// /// /// - public global::Baseten.LLMModelHandleV1? Type263 { get; set; } + public global::Baseten.APIKeyV1? Type263 { get; set; } /// /// /// - public global::Baseten.CreateLLMModelVersionRequestV1? Type264 { get; set; } + public global::Baseten.APIKeyInfoV1? Type264 { get; set; } /// /// /// - public global::Baseten.LibraryListingV1? Type265 { get; set; } + public global::Baseten.APIKeysV1? Type265 { get; set; } /// /// /// - public global::Baseten.LibraryListingsV1? Type266 { get; set; } + public global::System.Collections.Generic.IList? Type266 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type267 { get; set; } + public global::Baseten.APIKeyTombstoneV1? Type267 { get; set; } /// /// /// - public global::Baseten.CreateLibraryListingRequestV1? Type268 { get; set; } + public global::Baseten.ModelWeightSnapshotV1? Type268 { get; set; } /// /// /// - public global::Baseten.LibraryListingTombstoneV1? Type269 { get; set; } + public global::Baseten.CreateModelWeightSnapshotRequestV1? Type269 { get; set; } /// /// /// - public global::Baseten.UpdateLibraryListingRequestV1? Type270 { get; set; } + public global::Baseten.CreateLLMModelRequestV1? Type270 { get; set; } /// /// /// - public global::Baseten.LibraryListingVersionV1? Type271 { get; set; } + public global::System.Collections.Generic.IList? Type271 { get; set; } /// /// /// - public global::Baseten.LibraryListingVersionsV1? Type272 { get; set; } + public global::Baseten.LLMModelHandleV1? Type272 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type273 { get; set; } + public global::Baseten.CreateLLMModelVersionRequestV1? Type273 { get; set; } /// /// /// - public global::Baseten.CreateLibraryListingVersionRequestV1? Type274 { get; set; } + public global::Baseten.LibraryListingV1? Type274 { get; set; } /// /// /// - public global::Baseten.LibraryListingVersionTombstoneV1? Type275 { get; set; } + public global::Baseten.LibraryListingsV1? Type275 { get; set; } /// /// /// - public global::Baseten.UpdateLibraryListingVersionRequestV1? Type276 { get; set; } + public global::System.Collections.Generic.IList? Type276 { get; set; } /// /// /// - public global::Baseten.BillableResourceV1? Type277 { get; set; } + public global::Baseten.CreateLibraryListingRequestV1? Type277 { get; set; } /// /// /// - public global::Baseten.ResourceKind? Type278 { get; set; } + public global::Baseten.LibraryListingTombstoneV1? Type278 { get; set; } /// /// /// - public global::Baseten.ChainMetadataV1? Type279 { get; set; } + public global::Baseten.UpdateLibraryListingRequestV1? Type279 { get; set; } /// /// /// - public global::Baseten.DailyDedicatedUsageV1? Type280 { get; set; } + public global::Baseten.LibraryListingVersionV1? Type280 { get; set; } /// /// /// - public global::Baseten.AnyOf? Type281 { get; set; } + public global::Baseten.LibraryListingVersionsV1? Type281 { get; set; } /// /// /// - public global::Baseten.DailyModelApiUsageV1? Type282 { get; set; } + public global::System.Collections.Generic.IList? Type282 { get; set; } /// /// /// - public global::Baseten.DailyTrainingUsageV1? Type283 { get; set; } + public global::Baseten.CreateLibraryListingVersionRequestV1? Type283 { get; set; } /// /// /// - public global::Baseten.DedicatedItemV1? Type284 { get; set; } + public global::Baseten.LibraryListingVersionTombstoneV1? Type284 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type285 { get; set; } + public global::Baseten.UpdateLibraryListingVersionRequestV1? Type285 { get; set; } /// /// /// - public global::Baseten.DedicatedUsageV1? Type286 { get; set; } + public global::Baseten.BillableResourceV1? Type286 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type287 { get; set; } + public global::Baseten.ResourceKind? Type287 { get; set; } /// /// /// - public global::Baseten.ModelApiItemV1? Type288 { get; set; } + public global::Baseten.ChainMetadataV1? Type288 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type289 { get; set; } + public global::Baseten.DailyDedicatedUsageV1? Type289 { get; set; } /// /// /// - public global::Baseten.ModelApisUsageV1? Type290 { get; set; } + public global::Baseten.AnyOf? Type290 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type291 { get; set; } + public global::Baseten.DailyModelApiUsageV1? Type291 { get; set; } /// /// /// - public global::Baseten.TrainingItemV1? Type292 { get; set; } + public global::Baseten.DailyTrainingUsageV1? Type292 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type293 { get; set; } + public global::Baseten.DedicatedItemV1? Type293 { get; set; } /// /// /// - public global::Baseten.TrainingUsageV1? Type294 { get; set; } + public global::System.Collections.Generic.IList? Type294 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type295 { get; set; } + public global::Baseten.DedicatedUsageV1? Type295 { get; set; } /// /// /// - public global::Baseten.UsageSummaryV1? Type296 { get; set; } + public global::System.Collections.Generic.IList? Type296 { get; set; } /// /// /// - public global::Baseten.UsageSummaryRequestV1? Type297 { get; set; } + public global::Baseten.ModelApiItemV1? Type297 { get; set; } /// /// /// - public global::Baseten.UserInfoV1? Type298 { get; set; } + public global::System.Collections.Generic.IList? Type298 { get; set; } /// /// /// - public global::Baseten.EffectiveModelConfigV1? Type299 { get; set; } + public global::Baseten.ModelApisUsageV1? Type299 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type300 { get; set; } + public global::System.Collections.Generic.IList? Type300 { get; set; } /// /// /// - public global::Baseten.EffectiveRateLimitV1? Type301 { get; set; } + public global::Baseten.TrainingItemV1? Type301 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type302 { get; set; } + public global::System.Collections.Generic.IList? Type302 { get; set; } /// /// /// - public global::Baseten.EffectiveUsageLimitV1? Type303 { get; set; } + public global::Baseten.TrainingUsageV1? Type303 { get; set; } /// /// /// - public global::Baseten.LimitTypeV1? Type304 { get; set; } + public global::System.Collections.Generic.IList? Type304 { get; set; } /// /// /// - public global::Baseten.RateLimitUnitV1? Type305 { get; set; } + public global::Baseten.UsageSummaryV1? Type305 { get; set; } /// /// /// - public global::Baseten.UsageLimitUnitV1? Type306 { get; set; } + public global::Baseten.UsageSummaryRequestV1? Type306 { get; set; } /// /// /// - public global::Baseten.GroupHierarchyV1? Type307 { get; set; } + public global::Baseten.UserInfoV1? Type307 { get; set; } /// /// /// - public global::Baseten.LimitEnforcementV1? Type308 { get; set; } + public global::Baseten.EffectiveModelConfigV1? Type308 { get; set; } /// /// /// - public global::Baseten.GroupMetadataV1? Type309 { get; set; } + public global::System.Collections.Generic.IList? Type309 { get; set; } /// /// /// - public global::Baseten.GroupV1? Type310 { get; set; } + public global::Baseten.EffectiveRateLimitV1? Type310 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type311 { get; set; } + public global::System.Collections.Generic.IList? Type311 { get; set; } /// /// /// - public global::Baseten.ModelConfigV1? Type312 { get; set; } + public global::Baseten.EffectiveUsageLimitV1? Type312 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type313 { get; set; } + public global::Baseten.LimitTypeV1? Type313 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type314 { get; set; } + public global::Baseten.RateLimitUnitV1? Type314 { get; set; } /// /// /// - public global::Baseten.RateLimitV1? Type315 { get; set; } + public global::Baseten.UsageLimitUnitV1? Type315 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type316 { get; set; } + public global::Baseten.GroupHierarchyV1? Type316 { get; set; } /// /// /// - public global::Baseten.UsageLimitV1? Type317 { get; set; } + public global::Baseten.LimitEnforcementV1? Type317 { get; set; } /// /// /// - public global::Baseten.PaginationResponseV1? Type318 { get; set; } + public global::Baseten.GroupMetadataV1? Type318 { get; set; } /// /// /// - public global::Baseten.GroupsResponseV1? Type319 { get; set; } + public global::Baseten.GroupV1? Type319 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type320 { get; set; } + public global::System.Collections.Generic.IList? Type320 { get; set; } /// /// /// - public global::Baseten.CreateGroupRequestV1? Type321 { get; set; } + public global::Baseten.ModelConfigV1? Type321 { get; set; } /// /// /// - public global::Baseten.UpdateGroupMetadataV1? Type322 { get; set; } + public global::System.Collections.Generic.IList? Type322 { get; set; } /// /// /// - public global::Baseten.UpdateGroupRequestV1? Type323 { get; set; } + public global::System.Collections.Generic.IList? Type323 { get; set; } /// /// /// - public global::Baseten.GatewayKeyInfoV1? Type324 { get; set; } + public global::Baseten.RateLimitV1? Type324 { get; set; } /// /// /// - public global::Baseten.KeysForGroupResponseV1? Type325 { get; set; } + public global::System.Collections.Generic.IList? Type325 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type326 { get; set; } + public global::Baseten.UsageLimitV1? Type326 { get; set; } /// /// /// - public global::Baseten.CreateApiKeyForGroupRequestV1? Type327 { get; set; } + public global::Baseten.PaginationResponseV1? Type327 { get; set; } /// /// /// - public global::Baseten.CreateApiKeyForGroupResponseV1? Type328 { get; set; } + public global::Baseten.GroupsResponseV1? Type328 { get; set; } /// /// /// - public global::Baseten.RegisterAPIKeyRequestV1? Type329 { get; set; } + public global::System.Collections.Generic.IList? Type329 { get; set; } /// /// /// - public global::Baseten.RegisterAPIKeyResponseV1? Type330 { get; set; } + public global::Baseten.CreateGroupRequestV1? Type330 { get; set; } + /// + /// + /// + public global::Baseten.UpdateGroupMetadataV1? Type331 { get; set; } + /// + /// + /// + public global::Baseten.UpdateGroupRequestV1? Type332 { get; set; } + /// + /// + /// + public global::Baseten.GatewayKeyInfoV1? Type333 { get; set; } + /// + /// + /// + public global::Baseten.KeysForGroupResponseV1? Type334 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type335 { get; set; } + /// + /// + /// + public global::Baseten.CreateApiKeyForGroupRequestV1? Type336 { get; set; } + /// + /// + /// + public global::Baseten.CreateApiKeyForGroupResponseV1? Type337 { get; set; } + /// + /// + /// + public global::Baseten.RegisterAPIKeyRequestV1? Type338 { get; set; } + /// + /// + /// + public global::Baseten.RegisterAPIKeyResponseV1? Type339 { get; set; } /// /// @@ -1497,78 +1533,90 @@ public sealed partial class JsonSerializerContextTypes /// /// /// - public global::System.Collections.Generic.List? ListType36 { get; set; } + public global::System.Collections.Generic.List? ListType36 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.List? ListType37 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.List? ListType38 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.List? ListType39 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType37 { get; set; } + public global::System.Collections.Generic.List? ListType40 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType38 { get; set; } + public global::System.Collections.Generic.List? ListType41 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType39 { get; set; } + public global::System.Collections.Generic.List? ListType42 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType40 { get; set; } + public global::System.Collections.Generic.List? ListType43 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType41 { get; set; } + public global::System.Collections.Generic.List? ListType44 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType42 { get; set; } + public global::System.Collections.Generic.List? ListType45 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType43 { get; set; } + public global::System.Collections.Generic.List? ListType46 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType44 { get; set; } + public global::System.Collections.Generic.List? ListType47 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType45 { get; set; } + public global::System.Collections.Generic.List? ListType48 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType46 { get; set; } + public global::System.Collections.Generic.List? ListType49 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType47 { get; set; } + public global::System.Collections.Generic.List? ListType50 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType48 { get; set; } + public global::System.Collections.Generic.List? ListType51 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType49 { get; set; } + public global::System.Collections.Generic.List? ListType52 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType50 { get; set; } + public global::System.Collections.Generic.List? ListType53 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType51 { get; set; } + public global::System.Collections.Generic.List? ListType54 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType52 { get; set; } + public global::System.Collections.Generic.List? ListType55 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType53 { get; set; } + public global::System.Collections.Generic.List? ListType56 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType54 { get; set; } + public global::System.Collections.Generic.List? ListType57 { get; set; } } } \ No newline at end of file diff --git a/src/libs/Baseten/Generated/Baseten.Models.GetLoopsDeploymentMetricsRequestV1.Json.g.cs b/src/libs/Baseten/Generated/Baseten.Models.GetLoopsDeploymentMetricsRequestV1.Json.g.cs new file mode 100644 index 0000000..7726dca --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.GetLoopsDeploymentMetricsRequestV1.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Baseten +{ + public sealed partial class GetLoopsDeploymentMetricsRequestV1 + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Baseten.GetLoopsDeploymentMetricsRequestV1? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Baseten.GetLoopsDeploymentMetricsRequestV1), + jsonSerializerContext) as global::Baseten.GetLoopsDeploymentMetricsRequestV1; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::Baseten.GetLoopsDeploymentMetricsRequestV1? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Baseten.GetLoopsDeploymentMetricsRequestV1), + jsonSerializerContext).ConfigureAwait(false)) as global::Baseten.GetLoopsDeploymentMetricsRequestV1; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Baseten/Generated/Baseten.Models.GetLoopsDeploymentMetricsRequestV1.g.cs b/src/libs/Baseten/Generated/Baseten.Models.GetLoopsDeploymentMetricsRequestV1.g.cs new file mode 100644 index 0000000..98235f0 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.GetLoopsDeploymentMetricsRequestV1.g.cs @@ -0,0 +1,61 @@ + +#nullable enable + +namespace Baseten +{ + /// + /// Time-range request for trainer deployment metrics. + /// + public sealed partial class GetLoopsDeploymentMetricsRequestV1 + { + /// + /// Epoch millis to end fetching metrics.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("end_epoch_millis")] + public int? EndEpochMillis { get; set; } + + /// + /// Epoch millis to start fetching metrics.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("start_epoch_millis")] + public int? StartEpochMillis { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Epoch millis to end fetching metrics.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + /// + /// + /// Epoch millis to start fetching metrics.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public GetLoopsDeploymentMetricsRequestV1( + int? endEpochMillis, + int? startEpochMillis) + { + this.EndEpochMillis = endEpochMillis; + this.StartEpochMillis = startEpochMillis; + } + + /// + /// Initializes a new instance of the class. + /// + public GetLoopsDeploymentMetricsRequestV1() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Baseten/Generated/Baseten.Models.GetLoopsDeploymentMetricsRequestV1EndEpochMillis.Json.g.cs b/src/libs/Baseten/Generated/Baseten.Models.GetLoopsDeploymentMetricsRequestV1EndEpochMillis.Json.g.cs new file mode 100644 index 0000000..ee7e04a --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.GetLoopsDeploymentMetricsRequestV1EndEpochMillis.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Baseten +{ + public sealed partial class GetLoopsDeploymentMetricsRequestV1EndEpochMillis + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Baseten.GetLoopsDeploymentMetricsRequestV1EndEpochMillis? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Baseten.GetLoopsDeploymentMetricsRequestV1EndEpochMillis), + jsonSerializerContext) as global::Baseten.GetLoopsDeploymentMetricsRequestV1EndEpochMillis; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::Baseten.GetLoopsDeploymentMetricsRequestV1EndEpochMillis? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Baseten.GetLoopsDeploymentMetricsRequestV1EndEpochMillis), + jsonSerializerContext).ConfigureAwait(false)) as global::Baseten.GetLoopsDeploymentMetricsRequestV1EndEpochMillis; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Baseten/Generated/Baseten.Models.GetLoopsDeploymentMetricsRequestV1EndEpochMillis.g.cs b/src/libs/Baseten/Generated/Baseten.Models.GetLoopsDeploymentMetricsRequestV1EndEpochMillis.g.cs new file mode 100644 index 0000000..b7cbadf --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.GetLoopsDeploymentMetricsRequestV1EndEpochMillis.g.cs @@ -0,0 +1,20 @@ + +#nullable enable + +namespace Baseten +{ + /// + /// Epoch millis to end fetching metrics.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + ///
+ public sealed partial class GetLoopsDeploymentMetricsRequestV1EndEpochMillis + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + } +} \ No newline at end of file diff --git a/src/libs/Baseten/Generated/Baseten.Models.GetLoopsDeploymentMetricsRequestV1StartEpochMillis.Json.g.cs b/src/libs/Baseten/Generated/Baseten.Models.GetLoopsDeploymentMetricsRequestV1StartEpochMillis.Json.g.cs new file mode 100644 index 0000000..9603509 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.GetLoopsDeploymentMetricsRequestV1StartEpochMillis.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Baseten +{ + public sealed partial class GetLoopsDeploymentMetricsRequestV1StartEpochMillis + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Baseten.GetLoopsDeploymentMetricsRequestV1StartEpochMillis? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Baseten.GetLoopsDeploymentMetricsRequestV1StartEpochMillis), + jsonSerializerContext) as global::Baseten.GetLoopsDeploymentMetricsRequestV1StartEpochMillis; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::Baseten.GetLoopsDeploymentMetricsRequestV1StartEpochMillis? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Baseten.GetLoopsDeploymentMetricsRequestV1StartEpochMillis), + jsonSerializerContext).ConfigureAwait(false)) as global::Baseten.GetLoopsDeploymentMetricsRequestV1StartEpochMillis; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Baseten/Generated/Baseten.Models.GetLoopsDeploymentMetricsRequestV1StartEpochMillis.g.cs b/src/libs/Baseten/Generated/Baseten.Models.GetLoopsDeploymentMetricsRequestV1StartEpochMillis.g.cs new file mode 100644 index 0000000..b3b5eaa --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.GetLoopsDeploymentMetricsRequestV1StartEpochMillis.g.cs @@ -0,0 +1,20 @@ + +#nullable enable + +namespace Baseten +{ + /// + /// Epoch millis to start fetching metrics.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + ///
+ public sealed partial class GetLoopsDeploymentMetricsRequestV1StartEpochMillis + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + } +} \ No newline at end of file diff --git a/src/libs/Baseten/Generated/Baseten.Models.GetLoopsDeploymentMetricsResponseV1.Json.g.cs b/src/libs/Baseten/Generated/Baseten.Models.GetLoopsDeploymentMetricsResponseV1.Json.g.cs new file mode 100644 index 0000000..678ec87 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.GetLoopsDeploymentMetricsResponseV1.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Baseten +{ + public sealed partial class GetLoopsDeploymentMetricsResponseV1 + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Baseten.GetLoopsDeploymentMetricsResponseV1? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Baseten.GetLoopsDeploymentMetricsResponseV1), + jsonSerializerContext) as global::Baseten.GetLoopsDeploymentMetricsResponseV1; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::Baseten.GetLoopsDeploymentMetricsResponseV1? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Baseten.GetLoopsDeploymentMetricsResponseV1), + jsonSerializerContext).ConfigureAwait(false)) as global::Baseten.GetLoopsDeploymentMetricsResponseV1; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Baseten/Generated/Baseten.Models.GetLoopsDeploymentMetricsResponseV1.g.cs b/src/libs/Baseten/Generated/Baseten.Models.GetLoopsDeploymentMetricsResponseV1.g.cs new file mode 100644 index 0000000..4c8979a --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.GetLoopsDeploymentMetricsResponseV1.g.cs @@ -0,0 +1,59 @@ + +#nullable enable + +namespace Baseten +{ + /// + /// Response for ``POST /v1/loops/deployments/<id>/metrics``. + /// + public sealed partial class GetLoopsDeploymentMetricsResponseV1 + { + /// + /// The trainer deployment ID. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("deployment_id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string DeploymentId { get; set; } + + /// + /// Metrics for the deployment. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("metrics")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::Baseten.LoopsDeploymentMetricsV1 Metrics { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The trainer deployment ID. + /// + /// + /// Metrics for the deployment. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public GetLoopsDeploymentMetricsResponseV1( + string deploymentId, + global::Baseten.LoopsDeploymentMetricsV1 metrics) + { + this.DeploymentId = deploymentId ?? throw new global::System.ArgumentNullException(nameof(deploymentId)); + this.Metrics = metrics ?? throw new global::System.ArgumentNullException(nameof(metrics)); + } + + /// + /// Initializes a new instance of the class. + /// + public GetLoopsDeploymentMetricsResponseV1() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Baseten/Generated/Baseten.Models.InferenceVolumeByStatusDatapointV1.Json.g.cs b/src/libs/Baseten/Generated/Baseten.Models.InferenceVolumeByStatusDatapointV1.Json.g.cs new file mode 100644 index 0000000..65e60a9 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.InferenceVolumeByStatusDatapointV1.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Baseten +{ + public sealed partial class InferenceVolumeByStatusDatapointV1 + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Baseten.InferenceVolumeByStatusDatapointV1? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Baseten.InferenceVolumeByStatusDatapointV1), + jsonSerializerContext) as global::Baseten.InferenceVolumeByStatusDatapointV1; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::Baseten.InferenceVolumeByStatusDatapointV1? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Baseten.InferenceVolumeByStatusDatapointV1), + jsonSerializerContext).ConfigureAwait(false)) as global::Baseten.InferenceVolumeByStatusDatapointV1; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Baseten/Generated/Baseten.Models.InferenceVolumeByStatusDatapointV1.g.cs b/src/libs/Baseten/Generated/Baseten.Models.InferenceVolumeByStatusDatapointV1.g.cs new file mode 100644 index 0000000..fb32940 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.InferenceVolumeByStatusDatapointV1.g.cs @@ -0,0 +1,83 @@ + +#nullable enable + +namespace Baseten +{ + /// + /// Request rate split by HTTP response code class. + /// + public sealed partial class InferenceVolumeByStatusDatapointV1 + { + /// + /// ISO 8601 timestamp. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("timestamp")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.DateTime Timestamp { get; set; } + + /// + /// 2xx requests per second. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("status_2xx")] + [global::System.Text.Json.Serialization.JsonRequired] + public required double Status2xx { get; set; } + + /// + /// 4xx requests per second. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("status_4xx")] + [global::System.Text.Json.Serialization.JsonRequired] + public required double Status4xx { get; set; } + + /// + /// 5xx requests per second. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("status_5xx")] + [global::System.Text.Json.Serialization.JsonRequired] + public required double Status5xx { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// ISO 8601 timestamp. + /// + /// + /// 2xx requests per second. + /// + /// + /// 4xx requests per second. + /// + /// + /// 5xx requests per second. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public InferenceVolumeByStatusDatapointV1( + global::System.DateTime timestamp, + double status2xx, + double status4xx, + double status5xx) + { + this.Timestamp = timestamp; + this.Status2xx = status2xx; + this.Status4xx = status4xx; + this.Status5xx = status5xx; + } + + /// + /// Initializes a new instance of the class. + /// + public InferenceVolumeByStatusDatapointV1() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Baseten/Generated/Baseten.Models.LoopsDeploymentMetricsV1.Json.g.cs b/src/libs/Baseten/Generated/Baseten.Models.LoopsDeploymentMetricsV1.Json.g.cs new file mode 100644 index 0000000..ece75b4 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.LoopsDeploymentMetricsV1.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Baseten +{ + public sealed partial class LoopsDeploymentMetricsV1 + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Baseten.LoopsDeploymentMetricsV1? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Baseten.LoopsDeploymentMetricsV1), + jsonSerializerContext) as global::Baseten.LoopsDeploymentMetricsV1; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::Baseten.LoopsDeploymentMetricsV1? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Baseten.LoopsDeploymentMetricsV1), + jsonSerializerContext).ConfigureAwait(false)) as global::Baseten.LoopsDeploymentMetricsV1; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Baseten/Generated/Baseten.Models.LoopsDeploymentMetricsV1.g.cs b/src/libs/Baseten/Generated/Baseten.Models.LoopsDeploymentMetricsV1.g.cs new file mode 100644 index 0000000..320fe1c --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.LoopsDeploymentMetricsV1.g.cs @@ -0,0 +1,158 @@ + +#nullable enable + +namespace Baseten +{ + /// + /// Metrics for a trainer (Loops) deployment.
+ /// Service-level fields summarize HTTP traffic into the trainer pods (the
+ /// Knative queue-proxy is the source). Compute fields are the leader-pod
+ /// aggregate; ``per_node_metrics`` carries the full multinode breakdown. + ///
+ public sealed partial class LoopsDeploymentMetricsV1 + { + /// + /// Number of inference requests per unit time (requests per second). + /// + [global::System.Text.Json.Serialization.JsonPropertyName("inference_volume")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList InferenceVolume { get; set; } + + /// + /// Number of in-progress concurrent inference requests. Source: the queue-proxy ``revision_queue_depth`` gauge on ``http-usermetric``. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("concurrent_requests")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList ConcurrentRequests { get; set; } + + /// + /// Percentiles of the response time distribution. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("response_time_stats")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList ResponseTimeStats { get; set; } + + /// + /// Request rate split by response code class. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("inference_volume_by_status")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList InferenceVolumeByStatus { get; set; } + + /// + /// Leader-pod GPU memory bytes per GPU rank. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("gpu_memory_usage_bytes")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.Dictionary> GpuMemoryUsageBytes { get; set; } + + /// + /// Leader-pod fractional GPU utilization per GPU rank. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("gpu_utilization")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.Dictionary> GpuUtilization { get; set; } + + /// + /// Leader-pod CPU usage in cores. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("cpu_usage")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList CpuUsage { get; set; } + + /// + /// Leader-pod CPU memory usage bytes. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("cpu_memory_usage_bytes")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList CpuMemoryUsageBytes { get; set; } + + /// + /// Leader-pod ephemeral storage usage. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("ephemeral_storage")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::Baseten.StorageMetricsV1 EphemeralStorage { get; set; } + + /// + /// Per-node compute breakdown for multinode trainer deployments. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("per_node_metrics")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList PerNodeMetrics { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Number of inference requests per unit time (requests per second). + /// + /// + /// Number of in-progress concurrent inference requests. Source: the queue-proxy ``revision_queue_depth`` gauge on ``http-usermetric``. + /// + /// + /// Percentiles of the response time distribution. + /// + /// + /// Request rate split by response code class. + /// + /// + /// Leader-pod GPU memory bytes per GPU rank. + /// + /// + /// Leader-pod fractional GPU utilization per GPU rank. + /// + /// + /// Leader-pod CPU usage in cores. + /// + /// + /// Leader-pod CPU memory usage bytes. + /// + /// + /// Leader-pod ephemeral storage usage. + /// + /// + /// Per-node compute breakdown for multinode trainer deployments. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public LoopsDeploymentMetricsV1( + global::System.Collections.Generic.IList inferenceVolume, + global::System.Collections.Generic.IList concurrentRequests, + global::System.Collections.Generic.IList responseTimeStats, + global::System.Collections.Generic.IList inferenceVolumeByStatus, + global::System.Collections.Generic.Dictionary> gpuMemoryUsageBytes, + global::System.Collections.Generic.Dictionary> gpuUtilization, + global::System.Collections.Generic.IList cpuUsage, + global::System.Collections.Generic.IList cpuMemoryUsageBytes, + global::Baseten.StorageMetricsV1 ephemeralStorage, + global::System.Collections.Generic.IList perNodeMetrics) + { + this.InferenceVolume = inferenceVolume ?? throw new global::System.ArgumentNullException(nameof(inferenceVolume)); + this.ConcurrentRequests = concurrentRequests ?? throw new global::System.ArgumentNullException(nameof(concurrentRequests)); + this.ResponseTimeStats = responseTimeStats ?? throw new global::System.ArgumentNullException(nameof(responseTimeStats)); + this.InferenceVolumeByStatus = inferenceVolumeByStatus ?? throw new global::System.ArgumentNullException(nameof(inferenceVolumeByStatus)); + this.GpuMemoryUsageBytes = gpuMemoryUsageBytes ?? throw new global::System.ArgumentNullException(nameof(gpuMemoryUsageBytes)); + this.GpuUtilization = gpuUtilization ?? throw new global::System.ArgumentNullException(nameof(gpuUtilization)); + this.CpuUsage = cpuUsage ?? throw new global::System.ArgumentNullException(nameof(cpuUsage)); + this.CpuMemoryUsageBytes = cpuMemoryUsageBytes ?? throw new global::System.ArgumentNullException(nameof(cpuMemoryUsageBytes)); + this.EphemeralStorage = ephemeralStorage ?? throw new global::System.ArgumentNullException(nameof(ephemeralStorage)); + this.PerNodeMetrics = perNodeMetrics ?? throw new global::System.ArgumentNullException(nameof(perNodeMetrics)); + } + + /// + /// Initializes a new instance of the class. + /// + public LoopsDeploymentMetricsV1() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Baseten/Generated/Baseten.Models.LoopsDeploymentMetricsV1GpuMemoryUsageBytes.Json.g.cs b/src/libs/Baseten/Generated/Baseten.Models.LoopsDeploymentMetricsV1GpuMemoryUsageBytes.Json.g.cs new file mode 100644 index 0000000..832b522 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.LoopsDeploymentMetricsV1GpuMemoryUsageBytes.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Baseten +{ + public sealed partial class LoopsDeploymentMetricsV1GpuMemoryUsageBytes + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Baseten.LoopsDeploymentMetricsV1GpuMemoryUsageBytes? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Baseten.LoopsDeploymentMetricsV1GpuMemoryUsageBytes), + jsonSerializerContext) as global::Baseten.LoopsDeploymentMetricsV1GpuMemoryUsageBytes; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::Baseten.LoopsDeploymentMetricsV1GpuMemoryUsageBytes? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Baseten.LoopsDeploymentMetricsV1GpuMemoryUsageBytes), + jsonSerializerContext).ConfigureAwait(false)) as global::Baseten.LoopsDeploymentMetricsV1GpuMemoryUsageBytes; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Baseten/Generated/Baseten.Models.LoopsDeploymentMetricsV1GpuMemoryUsageBytes.g.cs b/src/libs/Baseten/Generated/Baseten.Models.LoopsDeploymentMetricsV1GpuMemoryUsageBytes.g.cs new file mode 100644 index 0000000..d706570 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.LoopsDeploymentMetricsV1GpuMemoryUsageBytes.g.cs @@ -0,0 +1,19 @@ + +#nullable enable + +namespace Baseten +{ + /// + /// Leader-pod GPU memory bytes per GPU rank. + /// + public sealed partial class LoopsDeploymentMetricsV1GpuMemoryUsageBytes + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + } +} \ No newline at end of file diff --git a/src/libs/Baseten/Generated/Baseten.Models.LoopsDeploymentMetricsV1GpuUtilization.Json.g.cs b/src/libs/Baseten/Generated/Baseten.Models.LoopsDeploymentMetricsV1GpuUtilization.Json.g.cs new file mode 100644 index 0000000..0bfba1a --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.LoopsDeploymentMetricsV1GpuUtilization.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Baseten +{ + public sealed partial class LoopsDeploymentMetricsV1GpuUtilization + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Baseten.LoopsDeploymentMetricsV1GpuUtilization? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Baseten.LoopsDeploymentMetricsV1GpuUtilization), + jsonSerializerContext) as global::Baseten.LoopsDeploymentMetricsV1GpuUtilization; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::Baseten.LoopsDeploymentMetricsV1GpuUtilization? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Baseten.LoopsDeploymentMetricsV1GpuUtilization), + jsonSerializerContext).ConfigureAwait(false)) as global::Baseten.LoopsDeploymentMetricsV1GpuUtilization; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Baseten/Generated/Baseten.Models.LoopsDeploymentMetricsV1GpuUtilization.g.cs b/src/libs/Baseten/Generated/Baseten.Models.LoopsDeploymentMetricsV1GpuUtilization.g.cs new file mode 100644 index 0000000..3ac5d32 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.LoopsDeploymentMetricsV1GpuUtilization.g.cs @@ -0,0 +1,19 @@ + +#nullable enable + +namespace Baseten +{ + /// + /// Leader-pod fractional GPU utilization per GPU rank. + /// + public sealed partial class LoopsDeploymentMetricsV1GpuUtilization + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + } +} \ No newline at end of file diff --git a/src/libs/Baseten/Generated/Baseten.Models.LoopsDeploymentNodeMetricsV1.Json.g.cs b/src/libs/Baseten/Generated/Baseten.Models.LoopsDeploymentNodeMetricsV1.Json.g.cs new file mode 100644 index 0000000..281194c --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.LoopsDeploymentNodeMetricsV1.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Baseten +{ + public sealed partial class LoopsDeploymentNodeMetricsV1 + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Baseten.LoopsDeploymentNodeMetricsV1? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Baseten.LoopsDeploymentNodeMetricsV1), + jsonSerializerContext) as global::Baseten.LoopsDeploymentNodeMetricsV1; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::Baseten.LoopsDeploymentNodeMetricsV1? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Baseten.LoopsDeploymentNodeMetricsV1), + jsonSerializerContext).ConfigureAwait(false)) as global::Baseten.LoopsDeploymentNodeMetricsV1; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Baseten/Generated/Baseten.Models.LoopsDeploymentNodeMetricsV1.g.cs b/src/libs/Baseten/Generated/Baseten.Models.LoopsDeploymentNodeMetricsV1.g.cs new file mode 100644 index 0000000..4fae471 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.LoopsDeploymentNodeMetricsV1.g.cs @@ -0,0 +1,107 @@ + +#nullable enable + +namespace Baseten +{ + /// + /// Per-node compute metrics for a multinode trainer deployment. + /// + public sealed partial class LoopsDeploymentNodeMetricsV1 + { + /// + /// Identifier for the node. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("node_id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string NodeId { get; set; } + + /// + /// GPU memory usage bytes per GPU rank. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("gpu_memory_usage_bytes")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.Dictionary> GpuMemoryUsageBytes { get; set; } + + /// + /// Fractional GPU utilization per GPU rank. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("gpu_utilization")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.Dictionary> GpuUtilization { get; set; } + + /// + /// CPU usage in cores. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("cpu_usage")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList CpuUsage { get; set; } + + /// + /// CPU memory usage bytes. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("cpu_memory_usage_bytes")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList CpuMemoryUsageBytes { get; set; } + + /// + /// Ephemeral storage usage. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("ephemeral_storage")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::Baseten.StorageMetricsV1 EphemeralStorage { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Identifier for the node. + /// + /// + /// GPU memory usage bytes per GPU rank. + /// + /// + /// Fractional GPU utilization per GPU rank. + /// + /// + /// CPU usage in cores. + /// + /// + /// CPU memory usage bytes. + /// + /// + /// Ephemeral storage usage. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public LoopsDeploymentNodeMetricsV1( + string nodeId, + global::System.Collections.Generic.Dictionary> gpuMemoryUsageBytes, + global::System.Collections.Generic.Dictionary> gpuUtilization, + global::System.Collections.Generic.IList cpuUsage, + global::System.Collections.Generic.IList cpuMemoryUsageBytes, + global::Baseten.StorageMetricsV1 ephemeralStorage) + { + this.NodeId = nodeId ?? throw new global::System.ArgumentNullException(nameof(nodeId)); + this.GpuMemoryUsageBytes = gpuMemoryUsageBytes ?? throw new global::System.ArgumentNullException(nameof(gpuMemoryUsageBytes)); + this.GpuUtilization = gpuUtilization ?? throw new global::System.ArgumentNullException(nameof(gpuUtilization)); + this.CpuUsage = cpuUsage ?? throw new global::System.ArgumentNullException(nameof(cpuUsage)); + this.CpuMemoryUsageBytes = cpuMemoryUsageBytes ?? throw new global::System.ArgumentNullException(nameof(cpuMemoryUsageBytes)); + this.EphemeralStorage = ephemeralStorage ?? throw new global::System.ArgumentNullException(nameof(ephemeralStorage)); + } + + /// + /// Initializes a new instance of the class. + /// + public LoopsDeploymentNodeMetricsV1() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Baseten/Generated/Baseten.Models.LoopsDeploymentNodeMetricsV1GpuMemoryUsageBytes.Json.g.cs b/src/libs/Baseten/Generated/Baseten.Models.LoopsDeploymentNodeMetricsV1GpuMemoryUsageBytes.Json.g.cs new file mode 100644 index 0000000..30cb0cb --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.LoopsDeploymentNodeMetricsV1GpuMemoryUsageBytes.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Baseten +{ + public sealed partial class LoopsDeploymentNodeMetricsV1GpuMemoryUsageBytes + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Baseten.LoopsDeploymentNodeMetricsV1GpuMemoryUsageBytes? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Baseten.LoopsDeploymentNodeMetricsV1GpuMemoryUsageBytes), + jsonSerializerContext) as global::Baseten.LoopsDeploymentNodeMetricsV1GpuMemoryUsageBytes; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::Baseten.LoopsDeploymentNodeMetricsV1GpuMemoryUsageBytes? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Baseten.LoopsDeploymentNodeMetricsV1GpuMemoryUsageBytes), + jsonSerializerContext).ConfigureAwait(false)) as global::Baseten.LoopsDeploymentNodeMetricsV1GpuMemoryUsageBytes; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Baseten/Generated/Baseten.Models.LoopsDeploymentNodeMetricsV1GpuMemoryUsageBytes.g.cs b/src/libs/Baseten/Generated/Baseten.Models.LoopsDeploymentNodeMetricsV1GpuMemoryUsageBytes.g.cs new file mode 100644 index 0000000..c172689 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.LoopsDeploymentNodeMetricsV1GpuMemoryUsageBytes.g.cs @@ -0,0 +1,19 @@ + +#nullable enable + +namespace Baseten +{ + /// + /// GPU memory usage bytes per GPU rank. + /// + public sealed partial class LoopsDeploymentNodeMetricsV1GpuMemoryUsageBytes + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + } +} \ No newline at end of file diff --git a/src/libs/Baseten/Generated/Baseten.Models.LoopsDeploymentNodeMetricsV1GpuUtilization.Json.g.cs b/src/libs/Baseten/Generated/Baseten.Models.LoopsDeploymentNodeMetricsV1GpuUtilization.Json.g.cs new file mode 100644 index 0000000..25a2a24 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.LoopsDeploymentNodeMetricsV1GpuUtilization.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Baseten +{ + public sealed partial class LoopsDeploymentNodeMetricsV1GpuUtilization + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Baseten.LoopsDeploymentNodeMetricsV1GpuUtilization? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Baseten.LoopsDeploymentNodeMetricsV1GpuUtilization), + jsonSerializerContext) as global::Baseten.LoopsDeploymentNodeMetricsV1GpuUtilization; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::Baseten.LoopsDeploymentNodeMetricsV1GpuUtilization? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Baseten.LoopsDeploymentNodeMetricsV1GpuUtilization), + jsonSerializerContext).ConfigureAwait(false)) as global::Baseten.LoopsDeploymentNodeMetricsV1GpuUtilization; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Baseten/Generated/Baseten.Models.LoopsDeploymentNodeMetricsV1GpuUtilization.g.cs b/src/libs/Baseten/Generated/Baseten.Models.LoopsDeploymentNodeMetricsV1GpuUtilization.g.cs new file mode 100644 index 0000000..5522846 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.LoopsDeploymentNodeMetricsV1GpuUtilization.g.cs @@ -0,0 +1,19 @@ + +#nullable enable + +namespace Baseten +{ + /// + /// Fractional GPU utilization per GPU rank. + /// + public sealed partial class LoopsDeploymentNodeMetricsV1GpuUtilization + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + } +} \ No newline at end of file diff --git a/src/libs/Baseten/Generated/Baseten.Models.ResponseTimeDatapointV1.Json.g.cs b/src/libs/Baseten/Generated/Baseten.Models.ResponseTimeDatapointV1.Json.g.cs new file mode 100644 index 0000000..be68e31 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.ResponseTimeDatapointV1.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Baseten +{ + public sealed partial class ResponseTimeDatapointV1 + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Baseten.ResponseTimeDatapointV1? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Baseten.ResponseTimeDatapointV1), + jsonSerializerContext) as global::Baseten.ResponseTimeDatapointV1; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::Baseten.ResponseTimeDatapointV1? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Baseten.ResponseTimeDatapointV1), + jsonSerializerContext).ConfigureAwait(false)) as global::Baseten.ResponseTimeDatapointV1; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Baseten/Generated/Baseten.Models.ResponseTimeDatapointV1.g.cs b/src/libs/Baseten/Generated/Baseten.Models.ResponseTimeDatapointV1.g.cs new file mode 100644 index 0000000..6c6b91b --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.ResponseTimeDatapointV1.g.cs @@ -0,0 +1,89 @@ + +#nullable enable + +namespace Baseten +{ + /// + /// Latency quantile datapoint.
+ /// Values are reported in **milliseconds** to match the oracle/inference
+ /// ``response_time_stats`` convention. Source histogram is the queue-proxy's
+ /// ``revision_request_latencies_bucket`` whose bucket boundaries are in ms. + ///
+ public sealed partial class ResponseTimeDatapointV1 + { + /// + /// ISO 8601 timestamp. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("timestamp")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.DateTime Timestamp { get; set; } + + /// + /// 50th percentile request latency (milliseconds).
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("p50")] + public double? P50 { get; set; } + + /// + /// 95th percentile request latency (milliseconds).
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("p95")] + public double? P95 { get; set; } + + /// + /// 99th percentile request latency (milliseconds).
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("p99")] + public double? P99 { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// ISO 8601 timestamp. + /// + /// + /// 50th percentile request latency (milliseconds).
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + /// + /// + /// 95th percentile request latency (milliseconds).
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + /// + /// + /// 99th percentile request latency (milliseconds).
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public ResponseTimeDatapointV1( + global::System.DateTime timestamp, + double? p50, + double? p95, + double? p99) + { + this.Timestamp = timestamp; + this.P50 = p50; + this.P95 = p95; + this.P99 = p99; + } + + /// + /// Initializes a new instance of the class. + /// + public ResponseTimeDatapointV1() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Baseten/Generated/Baseten.Models.ResponseTimeDatapointV1P50.Json.g.cs b/src/libs/Baseten/Generated/Baseten.Models.ResponseTimeDatapointV1P50.Json.g.cs new file mode 100644 index 0000000..1975738 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.ResponseTimeDatapointV1P50.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Baseten +{ + public sealed partial class ResponseTimeDatapointV1P50 + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Baseten.ResponseTimeDatapointV1P50? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Baseten.ResponseTimeDatapointV1P50), + jsonSerializerContext) as global::Baseten.ResponseTimeDatapointV1P50; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::Baseten.ResponseTimeDatapointV1P50? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Baseten.ResponseTimeDatapointV1P50), + jsonSerializerContext).ConfigureAwait(false)) as global::Baseten.ResponseTimeDatapointV1P50; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Baseten/Generated/Baseten.Models.ResponseTimeDatapointV1P50.g.cs b/src/libs/Baseten/Generated/Baseten.Models.ResponseTimeDatapointV1P50.g.cs new file mode 100644 index 0000000..6bd91c9 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.ResponseTimeDatapointV1P50.g.cs @@ -0,0 +1,20 @@ + +#nullable enable + +namespace Baseten +{ + /// + /// 50th percentile request latency (milliseconds).
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + ///
+ public sealed partial class ResponseTimeDatapointV1P50 + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + } +} \ No newline at end of file diff --git a/src/libs/Baseten/Generated/Baseten.Models.ResponseTimeDatapointV1P95.Json.g.cs b/src/libs/Baseten/Generated/Baseten.Models.ResponseTimeDatapointV1P95.Json.g.cs new file mode 100644 index 0000000..2df3d7e --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.ResponseTimeDatapointV1P95.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Baseten +{ + public sealed partial class ResponseTimeDatapointV1P95 + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Baseten.ResponseTimeDatapointV1P95? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Baseten.ResponseTimeDatapointV1P95), + jsonSerializerContext) as global::Baseten.ResponseTimeDatapointV1P95; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::Baseten.ResponseTimeDatapointV1P95? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Baseten.ResponseTimeDatapointV1P95), + jsonSerializerContext).ConfigureAwait(false)) as global::Baseten.ResponseTimeDatapointV1P95; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Baseten/Generated/Baseten.Models.ResponseTimeDatapointV1P95.g.cs b/src/libs/Baseten/Generated/Baseten.Models.ResponseTimeDatapointV1P95.g.cs new file mode 100644 index 0000000..cd76404 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.ResponseTimeDatapointV1P95.g.cs @@ -0,0 +1,20 @@ + +#nullable enable + +namespace Baseten +{ + /// + /// 95th percentile request latency (milliseconds).
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + ///
+ public sealed partial class ResponseTimeDatapointV1P95 + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + } +} \ No newline at end of file diff --git a/src/libs/Baseten/Generated/Baseten.Models.ResponseTimeDatapointV1P99.Json.g.cs b/src/libs/Baseten/Generated/Baseten.Models.ResponseTimeDatapointV1P99.Json.g.cs new file mode 100644 index 0000000..395fabd --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.ResponseTimeDatapointV1P99.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Baseten +{ + public sealed partial class ResponseTimeDatapointV1P99 + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Baseten.ResponseTimeDatapointV1P99? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Baseten.ResponseTimeDatapointV1P99), + jsonSerializerContext) as global::Baseten.ResponseTimeDatapointV1P99; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::Baseten.ResponseTimeDatapointV1P99? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Baseten.ResponseTimeDatapointV1P99), + jsonSerializerContext).ConfigureAwait(false)) as global::Baseten.ResponseTimeDatapointV1P99; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Baseten/Generated/Baseten.Models.ResponseTimeDatapointV1P99.g.cs b/src/libs/Baseten/Generated/Baseten.Models.ResponseTimeDatapointV1P99.g.cs new file mode 100644 index 0000000..c48e46e --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.ResponseTimeDatapointV1P99.g.cs @@ -0,0 +1,20 @@ + +#nullable enable + +namespace Baseten +{ + /// + /// 99th percentile request latency (milliseconds).
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + ///
+ public sealed partial class ResponseTimeDatapointV1P99 + { + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + } +} \ No newline at end of file diff --git a/src/libs/Baseten/openapi.yaml b/src/libs/Baseten/openapi.yaml index 5807b3c..0d248a5 100644 --- a/src/libs/Baseten/openapi.yaml +++ b/src/libs/Baseten/openapi.yaml @@ -4452,6 +4452,49 @@ } ] }, + "/v1/loops/deployments/{deployment_id}/metrics": { + "post": { + "summary": "Get metrics for a Loops trainer deployment.", + "x-codeSamples": [ + { + "lang": "bash", + "source": "curl --request POST \\\n--url https://api.baseten.co/v1/loops/deployments/{deployment_id}/metrics \\\n--header \"Authorization: Api-Key $BASETEN_API_KEY\" \\\n--data '{\n \"end_epoch_millis\": null,\n \"start_epoch_millis\": null\n}'" + }, + { + "lang": "python", + "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"\")\nurl = \"https://api.baseten.co/v1/loops/deployments/{deployment_id}/metrics\"\n\nheaders = {\"Authorization\": f\"Api-Key {API_KEY}\"}\n\nresponse = requests.request(\n \"POST\",\n url,\n headers=headers,\n json={'end_epoch_millis': None, 'start_epoch_millis': None}\n)\n\nprint(response.text)" + } + ], + "description": "Returns per-node GPU/CPU/memory utilization and Knative queue-proxy request rate / concurrency / latency for the trainer pods. The sampler half of a Loops deployment is an OracleVersion and uses the existing model-metrics endpoint.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetLoopsDeploymentMetricsRequestV1" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetLoopsDeploymentMetricsResponseV1" + } + } + } + } + } + }, + "parameters": [ + { + "$ref": "#/components/parameters/deployment_id" + } + ] + }, "/v1/training/capacity": { "get": { "summary": "Get training GPU capacity.", @@ -12396,6 +12439,311 @@ "title": "GetLoopsDeploymentResponseV1", "type": "object" }, + "GetLoopsDeploymentMetricsRequestV1": { + "description": "Time-range request for trainer deployment metrics.", + "properties": { + "end_epoch_millis": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Epoch millis to end fetching metrics.", + "title": "End Epoch Millis" + }, + "start_epoch_millis": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Epoch millis to start fetching metrics.", + "title": "Start Epoch Millis" + } + }, + "title": "GetLoopsDeploymentMetricsRequestV1", + "type": "object" + }, + "InferenceVolumeByStatusDatapointV1": { + "description": "Request rate split by HTTP response code class.", + "properties": { + "timestamp": { + "description": "ISO 8601 timestamp.", + "format": "date-time", + "title": "Timestamp", + "type": "string" + }, + "status_2xx": { + "description": "2xx requests per second.", + "title": "Status 2Xx", + "type": "number" + }, + "status_4xx": { + "description": "4xx requests per second.", + "title": "Status 4Xx", + "type": "number" + }, + "status_5xx": { + "description": "5xx requests per second.", + "title": "Status 5Xx", + "type": "number" + } + }, + "required": [ + "timestamp", + "status_2xx", + "status_4xx", + "status_5xx" + ], + "title": "InferenceVolumeByStatusDatapointV1", + "type": "object" + }, + "LoopsDeploymentMetricsV1": { + "description": "Metrics for a trainer (Loops) deployment.\n\nService-level fields summarize HTTP traffic into the trainer pods (the\nKnative queue-proxy is the source). Compute fields are the leader-pod\naggregate; ``per_node_metrics`` carries the full multinode breakdown.", + "properties": { + "inference_volume": { + "description": "Number of inference requests per unit time (requests per second).", + "items": { + "$ref": "#/components/schemas/TrainingJobMetricV1" + }, + "title": "Inference Volume", + "type": "array" + }, + "concurrent_requests": { + "description": "Number of in-progress concurrent inference requests. Source: the queue-proxy ``revision_queue_depth`` gauge on ``http-usermetric``.", + "items": { + "$ref": "#/components/schemas/TrainingJobMetricV1" + }, + "title": "Concurrent Requests", + "type": "array" + }, + "response_time_stats": { + "description": "Percentiles of the response time distribution.", + "items": { + "$ref": "#/components/schemas/ResponseTimeDatapointV1" + }, + "title": "Response Time Stats", + "type": "array" + }, + "inference_volume_by_status": { + "description": "Request rate split by response code class.", + "items": { + "$ref": "#/components/schemas/InferenceVolumeByStatusDatapointV1" + }, + "title": "Inference Volume By Status", + "type": "array" + }, + "gpu_memory_usage_bytes": { + "additionalProperties": { + "items": { + "$ref": "#/components/schemas/TrainingJobMetricV1" + }, + "type": "array" + }, + "description": "Leader-pod GPU memory bytes per GPU rank.", + "title": "Gpu Memory Usage Bytes", + "type": "object" + }, + "gpu_utilization": { + "additionalProperties": { + "items": { + "$ref": "#/components/schemas/TrainingJobMetricV1" + }, + "type": "array" + }, + "description": "Leader-pod fractional GPU utilization per GPU rank.", + "title": "Gpu Utilization", + "type": "object" + }, + "cpu_usage": { + "description": "Leader-pod CPU usage in cores.", + "items": { + "$ref": "#/components/schemas/TrainingJobMetricV1" + }, + "title": "Cpu Usage", + "type": "array" + }, + "cpu_memory_usage_bytes": { + "description": "Leader-pod CPU memory usage bytes.", + "items": { + "$ref": "#/components/schemas/TrainingJobMetricV1" + }, + "title": "Cpu Memory Usage Bytes", + "type": "array" + }, + "ephemeral_storage": { + "$ref": "#/components/schemas/StorageMetricsV1", + "description": "Leader-pod ephemeral storage usage." + }, + "per_node_metrics": { + "description": "Per-node compute breakdown for multinode trainer deployments.", + "items": { + "$ref": "#/components/schemas/LoopsDeploymentNodeMetricsV1" + }, + "title": "Per Node Metrics", + "type": "array" + } + }, + "required": [ + "inference_volume", + "concurrent_requests", + "response_time_stats", + "inference_volume_by_status", + "gpu_memory_usage_bytes", + "gpu_utilization", + "cpu_usage", + "cpu_memory_usage_bytes", + "ephemeral_storage", + "per_node_metrics" + ], + "title": "LoopsDeploymentMetricsV1", + "type": "object" + }, + "LoopsDeploymentNodeMetricsV1": { + "description": "Per-node compute metrics for a multinode trainer deployment.", + "properties": { + "node_id": { + "description": "Identifier for the node.", + "title": "Node Id", + "type": "string" + }, + "gpu_memory_usage_bytes": { + "additionalProperties": { + "items": { + "$ref": "#/components/schemas/TrainingJobMetricV1" + }, + "type": "array" + }, + "description": "GPU memory usage bytes per GPU rank.", + "title": "Gpu Memory Usage Bytes", + "type": "object" + }, + "gpu_utilization": { + "additionalProperties": { + "items": { + "$ref": "#/components/schemas/TrainingJobMetricV1" + }, + "type": "array" + }, + "description": "Fractional GPU utilization per GPU rank.", + "title": "Gpu Utilization", + "type": "object" + }, + "cpu_usage": { + "description": "CPU usage in cores.", + "items": { + "$ref": "#/components/schemas/TrainingJobMetricV1" + }, + "title": "Cpu Usage", + "type": "array" + }, + "cpu_memory_usage_bytes": { + "description": "CPU memory usage bytes.", + "items": { + "$ref": "#/components/schemas/TrainingJobMetricV1" + }, + "title": "Cpu Memory Usage Bytes", + "type": "array" + }, + "ephemeral_storage": { + "$ref": "#/components/schemas/StorageMetricsV1", + "description": "Ephemeral storage usage." + } + }, + "required": [ + "node_id", + "gpu_memory_usage_bytes", + "gpu_utilization", + "cpu_usage", + "cpu_memory_usage_bytes", + "ephemeral_storage" + ], + "title": "LoopsDeploymentNodeMetricsV1", + "type": "object" + }, + "ResponseTimeDatapointV1": { + "description": "Latency quantile datapoint.\n\nValues are reported in **milliseconds** to match the oracle/inference\n``response_time_stats`` convention. Source histogram is the queue-proxy's\n``revision_request_latencies_bucket`` whose bucket boundaries are in ms.", + "properties": { + "timestamp": { + "description": "ISO 8601 timestamp.", + "format": "date-time", + "title": "Timestamp", + "type": "string" + }, + "p50": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "default": null, + "description": "50th percentile request latency (milliseconds).", + "title": "P50" + }, + "p95": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "default": null, + "description": "95th percentile request latency (milliseconds).", + "title": "P95" + }, + "p99": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "default": null, + "description": "99th percentile request latency (milliseconds).", + "title": "P99" + } + }, + "required": [ + "timestamp" + ], + "title": "ResponseTimeDatapointV1", + "type": "object" + }, + "GetLoopsDeploymentMetricsResponseV1": { + "description": "Response for ``POST /v1/loops/deployments//metrics``.", + "properties": { + "deployment_id": { + "description": "The trainer deployment ID.", + "title": "Deployment Id", + "type": "string" + }, + "metrics": { + "$ref": "#/components/schemas/LoopsDeploymentMetricsV1", + "description": "Metrics for the deployment." + } + }, + "required": [ + "deployment_id", + "metrics" + ], + "title": "GetLoopsDeploymentMetricsResponseV1", + "type": "object" + }, "TrainingGpuCapacityItemV1": { "description": "GPU capacity and current usage for one GPU type.", "properties": {