Skip to content

Commit cc30043

Browse files
authored
rust: create multi-file run loader (#4343)
Summary: This patch adds a `RunLoader` that reads from multiple event files within a single run. For now, it only keeps track of scalars, and it doesn’t do anything with the data that it reads. But it persists everything that we’ll need for the rest of the pipeline. Test Plan: Unit tests included: they create a test log directory and write some event files, then ensure that they can be read back properly. wchargin-branch: rust-run-loader
1 parent d7fc1ea commit cc30043

File tree

4 files changed

+374
-1
lines changed

4 files changed

+374
-1
lines changed

tensorboard/data/server/BUILD

+4
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ rust_library(
3131
"event_file.rs",
3232
"masked_crc.rs",
3333
"reservoir.rs",
34+
"run.rs",
3435
"scripted_reader.rs",
3536
"tf_record.rs",
3637
"types.rs",
@@ -50,6 +51,9 @@ rust_library(
5051
rust_test(
5152
name = "rustboard_core_test",
5253
crate = ":rustboard_core",
54+
deps = [
55+
"//third_party/rust:tempfile",
56+
],
5357
)
5458

5559
rust_doc_test(

tensorboard/data/server/data_compat.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ limitations under the License.
1818
use crate::proto::tensorboard as pb;
1919
use pb::{summary::value::Value, summary_metadata::PluginData};
2020

21-
const SCALARS_PLUGIN_NAME: &str = "scalars";
21+
pub(crate) const SCALARS_PLUGIN_NAME: &str = "scalars";
2222

2323
/// Determines the metadata for a time series given its first event.
2424
///

tensorboard/data/server/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ pub mod data_compat;
1919
pub mod event_file;
2020
pub mod masked_crc;
2121
pub mod reservoir;
22+
pub mod run;
2223
pub mod tf_record;
2324
pub mod types;
2425

0 commit comments

Comments
 (0)