diff --git a/frontend/src/client/core/OpenAPI.ts b/frontend/src/client/core/OpenAPI.ts index 74f92b4..106f4d8 100644 --- a/frontend/src/client/core/OpenAPI.ts +++ b/frontend/src/client/core/OpenAPI.ts @@ -48,7 +48,7 @@ export const OpenAPI: OpenAPIConfig = { PASSWORD: undefined, TOKEN: undefined, USERNAME: undefined, - VERSION: '0.1.0', + VERSION: '0.1.4', WITH_CREDENTIALS: false, interceptors: { request: new Interceptors(), diff --git a/frontend/src/client/schemas.gen.ts b/frontend/src/client/schemas.gen.ts index 64ea629..93974ba 100644 --- a/frontend/src/client/schemas.gen.ts +++ b/frontend/src/client/schemas.gen.ts @@ -1359,6 +1359,11 @@ export const HealthSummarySchema = { }, type: 'object', title: 'Loop Lag' + }, + version: { + type: 'string', + title: 'Version', + default: '' } }, type: 'object', @@ -1832,6 +1837,20 @@ export const NodeDef_InputSchema = { } ], description: "What one execution of this node holds while it runs. Absent — the default — means it is not accounted for and shares the engine's workers, which is right for everything that is not compute-heavy." + }, + code_files: { + additionalProperties: { + type: 'string' + }, + type: 'object', + title: 'Code Files', + description: "The project modules this node's function reaches, dotted name to the file on the machine that synced it. Written by `fluksio sync`, which is the only side that can import the code and see what it imports. Empty for a node drawn on the canvas." + }, + code_digest: { + type: 'string', + title: 'Code Digest', + description: 'What those modules hashed to at sync. The engine hashes them again when a run is claimed, and falls back to this when it cannot see the files — a worker on another machine.', + default: '' } }, type: 'object', @@ -1938,6 +1957,20 @@ export const NodeDef_OutputSchema = { } ], description: "What one execution of this node holds while it runs. Absent — the default — means it is not accounted for and shares the engine's workers, which is right for everything that is not compute-heavy." + }, + code_files: { + additionalProperties: { + type: 'string' + }, + type: 'object', + title: 'Code Files', + description: "The project modules this node's function reaches, dotted name to the file on the machine that synced it. Written by `fluksio sync`, which is the only side that can import the code and see what it imports. Empty for a node drawn on the canvas." + }, + code_digest: { + type: 'string', + title: 'Code Digest', + description: 'What those modules hashed to at sync. The engine hashes them again when a run is claimed, and falls back to this when it cannot see the files — a worker on another machine.', + default: '' } }, type: 'object', diff --git a/frontend/src/client/sdk.gen.ts b/frontend/src/client/sdk.gen.ts index 105c39a..89bf192 100644 --- a/frontend/src/client/sdk.gen.ts +++ b/frontend/src/client/sdk.gen.ts @@ -3,7 +3,7 @@ import type { CancelablePromise } from './core/CancelablePromise'; import { OpenAPI } from './core/OpenAPI'; import { request as __request } from './core/request'; -import type { AlertsReadAlertsConfigResponse, AlertsSaveAlertsConfigData, AlertsSaveAlertsConfigResponse, AlertsTestChannelData, AlertsTestChannelResponse, ArtifactsPutArtifactData, ArtifactsPutArtifactResponse, ArtifactsGetArtifactData, ArtifactsGetArtifactResponse, CloudReadStatusResponse, CloudEnrollData, CloudEnrollResponse, CloudAddRemoteUserData, CloudAddRemoteUserResponse, CloudDisconnectResponse, DashboardsReadDashboardsResponse, DashboardsReadDashboardData, DashboardsReadDashboardResponse, DashboardsCreateDashboardData, DashboardsCreateDashboardResponse, DashboardsSaveDashboardData, DashboardsSaveDashboardResponse, DashboardsDeleteDashboardData, DashboardsDeleteDashboardResponse, DashboardsGenerateResultsDashboardData, DashboardsGenerateResultsDashboardResponse, DashboardsPublishDashboardData, DashboardsPublishDashboardResponse, DashboardsDiscardDashboardDraftData, DashboardsDiscardDashboardDraftResponse, DashboardsRenameDashboardData, DashboardsRenameDashboardResponse, FlavorsReadFlavorsResponse, FlavorsCreateFlavorData, FlavorsCreateFlavorResponse, FlavorsUpdateFlavorData, FlavorsUpdateFlavorResponse, FlavorsDeleteFlavorData, FlavorsDeleteFlavorResponse, FlowsReadFlowsResponse, FlowsReadNodeTypesResponse, FlowsReadGraphResponse, FlowsReadLibraryResponse, FlowsDeleteSharedNodeData, FlowsDeleteSharedNodeResponse, FlowsReadFlowData, FlowsReadFlowResponse, FlowsSaveFlowData, FlowsSaveFlowResponse, FlowsDeleteFlowData, FlowsDeleteFlowResponse, FlowsPublishFlowData, FlowsPublishFlowResponse, FlowsDiscardDraftData, FlowsDiscardDraftResponse, FlowsRenameFlowData, FlowsRenameFlowResponse, FlowsReadNodeSourceData, FlowsReadNodeSourceResponse, FlowsSaveNodeSourceData, FlowsSaveNodeSourceResponse, FlowsShareNodeData, FlowsShareNodeResponse, FlowsUnshareNodeData, FlowsUnshareNodeResponse, FlowsStartFlowData, FlowsStartFlowResponse, FlowsStopFlowData, FlowsStopFlowResponse, FlowsPauseFlowData, FlowsPauseFlowResponse, FlowsResumeFlowData, FlowsResumeFlowResponse, FlowsStepFlowData, FlowsStepFlowResponse, FlowsValidateFlowData, FlowsValidateFlowResponse, FlowsRunFlowData, FlowsRunFlowResponse, FlowsTriggerNodeData, FlowsTriggerNodeResponse, FlowsCancelNodeData, FlowsCancelNodeResponse, FlowsAcknowledgeNodeErrorData, FlowsAcknowledgeNodeErrorResponse, FlowsReadFlowStateData, FlowsReadFlowStateResponse, FlowsReadMessageHistoryData, FlowsReadMessageHistoryResponse, LoginLoginAccessTokenData, LoginLoginAccessTokenResponse, LoginTestTokenResponse, LoginRecoverPasswordData, LoginRecoverPasswordResponse, LoginResetPasswordData, LoginResetPasswordResponse, LoginRecoverPasswordHtmlContentData, LoginRecoverPasswordHtmlContentResponse, MessagesReadMessagesResponse, MessagesPublishMessageData, MessagesPublishMessageResponse, MessagesReadMessageHistoryData, MessagesReadMessageHistoryResponse, ModulesReadModulesResponse, ModulesApplyModulesData, ModulesApplyModulesResponse, ModulesRefreshModulesResponse, OauthRegisterClientData, OauthRegisterClientResponse, OauthAuthorizeValidateData, OauthAuthorizeValidateResponse, OauthAuthorizeData, OauthAuthorizeResponse, OauthTokenData, OauthTokenResponse, OauthReadClientsResponse, OauthRevokeClientData, OauthRevokeClientResponse, ObservabilityReadSummaryResponse, ObservabilityReadTimeseriesData, ObservabilityReadTimeseriesResponse, ObservabilityReadFlowRollupsData, ObservabilityReadFlowRollupsResponse, ObservabilityReadRunsData, ObservabilityReadRunsResponse, ObservabilityReadEventsData, ObservabilityReadEventsResponse, ObservabilityReadDeadLettersData, ObservabilityReadDeadLettersResponse, PanelsReadPanelsResponse, PanelsSavePanelsData, PanelsSavePanelsResponse, PanelsStartPairingResponse, PanelsPollPairingData, PanelsPollPairingResponse, PanelsPendingDeviceData, PanelsPendingDeviceResponse, PanelsApprovePairingData, PanelsApprovePairingResponse, PanelsUnpairPanelData, PanelsUnpairPanelResponse, PanelsReadPanelData, PanelsReadPanelResponse, PrivateCreateUserData, PrivateCreateUserResponse, RunsCreateRunData, RunsCreateRunResponse, RunsCreateSweepData, RunsCreateSweepResponse, RunsReadRunsData, RunsReadRunsResponse, RunsReadOverviewResponse, RunsReadRunData, RunsReadRunResponse, RunsCancelRunData, RunsCancelRunResponse, RunsReadMetricsData, RunsReadMetricsResponse, RunsCompareMetricData, RunsCompareMetricResponse, SecretsReadSecretsResponse, SecretsSaveSecretData, SecretsSaveSecretResponse, SecretsDeleteSecretData, SecretsDeleteSecretResponse, UsersReadUsersData, UsersReadUsersResponse, UsersCreateUserData, UsersCreateUserResponse, UsersReadUserMeResponse, UsersDeleteUserMeResponse, UsersUpdateUserMeData, UsersUpdateUserMeResponse, UsersUpdatePasswordMeData, UsersUpdatePasswordMeResponse, UsersRegisterUserData, UsersRegisterUserResponse, UsersReadUserByIdData, UsersReadUserByIdResponse, UsersUpdateUserData, UsersUpdateUserResponse, UsersDeleteUserData, UsersDeleteUserResponse, UtilsTestEmailData, UtilsTestEmailResponse, UtilsHealthCheckResponse, UtilsHealthResponse, WorkersReadWorkersResponse, WorkersReadResourcesResponse, WorkersIssueTokenData, WorkersIssueTokenResponse, WorkersReadRuntimeResponse } from './types.gen'; +import type { AlertsReadAlertsConfigResponse, AlertsSaveAlertsConfigData, AlertsSaveAlertsConfigResponse, AlertsTestChannelData, AlertsTestChannelResponse, ArtifactsPutArtifactData, ArtifactsPutArtifactResponse, ArtifactsGetArtifactData, ArtifactsGetArtifactResponse, CloudReadStatusResponse, CloudEnrollData, CloudEnrollResponse, CloudAddRemoteUserData, CloudAddRemoteUserResponse, CloudDisconnectResponse, DashboardsReadDashboardsResponse, DashboardsReadDashboardData, DashboardsReadDashboardResponse, DashboardsCreateDashboardData, DashboardsCreateDashboardResponse, DashboardsSaveDashboardData, DashboardsSaveDashboardResponse, DashboardsDeleteDashboardData, DashboardsDeleteDashboardResponse, DashboardsGenerateResultsDashboardData, DashboardsGenerateResultsDashboardResponse, DashboardsPublishDashboardData, DashboardsPublishDashboardResponse, DashboardsDiscardDashboardDraftData, DashboardsDiscardDashboardDraftResponse, DashboardsRenameDashboardData, DashboardsRenameDashboardResponse, FlavorsReadFlavorsResponse, FlavorsCreateFlavorData, FlavorsCreateFlavorResponse, FlavorsUpdateFlavorData, FlavorsUpdateFlavorResponse, FlavorsDeleteFlavorData, FlavorsDeleteFlavorResponse, FlowsReadFlowsResponse, FlowsReadNodeTypesResponse, FlowsReadGraphResponse, FlowsReadLibraryResponse, FlowsDeleteSharedNodeData, FlowsDeleteSharedNodeResponse, FlowsReadFlowData, FlowsReadFlowResponse, FlowsSaveFlowData, FlowsSaveFlowResponse, FlowsDeleteFlowData, FlowsDeleteFlowResponse, FlowsPublishFlowData, FlowsPublishFlowResponse, FlowsDiscardDraftData, FlowsDiscardDraftResponse, FlowsRenameFlowData, FlowsRenameFlowResponse, FlowsReadNodeSourceData, FlowsReadNodeSourceResponse, FlowsSaveNodeSourceData, FlowsSaveNodeSourceResponse, FlowsShareNodeData, FlowsShareNodeResponse, FlowsUnshareNodeData, FlowsUnshareNodeResponse, FlowsStartFlowData, FlowsStartFlowResponse, FlowsStopFlowData, FlowsStopFlowResponse, FlowsPauseFlowData, FlowsPauseFlowResponse, FlowsResumeFlowData, FlowsResumeFlowResponse, FlowsStepFlowData, FlowsStepFlowResponse, FlowsValidateFlowData, FlowsValidateFlowResponse, FlowsRunFlowData, FlowsRunFlowResponse, FlowsTriggerNodeData, FlowsTriggerNodeResponse, FlowsCancelNodeData, FlowsCancelNodeResponse, FlowsAcknowledgeNodeErrorData, FlowsAcknowledgeNodeErrorResponse, FlowsReadFlowStateData, FlowsReadFlowStateResponse, FlowsReadMessageHistoryData, FlowsReadMessageHistoryResponse, LoginLoginAccessTokenData, LoginLoginAccessTokenResponse, LoginTestTokenResponse, LoginRecoverPasswordData, LoginRecoverPasswordResponse, LoginResetPasswordData, LoginResetPasswordResponse, LoginRecoverPasswordHtmlContentData, LoginRecoverPasswordHtmlContentResponse, MessagesReadMessagesResponse, MessagesPublishMessageData, MessagesPublishMessageResponse, MessagesReadMessageHistoryData, MessagesReadMessageHistoryResponse, ModulesReadModulesResponse, ModulesApplyModulesData, ModulesApplyModulesResponse, ModulesRefreshModulesResponse, OauthRegisterClientData, OauthRegisterClientResponse, OauthAuthorizeValidateData, OauthAuthorizeValidateResponse, OauthAuthorizeData, OauthAuthorizeResponse, OauthTokenData, OauthTokenResponse, OauthReadClientsResponse, OauthRevokeClientData, OauthRevokeClientResponse, ObservabilityReadSummaryResponse, ObservabilityReadTimeseriesData, ObservabilityReadTimeseriesResponse, ObservabilityReadFlowRollupsData, ObservabilityReadFlowRollupsResponse, ObservabilityReadRunsData, ObservabilityReadRunsResponse, ObservabilityReadEventsData, ObservabilityReadEventsResponse, ObservabilityReadDeadLettersData, ObservabilityReadDeadLettersResponse, PanelsReadPanelsResponse, PanelsSavePanelsData, PanelsSavePanelsResponse, PanelsStartPairingResponse, PanelsPollPairingData, PanelsPollPairingResponse, PanelsPendingDeviceData, PanelsPendingDeviceResponse, PanelsApprovePairingData, PanelsApprovePairingResponse, PanelsUnpairPanelData, PanelsUnpairPanelResponse, PanelsReadPanelData, PanelsReadPanelResponse, PrivateCreateUserData, PrivateCreateUserResponse, RunsCreateRunData, RunsCreateRunResponse, RunsCreateSweepData, RunsCreateSweepResponse, RunsReadRunsData, RunsReadRunsResponse, RunsReadOverviewResponse, RunsExportMetricsData, RunsExportMetricsResponse, RunsExportRunsData, RunsExportRunsResponse, RunsReadRunData, RunsReadRunResponse, RunsCancelRunData, RunsCancelRunResponse, RunsReadMetricsData, RunsReadMetricsResponse, RunsCompareMetricData, RunsCompareMetricResponse, SecretsReadSecretsResponse, SecretsSaveSecretData, SecretsSaveSecretResponse, SecretsDeleteSecretData, SecretsDeleteSecretResponse, UsersReadUsersData, UsersReadUsersResponse, UsersCreateUserData, UsersCreateUserResponse, UsersReadUserMeResponse, UsersDeleteUserMeResponse, UsersUpdateUserMeData, UsersUpdateUserMeResponse, UsersUpdatePasswordMeData, UsersUpdatePasswordMeResponse, UsersRegisterUserData, UsersRegisterUserResponse, UsersReadUserByIdData, UsersReadUserByIdResponse, UsersUpdateUserData, UsersUpdateUserResponse, UsersDeleteUserData, UsersDeleteUserResponse, UtilsTestEmailData, UtilsTestEmailResponse, UtilsHealthCheckResponse, UtilsHealthResponse, WorkersReadWorkersResponse, WorkersReadResourcesResponse, WorkersIssueTokenData, WorkersIssueTokenResponse, WorkersReadRuntimeResponse } from './types.gen'; export class AlertsService { /** @@ -1076,7 +1076,7 @@ export class FlowsService { * The recent values of one message, for plotting. * * ``message`` may be given bare or qualified; a message that never carried a - * number comes back with an empty series. + * number or a flag comes back with an empty series. * @param data The data for the request. * @param data.name * @param data.message @@ -1238,7 +1238,7 @@ export class MessagesService { /** * Read Message History - * The series behind a chart. Numbers only — nothing else plots. + * The series behind a chart. Numbers and flags — nothing else plots. * @param data The data for the request. * @param data.name * @returns MessagePoints Successful Response @@ -1873,11 +1873,19 @@ export class RunsService { /** * Read Runs * Runs, newest first. The queryable table an experiment log needs. + * + * ``before`` is the cursor a long history is paged by: rows are newest + * first, so handing back the last row's ``created_at`` reads the next page + * whatever landed meanwhile — which ``offset`` cannot, since a run submitted + * between two pages shifts every row down one. ``since`` bounds the other + * end and is inclusive. * @param data The data for the request. * @param data.flow * @param data.status * @param data.group * @param data.digest + * @param data.since + * @param data.before * @param data.limit * @param data.offset * @returns fluksio__api__routes__runs__RunRow Successful Response @@ -1892,6 +1900,8 @@ export class RunsService { status: data.status, group: data.group, digest: data.digest, + since: data.since, + before: data.before, limit: data.limit, offset: data.offset }, @@ -1917,6 +1927,94 @@ export class RunsService { }); } + /** + * Export Metrics + * Every selected run's series as one long table: run, name, step, ts, value. + * + * The tidy shape a plotting library takes without reshaping. ``name`` keeps + * the metrics it lists; ``stride`` thins each curve — per series, so asking + * for every tenth point of two metrics gives every tenth point of both. + * @param data The data for the request. + * @param data.flow + * @param data.status + * @param data.group + * @param data.ids + * @param data.since + * @param data.until + * @param data.name + * @param data.stride + * @param data.format + * @returns unknown Successful Response + * @throws ApiError + */ + public static exportMetrics(data: RunsExportMetricsData = {}): CancelablePromise { + return __request(OpenAPI, { + method: 'GET', + url: '/api/v1/runs/export/metrics', + query: { + flow: data.flow, + status: data.status, + group: data.group, + ids: data.ids, + since: data.since, + until: data.until, + name: data.name, + stride: data.stride, + format: data.format + }, + errors: { + 422: 'Validation Error' + } + }); + } + + /** + * Export Runs + * One row per run: what it was given, what it scored, what code it ran. + * + * The arm-comparison table. Inputs are columns rather than one JSON blob — + * by default the ones that vary across the selection, which is the sweep + * axis; ``params`` names them instead. ``metrics`` narrows the final numbers + * to a few of a run's declared outputs. + * + * Both take dotted paths into a record a node returned: + * ``metrics=final_metrics.train_loss,test_metrics.known.perfect`` selects + * three fields rather than two blobs, and the defaults reach the same + * depth. + * @param data The data for the request. + * @param data.flow + * @param data.status + * @param data.group + * @param data.ids + * @param data.since + * @param data.until + * @param data.params + * @param data.metrics + * @param data.format + * @returns unknown Successful Response + * @throws ApiError + */ + public static exportRuns(data: RunsExportRunsData = {}): CancelablePromise { + return __request(OpenAPI, { + method: 'GET', + url: '/api/v1/runs/export/runs', + query: { + flow: data.flow, + status: data.status, + group: data.group, + ids: data.ids, + since: data.since, + until: data.until, + params: data.params, + metrics: data.metrics, + format: data.format + }, + errors: { + 422: 'Validation Error' + } + }); + } + /** * Read Run * One run in full: what it was asked, what each node did, what it made. diff --git a/frontend/src/client/types.gen.ts b/frontend/src/client/types.gen.ts index c11f714..2069fc4 100644 --- a/frontend/src/client/types.gen.ts +++ b/frontend/src/client/types.gen.ts @@ -499,6 +499,7 @@ export type HealthSummary = { loop_lag: { [key: string]: (number); }; + version?: string; }; /** @@ -680,6 +681,16 @@ export type NodeDef_Input = { * What one execution of this node holds while it runs. Absent — the default — means it is not accounted for and shares the engine's workers, which is right for everything that is not compute-heavy. */ resources?: (Resources | null); + /** + * The project modules this node's function reaches, dotted name to the file on the machine that synced it. Written by `fluksio sync`, which is the only side that can import the code and see what it imports. Empty for a node drawn on the canvas. + */ + code_files?: { + [key: string]: (string); + }; + /** + * What those modules hashed to at sync. The engine hashes them again when a run is claimed, and falls back to this when it cannot see the files — a worker on another machine. + */ + code_digest?: string; }; /** @@ -724,6 +735,16 @@ export type NodeDef_Output = { * What one execution of this node holds while it runs. Absent — the default — means it is not accounted for and shares the engine's workers, which is right for everything that is not compute-heavy. */ resources?: (Resources | null); + /** + * The project modules this node's function reaches, dotted name to the file on the machine that synced it. Written by `fluksio sync`, which is the only side that can import the code and see what it imports. Empty for a node drawn on the canvas. + */ + code_files?: { + [key: string]: (string); + }; + /** + * What those modules hashed to at sync. The engine hashes them again when a run is claimed, and falls back to this when it cannot see the files — a worker on another machine. + */ + code_digest?: string; }; /** @@ -1739,11 +1760,13 @@ export type RunsCreateSweepData = { export type RunsCreateSweepResponse = (Array); export type RunsReadRunsData = { + before?: (string | null); digest?: (string | null); flow?: (string | null); group?: (string | null); limit?: number; offset?: number; + since?: (string | null); status?: (string | null); }; @@ -1751,6 +1774,34 @@ export type RunsReadRunsResponse = (Array); export type RunsReadOverviewResponse = (Array); +export type RunsExportMetricsData = { + flow?: (string | null); + format?: 'csv' | 'jsonl'; + group?: (string | null); + ids?: string; + name?: string; + since?: (string | null); + status?: (string | null); + stride?: number; + until?: (string | null); +}; + +export type RunsExportMetricsResponse = (unknown); + +export type RunsExportRunsData = { + flow?: (string | null); + format?: 'csv' | 'jsonl'; + group?: (string | null); + ids?: string; + metrics?: string; + params?: string; + since?: (string | null); + status?: (string | null); + until?: (string | null); +}; + +export type RunsExportRunsResponse = (unknown); + export type RunsReadRunData = { runId: string; };