diff --git a/harness/determined/common/api/bindings.py b/harness/determined/common/api/bindings.py index 29f523ce2bf..77510c93fec 100644 --- a/harness/determined/common/api/bindings.py +++ b/harness/determined/common/api/bindings.py @@ -11534,6 +11534,7 @@ def __init__( notes: "typing.Sequence[v1Note]", numActiveExperiments: int, numExperiments: int, + numRuns: int, state: "v1WorkspaceState", userId: int, username: str, @@ -11551,6 +11552,7 @@ def __init__( self.notes = notes self.numActiveExperiments = numActiveExperiments self.numExperiments = numExperiments + self.numRuns = numRuns self.state = state self.userId = userId self.username = username @@ -11574,6 +11576,7 @@ def from_json(cls, obj: Json) -> "v1Project": "notes": [v1Note.from_json(x) for x in obj["notes"]], "numActiveExperiments": obj["numActiveExperiments"], "numExperiments": obj["numExperiments"], + "numRuns": obj["numRuns"], "state": v1WorkspaceState(obj["state"]), "userId": obj["userId"], "username": obj["username"], @@ -11598,6 +11601,7 @@ def to_json(self, omit_unset: bool = False) -> typing.Dict[str, typing.Any]: "notes": [x.to_json(omit_unset) for x in self.notes], "numActiveExperiments": self.numActiveExperiments, "numExperiments": self.numExperiments, + "numRuns": self.numRuns, "state": self.state.value, "userId": self.userId, "username": self.username, diff --git a/harness/tests/fixtures/project.json b/harness/tests/fixtures/project.json index 1581b5bbfd3..f647d46437a 100644 --- a/harness/tests/fixtures/project.json +++ b/harness/tests/fixtures/project.json @@ -24,6 +24,7 @@ "workspaceName":"", "state":"WORKSPACE_STATE_UNSPECIFIED", "errorMessage":"", - "key":"cap1" + "key":"cap1", + "numRuns":0 } } diff --git a/master/internal/project/postgres_project.go b/master/internal/project/postgres_project.go index 8fe27ca6002..bc97e2da100 100644 --- a/master/internal/project/postgres_project.go +++ b/master/internal/project/postgres_project.go @@ -67,6 +67,10 @@ func getProjectByIDTx(ctx context.Context, tx bun.Tx, projectID int) (*model.Pro "(SELECT COUNT(*) FROM experiments WHERE project_id = ?) AS num_experiments", projectID, ). + ColumnExpr( + "(SELECT COUNT(*) FROM runs WHERE project_id = ?) AS num_runs", + projectID, + ). ColumnExpr( "(SELECT COUNT(*) FROM experiments WHERE project_id = ? AND state = 'ACTIVE') AS num_active_experiments", projectID, diff --git a/master/pkg/model/project.go b/master/pkg/model/project.go index 3912d3c7758..e8f7b19343f 100644 --- a/master/pkg/model/project.go +++ b/master/pkg/model/project.go @@ -25,6 +25,7 @@ type Project struct { Notes []*projectv1.Note `bun:"notes,type:jsonb,nullzero"` NumActiveExperiments int32 `bun:"num_active_experiments,scanonly"` NumExperiments int32 `bun:"num_experiments,scanonly"` + NumRuns int32 `bun:"num_runs,scanonly"` State WorkspaceState `bun:"state,default:'UNSPECIFIED'::workspace_state"` ErrorMessage string `bun:"error_message"` LastExperimentStartedAt time.Time `bun:"last_experiment_started_at,scanonly"` @@ -53,6 +54,7 @@ func (p Project) Proto() *projectv1.Project { Description: p.Description, ErrorMessage: p.ErrorMessage, NumExperiments: p.NumExperiments, + NumRuns: p.NumRuns, NumActiveExperiments: p.NumActiveExperiments, Notes: p.Notes, LastExperimentStartedAt: lastExperimentStartedAt, diff --git a/master/static/srv/get_project.sql b/master/static/srv/get_project.sql index b1e2f3e2f16..c1b71fa1532 100644 --- a/master/static/srv/get_project.sql +++ b/master/static/srv/get_project.sql @@ -5,6 +5,11 @@ WITH pe AS ( MAX(start_time) AS last_experiment_started_at FROM experiments WHERE project_id = $1 +), pr AS ( + SELECT + COUNT(*) AS num_runs + FROM runs + WHERE project_id = $1 ) SELECT @@ -23,8 +28,9 @@ SELECT COALESCE(MAX(pe.last_experiment_started_at), NULL) AS last_experiment_started_at, u.username, p.user_id, - p.key -FROM pe, projects AS p + p.key, + MAX(pr.num_runs) AS num_runs +FROM pe, pr, projects AS p LEFT JOIN users AS u ON u.id = p.user_id LEFT JOIN workspaces AS w ON w.id = p.workspace_id WHERE p.id = $1 diff --git a/master/static/srv/get_workspace_projects.sql b/master/static/srv/get_workspace_projects.sql index cdf83d70b2c..22b2ce0f3b7 100644 --- a/master/static/srv/get_workspace_projects.sql +++ b/master/static/srv/get_workspace_projects.sql @@ -9,6 +9,7 @@ SELECT p.error_message, (w.archived OR p.archived) AS archived, SUM(CASE WHEN pe.project_id = p.id THEN 1 ELSE 0 END) AS num_experiments, + (SELECT COUNT(*) FROM runs r WHERE p.id = r.project_id) AS num_runs, SUM( CASE WHEN pe.project_id = p.id AND pe.state = 'ACTIVE' THEN 1 ELSE 0 END diff --git a/proto/pkg/projectv1/project.pb.go b/proto/pkg/projectv1/project.pb.go index c5c6215f303..877da73f66e 100644 --- a/proto/pkg/projectv1/project.pb.go +++ b/proto/pkg/projectv1/project.pb.go @@ -325,6 +325,8 @@ type Project struct { ErrorMessage string `protobuf:"bytes,15,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"` // The key of the project. Key string `protobuf:"bytes,16,opt,name=key,proto3" json:"key,omitempty"` + // Count of runs associated with this project. + NumRuns int32 `protobuf:"varint,17,opt,name=num_runs,json=numRuns,proto3" json:"num_runs,omitempty"` } func (x *Project) Reset() { @@ -471,6 +473,13 @@ func (x *Project) GetKey() string { return "" } +func (x *Project) GetNumRuns() int32 { + if x != nil { + return x.NumRuns + } + return 0 +} + // PatchProject is a partial update to a project with all optional fields. type PatchProject struct { state protoimpl.MessageState @@ -641,7 +650,7 @@ var file_determined_project_v1_project_proto_rawDesc = []byte{ 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x3a, 0x17, 0x92, 0x41, 0x14, 0x0a, 0x12, 0xd2, 0x01, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0xd2, 0x01, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x22, 0x93, 0x06, 0x0a, + 0x65, 0xd2, 0x01, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x22, 0xb9, 0x06, 0x0a, 0x07, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0x92, 0x41, 0x03, 0x80, 0x01, 0x01, 0x52, 0x04, @@ -681,63 +690,66 @@ var file_determined_project_v1_project_proto_rawDesc = []byte{ 0x6f, 0x72, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x10, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, - 0x3a, 0x9f, 0x01, 0x92, 0x41, 0x9b, 0x01, 0x0a, 0x98, 0x01, 0xd2, 0x01, 0x08, 0x61, 0x72, 0x63, - 0x68, 0x69, 0x76, 0x65, 0x64, 0xd2, 0x01, 0x0d, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x6d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0xd2, 0x01, 0x02, 0x69, 0x64, 0xd2, 0x01, 0x09, 0x69, 0x6d, 0x6d, - 0x75, 0x74, 0x61, 0x62, 0x6c, 0x65, 0xd2, 0x01, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0xd2, 0x01, 0x05, - 0x6e, 0x6f, 0x74, 0x65, 0x73, 0xd2, 0x01, 0x16, 0x6e, 0x75, 0x6d, 0x5f, 0x61, 0x63, 0x74, 0x69, - 0x76, 0x65, 0x5f, 0x65, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0xd2, 0x01, - 0x0f, 0x6e, 0x75, 0x6d, 0x5f, 0x65, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x73, - 0xd2, 0x01, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0xd2, 0x01, 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f, - 0x69, 0x64, 0xd2, 0x01, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0xd2, 0x01, 0x0c, - 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0xd2, 0x01, 0x03, 0x6b, - 0x65, 0x79, 0x22, 0xb0, 0x01, 0x0a, 0x0c, 0x50, 0x61, 0x74, 0x63, 0x68, 0x50, 0x72, 0x6f, 0x6a, - 0x65, 0x63, 0x74, 0x12, 0x30, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x3e, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, - 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2e, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x52, 0x03, 0x6b, 0x65, 0x79, 0x22, 0x77, 0x0a, 0x0c, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, - 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, - 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6d, 0x65, 0x74, - 0x72, 0x69, 0x63, 0x73, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x69, 0x6e, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, 0x03, 0x6d, 0x69, 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x61, - 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x52, 0x03, 0x6d, 0x61, 0x78, 0x3a, 0x20, 0x92, 0x41, - 0x1d, 0x0a, 0x1b, 0xd2, 0x01, 0x0c, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x5f, 0x6e, 0x61, - 0x6d, 0x65, 0xd2, 0x01, 0x03, 0x6d, 0x69, 0x6e, 0xd2, 0x01, 0x03, 0x6d, 0x61, 0x78, 0x2a, 0x88, - 0x02, 0x0a, 0x0c, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, - 0x1d, 0x0a, 0x19, 0x4c, 0x4f, 0x43, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54, 0x59, 0x50, 0x45, - 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1c, - 0x0a, 0x18, 0x4c, 0x4f, 0x43, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, - 0x45, 0x58, 0x50, 0x45, 0x52, 0x49, 0x4d, 0x45, 0x4e, 0x54, 0x10, 0x01, 0x12, 0x21, 0x0a, 0x1d, - 0x4c, 0x4f, 0x43, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x48, 0x59, - 0x50, 0x45, 0x52, 0x50, 0x41, 0x52, 0x41, 0x4d, 0x45, 0x54, 0x45, 0x52, 0x53, 0x10, 0x02, 0x12, - 0x1d, 0x0a, 0x19, 0x4c, 0x4f, 0x43, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54, 0x59, 0x50, 0x45, - 0x5f, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x53, 0x10, 0x03, 0x12, 0x1a, - 0x0a, 0x16, 0x4c, 0x4f, 0x43, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, - 0x54, 0x52, 0x41, 0x49, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x04, 0x12, 0x1f, 0x0a, 0x1b, 0x4c, 0x4f, - 0x43, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x43, 0x55, 0x53, 0x54, - 0x4f, 0x4d, 0x5f, 0x4d, 0x45, 0x54, 0x52, 0x49, 0x43, 0x10, 0x05, 0x12, 0x15, 0x0a, 0x11, 0x4c, - 0x4f, 0x43, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x52, 0x55, 0x4e, - 0x10, 0x06, 0x12, 0x25, 0x0a, 0x21, 0x4c, 0x4f, 0x43, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54, - 0x59, 0x50, 0x45, 0x5f, 0x52, 0x55, 0x4e, 0x5f, 0x48, 0x59, 0x50, 0x45, 0x52, 0x50, 0x41, 0x52, - 0x41, 0x4d, 0x45, 0x54, 0x45, 0x52, 0x53, 0x10, 0x07, 0x2a, 0x6d, 0x0a, 0x0a, 0x43, 0x6f, 0x6c, - 0x75, 0x6d, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1b, 0x0a, 0x17, 0x43, 0x4f, 0x4c, 0x55, 0x4d, + 0x12, 0x19, 0x0a, 0x08, 0x6e, 0x75, 0x6d, 0x5f, 0x72, 0x75, 0x6e, 0x73, 0x18, 0x11, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x07, 0x6e, 0x75, 0x6d, 0x52, 0x75, 0x6e, 0x73, 0x3a, 0xaa, 0x01, 0x92, 0x41, + 0xa6, 0x01, 0x0a, 0xa3, 0x01, 0xd2, 0x01, 0x08, 0x61, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x64, + 0xd2, 0x01, 0x0d, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0xd2, 0x01, 0x02, 0x69, 0x64, 0xd2, 0x01, 0x09, 0x69, 0x6d, 0x6d, 0x75, 0x74, 0x61, 0x62, 0x6c, + 0x65, 0xd2, 0x01, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0xd2, 0x01, 0x05, 0x6e, 0x6f, 0x74, 0x65, 0x73, + 0xd2, 0x01, 0x16, 0x6e, 0x75, 0x6d, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, + 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0xd2, 0x01, 0x0f, 0x6e, 0x75, 0x6d, 0x5f, + 0x65, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0xd2, 0x01, 0x08, 0x6e, 0x75, + 0x6d, 0x5f, 0x72, 0x75, 0x6e, 0x73, 0xd2, 0x01, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0xd2, 0x01, + 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0xd2, 0x01, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, + 0x61, 0x6d, 0x65, 0xd2, 0x01, 0x0c, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, + 0x69, 0x64, 0xd2, 0x01, 0x03, 0x6b, 0x65, 0x79, 0x22, 0xb0, 0x01, 0x0a, 0x0c, 0x50, 0x61, 0x74, + 0x63, 0x68, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x30, 0x0a, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, + 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x3e, 0x0a, 0x0b, 0x64, + 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0b, + 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2e, 0x0a, 0x03, 0x6b, + 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, + 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x22, 0x77, 0x0a, 0x0c, 0x4d, + 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x6d, + 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x10, + 0x0a, 0x03, 0x6d, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, 0x03, 0x6d, 0x69, 0x6e, + 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x61, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x52, 0x03, 0x6d, + 0x61, 0x78, 0x3a, 0x20, 0x92, 0x41, 0x1d, 0x0a, 0x1b, 0xd2, 0x01, 0x0c, 0x6d, 0x65, 0x74, 0x72, + 0x69, 0x63, 0x73, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0xd2, 0x01, 0x03, 0x6d, 0x69, 0x6e, 0xd2, 0x01, + 0x03, 0x6d, 0x61, 0x78, 0x2a, 0x88, 0x02, 0x0a, 0x0c, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1d, 0x0a, 0x19, 0x4c, 0x4f, 0x43, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, - 0x45, 0x44, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x43, 0x4f, 0x4c, 0x55, 0x4d, 0x4e, 0x5f, 0x54, - 0x59, 0x50, 0x45, 0x5f, 0x54, 0x45, 0x58, 0x54, 0x10, 0x01, 0x12, 0x16, 0x0a, 0x12, 0x43, 0x4f, - 0x4c, 0x55, 0x4d, 0x4e, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4e, 0x55, 0x4d, 0x42, 0x45, 0x52, - 0x10, 0x02, 0x12, 0x14, 0x0a, 0x10, 0x43, 0x4f, 0x4c, 0x55, 0x4d, 0x4e, 0x5f, 0x54, 0x59, 0x50, - 0x45, 0x5f, 0x44, 0x41, 0x54, 0x45, 0x10, 0x03, 0x42, 0x39, 0x5a, 0x37, 0x67, 0x69, 0x74, 0x68, - 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x64, 0x65, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x65, - 0x64, 0x2d, 0x61, 0x69, 0x2f, 0x64, 0x65, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x65, 0x64, 0x2f, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, - 0x74, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x45, 0x44, 0x10, 0x00, 0x12, 0x1c, 0x0a, 0x18, 0x4c, 0x4f, 0x43, 0x41, 0x54, 0x49, 0x4f, 0x4e, + 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x58, 0x50, 0x45, 0x52, 0x49, 0x4d, 0x45, 0x4e, 0x54, + 0x10, 0x01, 0x12, 0x21, 0x0a, 0x1d, 0x4c, 0x4f, 0x43, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54, + 0x59, 0x50, 0x45, 0x5f, 0x48, 0x59, 0x50, 0x45, 0x52, 0x50, 0x41, 0x52, 0x41, 0x4d, 0x45, 0x54, + 0x45, 0x52, 0x53, 0x10, 0x02, 0x12, 0x1d, 0x0a, 0x19, 0x4c, 0x4f, 0x43, 0x41, 0x54, 0x49, 0x4f, + 0x4e, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x41, 0x54, 0x49, 0x4f, + 0x4e, 0x53, 0x10, 0x03, 0x12, 0x1a, 0x0a, 0x16, 0x4c, 0x4f, 0x43, 0x41, 0x54, 0x49, 0x4f, 0x4e, + 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x54, 0x52, 0x41, 0x49, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x04, + 0x12, 0x1f, 0x0a, 0x1b, 0x4c, 0x4f, 0x43, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54, 0x59, 0x50, + 0x45, 0x5f, 0x43, 0x55, 0x53, 0x54, 0x4f, 0x4d, 0x5f, 0x4d, 0x45, 0x54, 0x52, 0x49, 0x43, 0x10, + 0x05, 0x12, 0x15, 0x0a, 0x11, 0x4c, 0x4f, 0x43, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54, 0x59, + 0x50, 0x45, 0x5f, 0x52, 0x55, 0x4e, 0x10, 0x06, 0x12, 0x25, 0x0a, 0x21, 0x4c, 0x4f, 0x43, 0x41, + 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x52, 0x55, 0x4e, 0x5f, 0x48, 0x59, + 0x50, 0x45, 0x52, 0x50, 0x41, 0x52, 0x41, 0x4d, 0x45, 0x54, 0x45, 0x52, 0x53, 0x10, 0x07, 0x2a, + 0x6d, 0x0a, 0x0a, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1b, 0x0a, + 0x17, 0x43, 0x4f, 0x4c, 0x55, 0x4d, 0x4e, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, + 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x43, 0x4f, + 0x4c, 0x55, 0x4d, 0x4e, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x54, 0x45, 0x58, 0x54, 0x10, 0x01, + 0x12, 0x16, 0x0a, 0x12, 0x43, 0x4f, 0x4c, 0x55, 0x4d, 0x4e, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, + 0x4e, 0x55, 0x4d, 0x42, 0x45, 0x52, 0x10, 0x02, 0x12, 0x14, 0x0a, 0x10, 0x43, 0x4f, 0x4c, 0x55, + 0x4d, 0x4e, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x44, 0x41, 0x54, 0x45, 0x10, 0x03, 0x42, 0x39, + 0x5a, 0x37, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x64, 0x65, 0x74, + 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x65, 0x64, 0x2d, 0x61, 0x69, 0x2f, 0x64, 0x65, 0x74, 0x65, 0x72, + 0x6d, 0x69, 0x6e, 0x65, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x70, 0x6b, 0x67, 0x2f, + 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, } var ( diff --git a/proto/src/determined/project/v1/project.proto b/proto/src/determined/project/v1/project.proto index 35cb1e821e6..36a06fabf83 100644 --- a/proto/src/determined/project/v1/project.proto +++ b/proto/src/determined/project/v1/project.proto @@ -80,6 +80,7 @@ message Project { "notes", "num_active_experiments", "num_experiments", + "num_runs", "state", "user_id", "username", @@ -122,6 +123,8 @@ message Project { string error_message = 15; // The key of the project. string key = 16; + // Count of runs associated with this project. + int32 num_runs = 17; } // PatchProject is a partial update to a project with all optional fields. diff --git a/webui/react/src/services/api-ts-sdk/api.ts b/webui/react/src/services/api-ts-sdk/api.ts index f724be74d6b..3281f6f2dad 100644 --- a/webui/react/src/services/api-ts-sdk/api.ts +++ b/webui/react/src/services/api-ts-sdk/api.ts @@ -8455,6 +8455,12 @@ export interface V1Project { * @memberof V1Project */ key: string; + /** + * Count of runs associated with this project. + * @type {number} + * @memberof V1Project + */ + numRuns: number; } /** * Project Column is a description of a column used on experiments in the project.