diff --git a/tensorboard/uploader/proto/export_service.proto b/tensorboard/uploader/proto/export_service.proto index a8dba432dc..ab98c60512 100644 --- a/tensorboard/uploader/proto/export_service.proto +++ b/tensorboard/uploader/proto/export_service.proto @@ -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; } @@ -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; @@ -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"; @@ -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. diff --git a/tensorboard/uploader/proto/write_service.proto b/tensorboard/uploader/proto/write_service.proto index 4d63f22f69..843a4a7ad5 100644 --- a/tensorboard/uploader/proto/write_service.proto +++ b/tensorboard/uploader/proto/write_service.proto @@ -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"; @@ -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. @@ -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: @@ -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"