Skip to content

Conversation

@bileschi
Copy link
Collaborator

@bileschi bileschi commented Feb 7, 2020

  • Motivation for features / changes
    Support for experiment name & description in TensorBoard.dev

  • Technical description of changes
    Extends proto service adding:
    SetExperimentName and SetExperimentDescription
    Extends uploader to read those fields during export

  • Screenshots of UI changes
    OSS product users should see no chnage.

  • Detailed steps to verify changes work correctly (as executed by you)
    bazel test tensorboard:all in a virtual env

Copy link
Contributor

@wchargin wchargin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bazel test tensorboard:all in a virtual env

Note that this only runs top-level tests; to easily run all non-frontend
tests, you can invoke:

bazel test //tensorboard/... --test_tag_filters=-webtest --build_tests_only

}

// Request to change the name of one experiment.
message SetExperimentNameRequest{
Copy link
Contributor

@wchargin wchargin Feb 7, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider combining these into one RPC, with a fieldmask? Like:

message UpdateExperimentMetadataRequest {
  Experiment updates = 1;
  ExperimentMask update_mask = 2;
}

message ExperimentMask {
  reserved 1 to 6;
  reserved "experiment_id", "create_time", "update_time", "num_scalars",
      "num_runs", "num_tags";
  bool name = 7;
  bool description = 8;
}

(edited to fix ExperimentMetadataMask to ExperimentMask—thanks,
@davidsoergel)

It seems common that the client will want to set both the name and
description at once, and doing so via two RPC roundtrips and two
database transactions (can’t parallelize because of contention) seems
wasteful.

Note that Google standard is to call the method UpdateFoo (not
SetFoo; this aligns with HTTP verbs), and to just pass the object as
both the request and the response.


// Request to change the name of one experiment.
message SetExperimentNameRequest{
// Permanent ID of this experiment. Should match the id in the request.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does “should match the ID in the request” mean? This is the
request.

}

// Request to change the name of one experiment.
message SetExperimentNameRequest{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Could you run clang-format on this file, please? (We don’t have a
hard lint check for it in OSS because we change these files
infrequently, but I can add one.)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Done in #3228.)

Comment on lines +412 to +413
("Name", experiment.name),
("Description", experiment.description),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you do make this change, please change the name.ljust(10) padding
below such that Description doesn’t abut into the next column.

int64 num_tags = 6;
// User provided name of the experiment.
string name = 7;
// User provided desription of the experiment, in markdown source format.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sp.: s/desription/description/

wchargin and others added 3 commits February 7, 2020 12:33
Summary:
We keep our protos formatted with `clang-format`, but hitherto have not
enforced this, inviting regressions. This commit adds a CI lint check.

Test Plan:
Verified that this fails on CI before the `custom_scalars/layout.proto`
fix, and passes afterward.

wchargin-branch: ci-clang-format-proto
This unblocks the sync which failed because of the strict_deps violation.

- tensorboard/webapp/webapp_data_source/tb_server_data_source_module.ts 
  had extraneous import statement.
- tb_http_client_testing.ts had missing import on BUILD.
ExperimentMetadataMask update_mask = 2;
}

message ExperimentMetadataMask {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Naming nit: ExperimentMetadataMask does not have an obviously different meaning from ExperimentMask. How about ExperimentUpdateMask?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or UpdateExperimentMask, etc.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, thank you—it should be ExperimentMask. (Vestige of earlier draft
of comment.)

Copy link
Contributor

@wchargin wchargin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change has build and test errors. Could you please fix the build,
run the tests, and re-request review once that’s done?

@bileschi
Copy link
Collaborator Author

Cancelling this as it got cobbed up in a merge

@wchargin
Copy link
Contributor

Cancelling this as it got cobbed up in a merge

Okay—for future reference, it’s nice to try to keep these in the same
pull request, as it preserves review state, review comments, internal
cross-references and triggers, etc. If you can’t figure out how to get
the Git graph to be tidy in exactly the way that you want, you can fall
back to force-pushing:

git push --force-with-lease origin HEAD:exp_name_proto

It’s not quite as nice in the GitHub UI, but it’s still much nicer than
having an entirely separate PR.

(In this case, now that you’ve opened #3234, we might as well just use
that.)

@bileschi
Copy link
Collaborator Author

Thanks! Yeah, sorry I was spinning my wheels on getting the graph to only include the change of interest and so I decided to cut my losses and move the change manually. I'll try this more civilized fix next time.

@bileschi bileschi deleted the exp_name_proto branch February 12, 2020 16:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants