Skip to content

Commit

Permalink
feat(vdp): return pipeline run stats (#351)
Browse files Browse the repository at this point in the history
Because

- We'd like to show some pipeline run statistic data, including
`number_of_runs` and `last_run_time`.

This commit

- Returns pipeline run stats.

---------

Co-authored-by: droplet-bot <[email protected]>
  • Loading branch information
donch1989 and droplet-bot authored May 31, 2024
1 parent e093231 commit cded1e5
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 1 deletion.
4 changes: 3 additions & 1 deletion artifact/artifact/v1alpha/artifact.proto
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ message KnowledgeBasesList {
// The list of knowledge bases.
repeated KnowledgeBase knowledge_bases = 1;
}

// CreateKnowledgeBaseRequest represents a request to create a knowledge base.
message CreateKnowledgeBaseRequest {
// The knowledge base name.
Expand All @@ -182,7 +183,7 @@ message CreateKnowledgeBaseResponse {
// Request message for ListKnowledgeBases
message ListKnowledgeBasesRequest {
// User ID for which to list the knowledge bases
string uid = 1;
string uid = 1;
}

// GetKnowledgeBasesResponse represents a response for getting all knowledge bases from users.
Expand All @@ -194,6 +195,7 @@ message ListKnowledgeBasesResponse {
// The status code.
int32 status_code = 3;
}

// UpdateKnowledgeBaseRequest represents a request to update a knowledge base.
message UpdateKnowledgeBaseRequest {
// The knowledge base identifier.
Expand Down
21 changes: 21 additions & 0 deletions openapiv2/vdp/service.swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -490,6 +490,9 @@ paths:
type: string
description: Tags.
readOnly: true
stats:
$ref: '#/definitions/PipelineStats'
description: Statistic data.
title: The pipeline fields that will replace the existing ones.
tags:
- Pipeline
Expand Down Expand Up @@ -1495,6 +1498,9 @@ paths:
type: string
description: Tags.
readOnly: true
stats:
$ref: '#/definitions/PipelineStats'
description: Statistic data.
title: The pipeline fields that will replace the existing ones.
tags:
- Pipeline
Expand Down Expand Up @@ -3166,6 +3172,18 @@ definitions:
description: |-
ValidateUserPipelineRequest represents a request to validate a pipeline
owned by a user.
PipelineStats:
type: object
properties:
number_of_runs:
type: integer
format: int32
description: Number of pipeline runs.
last_run_time:
type: string
format: date-time
description: Last run time.
title: Statistic data
SharingShareCode:
type: object
properties:
Expand Down Expand Up @@ -4396,6 +4414,9 @@ definitions:
type: string
description: Tags.
readOnly: true
stats:
$ref: '#/definitions/PipelineStats'
description: Statistic data.
description: |-
A Pipeline is an end-to-end workflow that automates a sequence of components
to process data.
Expand Down
10 changes: 10 additions & 0 deletions vdp/pipeline/v1beta/pipeline.proto
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,14 @@ message Pipeline {
VISIBILITY_PUBLIC = 2;
}

// Statistic data
message Stats {
// Number of pipeline runs.
int32 number_of_runs = 1;
// Last run time.
google.protobuf.Timestamp last_run_time = 2;
}

// The name of the pipeline, defined by its parent and ID.
// - Format: `{parent_type}/{parent.id}/pipelines/{pipeline.id}`.
string name = 1 [
Expand Down Expand Up @@ -143,6 +151,8 @@ message Pipeline {
DataSpecification data_specification = 24 [(google.api.field_behavior) = OUTPUT_ONLY];
// Tags.
repeated string tags = 25 [(google.api.field_behavior) = OUTPUT_ONLY];
// Statistic data.
Stats stats = 26;
}

// TriggerMetadata contains the traces of the pipeline inference.
Expand Down

0 comments on commit cded1e5

Please sign in to comment.