Skip to content

Commit 79b4a57

Browse files
authored
Proto changes to support experiment name & description. (#3234)
Proto changes to support experiment name & description.
1 parent 89711bd commit 79b4a57

File tree

2 files changed

+44
-6
lines changed

2 files changed

+44
-6
lines changed

tensorboard/uploader/proto/export_service.proto

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,10 @@ message StreamExperimentsRequest {
3131
int64 limit = 3;
3232
// Field mask for what experiment data to return via the `experiments` field
3333
// on the response. If not specified, this should be interpreted the same as
34-
// an empty message: i.e., only the experiment ID should be returned.
34+
// an empty message: i.e., only the experiment ID should be returned. Other
35+
// fields of `Experiment` will be populated if their corresponding bits in the
36+
// `ExperimentMask` are set. The server may choose to populate fields that are
37+
// not explicitly requested.
3538
ExperimentMask experiments_mask = 4;
3639
}
3740

@@ -71,7 +74,9 @@ message StreamExperimentsResponse {
7174
repeated Experiment experiments = 2;
7275
}
7376

74-
// Metadata about an experiment.
77+
// Metadata about an experiment. This contains both user provided metadata
78+
// along with internal book-keeping about the experiment.
79+
// TODO(bileschi): Move this and ExperimentMask into their own file.
7580
message Experiment {
7681
// Permanent ID of this experiment; e.g.: "AdYd1TgeTlaLWXx6I8JUbA".
7782
string experiment_id = 1;
@@ -87,12 +92,14 @@ message Experiment {
8792
// The number of distinct tag names in this experiment. A tag name that
8893
// appears in multiple runs will be counted only once.
8994
int64 num_tags = 6;
95+
// User provided name of the experiment.
96+
string name = 7;
97+
// User provided description of the experiment, in markdown source format.
98+
string description = 8;
9099
}
91100

92101
// Field mask for `Experiment`. The `experiment_id` field is always implicitly
93-
// considered to be requested. Other fields of `Experiment` will be populated
94-
// if their corresponding bits in the `ExperimentMask` are set. The server may
95-
// choose to populate fields that are not explicitly requested.
102+
// considered to be set.
96103
message ExperimentMask {
97104
reserved 1;
98105
reserved "experiment_id";
@@ -101,6 +108,8 @@ message ExperimentMask {
101108
bool num_scalars = 4;
102109
bool num_runs = 5;
103110
bool num_tags = 6;
111+
bool name = 7;
112+
bool description = 8;
104113
}
105114

106115
// Request to stream scalars from all the runs and tags in an experiment.

tensorboard/uploader/proto/write_service.proto

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ syntax = "proto3";
22

33
package tensorboard.service;
44

5+
// TODO(bileschi): write_service.proto imports export_service.proto for the
6+
// definition of Experiment and ExperimentMask. It would be better to excise
7+
// those into one file that both services depend on.
8+
import "tensorboard/uploader/proto/export_service.proto";
59
import "tensorboard/uploader/proto/scalar.proto";
610
import "tensorboard/compat/proto/summary.proto";
711

@@ -10,6 +14,9 @@ service TensorBoardWriterService {
1014
// Request for a new location to write TensorBoard readable events.
1115
rpc CreateExperiment(CreateExperimentRequest)
1216
returns (CreateExperimentResponse) {}
17+
// Request to mutate metadata associated with an experiment.
18+
rpc UpdateExperiment(UpdateExperimentRequest)
19+
returns (UpdateExperimentResponse) {}
1320
// Request that an experiment be deleted, along with all tags and scalars
1421
// that it contains. This call may only be made by the original owner of the
1522
// experiment.
@@ -29,7 +36,10 @@ service TensorBoardWriterService {
2936
// to request a URL, except. authorization of course, which doesn't
3037
// come within the proto.
3138
message CreateExperimentRequest {
32-
// This is empty on purpose.
39+
// User provided name of the experiment.
40+
string name = 1;
41+
// User provided description of the experiment, in markdown source format.
42+
string description = 2;
3343
}
3444

3545
// Carries all information necessary to:
@@ -44,6 +54,25 @@ message CreateExperimentResponse {
4454
string url = 2;
4555
}
4656

57+
// Request to change the metadata of one experiment.
58+
message UpdateExperimentRequest {
59+
// Description of the data to set. The experiment_id field must match
60+
// an experiment_id in the database. The remaining fields should be set
61+
// to the desired metadata to be written. Only those fields marked True
62+
// in the experiment_mask will be written. The service may deny
63+
// modification of some metadata used for internal bookkeeping, such as
64+
// num_scalars, etc.
65+
Experiment experiment = 1;
66+
// Field mask for what experiment data to set. The service may deny requests
67+
// to set some metatadata.
68+
ExperimentMask experiment_mask = 2;
69+
}
70+
71+
// Response for setting experiment metadata.
72+
message UpdateExperimentResponse {
73+
// This is empty on purpose.
74+
}
75+
4776
message DeleteExperimentRequest {
4877
// Service-wide unique identifier of an uploaded log dir.
4978
// eg: "1r9d0kQkh2laODSZcQXWP"

0 commit comments

Comments
 (0)