Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 14 additions & 5 deletions tensorboard/uploader/proto/export_service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@ message StreamExperimentsRequest {
int64 limit = 3;
// Field mask for what experiment data to return via the `experiments` field
// on the response. If not specified, this should be interpreted the same as
// an empty message: i.e., only the experiment ID should be returned.
// an empty message: i.e., only the experiment ID should be returned. Other
// fields of `Experiment` will be populated if their corresponding bits in the
// `ExperimentMask` are set. The server may choose to populate fields that are
// not explicitly requested.
ExperimentMask experiments_mask = 4;
}

Expand Down Expand Up @@ -71,7 +74,9 @@ message StreamExperimentsResponse {
repeated Experiment experiments = 2;
}

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

// Field mask for `Experiment`. The `experiment_id` field is always implicitly
// considered to be requested. Other fields of `Experiment` will be populated
// if their corresponding bits in the `ExperimentMask` are set. The server may
// choose to populate fields that are not explicitly requested.
// considered to be set.
message ExperimentMask {
reserved 1;
reserved "experiment_id";
Expand All @@ -101,6 +108,8 @@ message ExperimentMask {
bool num_scalars = 4;
bool num_runs = 5;
bool num_tags = 6;
bool name = 7;
bool description = 8;
}

// Request to stream scalars from all the runs and tags in an experiment.
Expand Down
31 changes: 30 additions & 1 deletion tensorboard/uploader/proto/write_service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ syntax = "proto3";

package tensorboard.service;

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

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

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

// Request to change the metadata of one experiment.
message UpdateExperimentRequest {
// Description of the data to set. The experiment_id field must match
// an experiment_id in the database. The remaining fields should be set
// to the desired metadata to be written. Only those fields marked True
// in the experiment_mask will be written. The service may deny
// modification of some metadata used for internal bookkeeping, such as
// num_scalars, etc.
Experiment experiment = 1;
// Field mask for what experiment data to set. The service may deny requests
// to set some metatadata.
ExperimentMask experiment_mask = 2;
}

// Response for setting experiment metadata.
message UpdateExperimentResponse {
// This is empty on purpose.
}

message DeleteExperimentRequest {
// Service-wide unique identifier of an uploaded log dir.
// eg: "1r9d0kQkh2laODSZcQXWP"
Expand Down