Skip to content

Commit 83bde95

Browse files
committed
uploader: add rpc method GetExperiment to ExporterService (#3614)
* Motivation for features / changes * In the experimental `ExperimentFromDev` class, support getting metadata including experiment name and description. * In the `ExperimentalFromDev.get_scalars()`, support progress indicaor. * Technical description of changes * Add non-streaming rpc method `GetExperiment()` to `ExporterService`. * Alternate designs / implementations considered * Add `Experiment` as a one-of response data type to `StreamExperimentDataResponse` * Con: In the current takeout paradigm, this leads to duplicate information. * Con: Wasteful when only the `Experiment` (metadata) is needed and all the scalars, tensor and blob sequences are not needed.
1 parent 4d70ca2 commit 83bde95

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

tensorboard/uploader/proto/export_service.proto

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ service TensorBoardExporterService {
1313
// Stream the experiment_id of all the experiments owned by the caller.
1414
rpc StreamExperiments(StreamExperimentsRequest)
1515
returns (stream StreamExperimentsResponse) {}
16+
// Get the metadata of an experiment, including the creation time, name,
17+
// description, counts of scalars, tensors and blob sequences, etc. See the
18+
// documentation string of `Experiment` for more details.
19+
rpc GetExperiment(GetExperimentRequest) returns (Experiment) {}
1620
// Stream scalars for all the runs and tags in an experiment.
1721
rpc StreamExperimentData(StreamExperimentDataRequest)
1822
returns (stream StreamExperimentDataResponse) {}
@@ -80,6 +84,19 @@ message StreamExperimentsResponse {
8084
repeated Experiment experiments = 2;
8185
}
8286

87+
// Request to get the metadata of an experiment.
88+
message GetExperimentRequest {
89+
// ID of the experiment to get.
90+
string experiment_id = 1;
91+
// Field mask for what experiment data to return via the `experiments` field
92+
// on the response. If not specified, this should be interpreted the same as
93+
// an empty message: i.e., only the experiment ID should be returned. Other
94+
// fields of `Experiment` will be populated if their corresponding bits in the
95+
// `ExperimentMask` are set. The server may choose to populate fields that are
96+
// not explicitly requested.
97+
ExperimentMask experiments_mask = 2;
98+
}
99+
83100
// Request to stream scalars from all the runs and tags in an experiment.
84101
message StreamExperimentDataRequest {
85102
// The permanent ID of the experiment whose data need to be streamed.

0 commit comments

Comments
 (0)