Skip to content

Conversation

@wchargin
Copy link
Contributor

@wchargin wchargin commented Mar 9, 2021

Summary:
The --samples-per-plugin argument now understands inputs like
scalars=100,images=all. This indicates that some reservoirs should
have unbounded capacity.

Reservoir constructors take impl Into<Capacity> so that passing a bare
usize is still valid, enjoying all the concision of dynamic typing
alongside the safety of sound static analysis.

Test Plan:
Due to #4752, passing --samples_per_plugin=scalars=0 to TensorBoard
does not actually work, with or without --load_fast. But unit tests
have decent coverage, and manual end-to-end tests against a live data
server show that it really does return lots of data.

wchargin-branch: rust-unbounded-reservoir

Summary:
The `--samples-per-plugin` argument now understands inputs like
`scalars=100,images=all`. This indicates that some reservoirs should
have unbounded capacity.

Reservoir constructors take `impl Into<Capacity>` so that passing a bare
`usize` is still valid, enjoying all the concision of dynamic typing
alongside the safety of sound static analysis.

Test Plan:
Due to #4752, passing `--samples_per_plugin=scalars=0` to TensorBoard
does not actually work, with or without `--load_fast`. But unit tests
have decent coverage, and manual end-to-end tests against a live data
server show that it really does return lots of data.

wchargin-branch: rust-unbounded-reservoir
wchargin-source: 80bee32ce1f8db3c8249435eda75d4d65c973d28
@wchargin wchargin added the core:rustboard //tensorboard/data/server/... label Mar 9, 2021
@google-cla google-cla bot added the cla: yes label Mar 9, 2021
@wchargin wchargin requested a review from psybuzz March 9, 2021 05:37
wchargin added 2 commits March 8, 2021 22:34
wchargin-branch: rust-unbounded-reservoir
wchargin-source: 0dfc407eb057a0dcf6a53093a987f38c25f92b62
wchargin-branch: rust-unbounded-reservoir
wchargin-source: 0dfc407eb057a0dcf6a53093a987f38c25f92b62
Copy link
Contributor

@psybuzz psybuzz left a comment

Choose a reason for hiding this comment

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

Looks good! It's neat to see a real example of using impl Trait in the argument position: pub fn new(capacity: impl Into<Capacity>)

@wchargin wchargin merged commit 1782f7a into master Mar 9, 2021
@wchargin wchargin deleted the wchargin-rust-unbounded-reservoir branch March 9, 2021 21:05
@wchargin wchargin mentioned this pull request Mar 15, 2021
34 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: yes core:rustboard //tensorboard/data/server/...

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants