From e9e5186930b55f872489c5e83c17e26f45cacddf Mon Sep 17 00:00:00 2001 From: Nick Felt Date: Sun, 24 Jan 2021 11:39:15 -0800 Subject: [PATCH 1/9] propagate --verbosity=debug to tensorboard-data-server --- tensorboard/data/server_ingester.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tensorboard/data/server_ingester.py b/tensorboard/data/server_ingester.py index 18664fef38..28341e9fee 100644 --- a/tensorboard/data/server_ingester.py +++ b/tensorboard/data/server_ingester.py @@ -86,6 +86,8 @@ def start(self): ] if logger.isEnabledFor(logging.INFO): args.append("--verbose") + if logger.isEnabledFor(logging.DEBUG): + args.append("--verbose") # Repeat arg to increase verbosity. logger.info("Spawning data server: %r", args) popen = subprocess.Popen(args, stdin=subprocess.PIPE) From a65c6327436726e54c49f45a50e4b555ebe2ee70 Mon Sep 17 00:00:00 2001 From: Nick Felt Date: Sun, 24 Jan 2021 16:09:18 -0800 Subject: [PATCH 2/9] log how long RunLoader.reload() takes and add Run field for that purpose --- tensorboard/data/server/logdir.rs | 2 +- tensorboard/data/server/run.rs | 28 ++++++++++++++++++---------- 2 files changed, 19 insertions(+), 11 deletions(-) diff --git a/tensorboard/data/server/logdir.rs b/tensorboard/data/server/logdir.rs index 10cab8e93e..dfac6fb760 100644 --- a/tensorboard/data/server/logdir.rs +++ b/tensorboard/data/server/logdir.rs @@ -214,7 +214,7 @@ impl<'a> LogdirLoader<'a> { // first relpath. relpath: event_files[0].run_relpath.clone(), loader: { - let mut loader = RunLoader::new(); + let mut loader = RunLoader::new(run_name.clone()); loader.checksum(checksum); loader }, diff --git a/tensorboard/data/server/run.rs b/tensorboard/data/server/run.rs index f3e07de4cf..5502ebf33a 100644 --- a/tensorboard/data/server/run.rs +++ b/tensorboard/data/server/run.rs @@ -15,19 +15,20 @@ limitations under the License. //! Loader for a single run, with one or more event files. -use log::warn; +use log::{debug, warn}; use std::collections::{BTreeMap, HashMap, HashSet}; use std::fs::File; use std::io::BufReader; use std::path::PathBuf; use std::sync::RwLock; +use std::time::Instant; use crate::commit; use crate::data_compat::{EventValue, GraphDefValue, SummaryValue, TaggedRunMetadataValue}; use crate::event_file::EventFileReader; use crate::proto::tensorboard as pb; use crate::reservoir::StageReservoir; -use crate::types::{Step, Tag, WallTime}; +use crate::types::{Run, Step, Tag, WallTime}; /// A loader to accumulate reservoir-sampled events in a single TensorBoard run. /// @@ -35,6 +36,10 @@ use crate::types::{Step, Tag, WallTime}; /// parameterized over a filesystem interface. #[derive(Debug)] pub struct RunLoader { + /// The run name associated with this loader. Used primarily for logging; the run name is + /// canonically defined by the map key under which this RunLoader is stored in LogdirLoader. + run: Run, + /// The earliest event `wall_time` seen in any event file in this run. /// /// This is `None` if and only if no events have been seen. Its value may decrease as new @@ -146,8 +151,9 @@ impl StageTimeSeries { } impl RunLoader { - pub fn new() -> Self { + pub fn new(run: Run) -> Self { Self { + run: run, start_time: None, files: BTreeMap::new(), time_series: HashMap::new(), @@ -171,9 +177,17 @@ impl RunLoader { /// /// If we need to access `run_data` but the lock is poisoned. pub fn reload(&mut self, filenames: Vec, run_data: &RwLock) { + let run_name = self.run.0.clone(); + debug!("Starting load for run {:?}", run_name); + let start = Instant::now(); self.update_file_set(filenames); self.reload_files(); self.commit_all(run_data); + debug!( + "Finished load for run {:?} ({:?})", + run_name, + start.elapsed() + ); } /// Updates the active key set of `self.files` to match the given filenames. @@ -329,12 +343,6 @@ fn read_event( } } -impl Default for RunLoader { - fn default() -> Self { - Self::new() - } -} - #[cfg(test)] mod test { use super::*; @@ -390,7 +398,7 @@ mod test { f1.into_inner()?.sync_all()?; f2.into_inner()?.sync_all()?; - let mut loader = RunLoader::new(); + let mut loader = RunLoader::new(run.clone()); let commit = Commit::new(); commit .runs From 5fac477c690be8a964930d1fb540004f7a0e4104 Mon Sep 17 00:00:00 2001 From: Nick Felt Date: Sun, 24 Jan 2021 16:25:24 -0800 Subject: [PATCH 3/9] refactor RunLoader to encapsulate data-staging fields to simplify reborrowing them in helpers --- tensorboard/data/server/run.rs | 65 ++++++++++++++++++++-------------- 1 file changed, 38 insertions(+), 27 deletions(-) diff --git a/tensorboard/data/server/run.rs b/tensorboard/data/server/run.rs index 5502ebf33a..d18f92052b 100644 --- a/tensorboard/data/server/run.rs +++ b/tensorboard/data/server/run.rs @@ -39,14 +39,6 @@ pub struct RunLoader { /// The run name associated with this loader. Used primarily for logging; the run name is /// canonically defined by the map key under which this RunLoader is stored in LogdirLoader. run: Run, - - /// The earliest event `wall_time` seen in any event file in this run. - /// - /// This is `None` if and only if no events have been seen. Its value may decrease as new - /// events are read, but in practice this is expected to be the wall time of the first - /// `file_version` event in the first event file. - start_time: Option, - /// The event files in this run. /// /// Event files are sorted and read lexicographically by name, which is designed to coincide @@ -55,11 +47,11 @@ pub struct RunLoader { /// be removed entirely. This way, we know not to just re-open it again at the next load cycle. files: BTreeMap>>, - /// Reservoir-sampled data and metadata for each time series. - time_series: HashMap, - /// Whether to compute CRCs for records before parsing as protos. checksum: bool, + + /// The data staged by this RunLoader. + data: RunLoaderData, } #[derive(Debug)] @@ -74,6 +66,20 @@ enum EventFile { Dead, } +/// Holds data staged by a RunLoader that will be commited to the Commit. +#[derive(Debug)] +struct RunLoaderData { + /// The earliest event `wall_time` seen in any event file in this run. + /// + /// This is `None` if and only if no events have been seen. Its value may decrease as new + /// events are read, but in practice this is expected to be the wall time of the first + /// `file_version` event in the first event file. + start_time: Option, + + /// Reservoir-sampled data and metadata for each time series. + time_series: HashMap, +} + #[derive(Debug)] struct StageTimeSeries { data_class: pb::DataClass, @@ -154,10 +160,12 @@ impl RunLoader { pub fn new(run: Run) -> Self { Self { run: run, - start_time: None, files: BTreeMap::new(), - time_series: HashMap::new(), checksum: true, + data: RunLoaderData { + start_time: None, + time_series: HashMap::new(), + }, } } @@ -248,15 +256,15 @@ impl RunLoader { break; } }; - read_event(&mut self.time_series, &mut self.start_time, event); + read_event(&mut self.data, event); } } } fn commit_all(&mut self, run_data: &RwLock) { let mut run = run_data.write().expect("acquiring tags lock"); - run.start_time = self.start_time; - for (tag, ts) in &mut self.time_series { + run.start_time = self.data.start_time; + for (tag, ts) in &mut self.data.time_series { ts.commit(tag, &mut *run); } } @@ -266,11 +274,7 @@ impl RunLoader { /// /// This is a standalone function because it's called from `reload_files` in a context that already /// has an exclusive reference into `self.files`, and so can't call methods on `&mut self`. -fn read_event( - time_series: &mut HashMap, - start_time: &mut Option, - e: pb::Event, -) { +fn read_event(data: &mut RunLoaderData, e: pb::Event) { let step = Step(e.step); let wall_time = match WallTime::new(e.wall_time) { None => { @@ -283,8 +287,12 @@ fn read_event( } Some(wt) => wt, }; - if start_time.map(|start| wall_time < start).unwrap_or(true) { - *start_time = Some(wall_time); + if data + .start_time + .map(|start| wall_time < start) + .unwrap_or(true) + { + (*data).start_time = Some(wall_time); } match e.what { Some(pb::event::What::GraphDef(graph_bytes)) => { @@ -293,7 +301,10 @@ fn read_event( payload: EventValue::GraphDef(GraphDefValue(graph_bytes)), }; use std::collections::hash_map::Entry; - let ts = match time_series.entry(Tag(GraphDefValue::TAG_NAME.to_string())) { + let ts = match data + .time_series + .entry(Tag(GraphDefValue::TAG_NAME.to_string())) + { Entry::Occupied(o) => o.into_mut(), Entry::Vacant(v) => { v.insert(StageTimeSeries::new(GraphDefValue::initial_metadata())) @@ -307,7 +318,7 @@ fn read_event( payload: EventValue::GraphDef(GraphDefValue(trm_proto.run_metadata)), }; use std::collections::hash_map::Entry; - let ts = match time_series.entry(Tag(trm_proto.tag)) { + let ts = match data.time_series.entry(Tag(trm_proto.tag)) { Entry::Occupied(o) => o.into_mut(), Entry::Vacant(v) => { let metadata = TaggedRunMetadataValue::initial_metadata(); @@ -324,7 +335,7 @@ fn read_event( }; use std::collections::hash_map::Entry; - let ts = match time_series.entry(Tag(summary_pb_value.tag)) { + let ts = match data.time_series.entry(Tag(summary_pb_value.tag)) { Entry::Occupied(o) => o.into_mut(), Entry::Vacant(v) => { let metadata = @@ -409,7 +420,7 @@ mod test { // Start time should be that of the file version event, even though that didn't correspond // to any time series. - assert_eq!(loader.start_time, Some(WallTime::new(1234.0).unwrap())); + assert_eq!(loader.data.start_time, Some(WallTime::new(1234.0).unwrap())); let runs = commit.runs.read().expect("read-locking runs map"); let run_data: &commit::RunData = &*runs From a30e5e41d49a14aa40e9e3dbd21dd4a0f7b3c74c Mon Sep 17 00:00:00 2001 From: Nick Felt Date: Sun, 24 Jan 2021 16:30:08 -0800 Subject: [PATCH 4/9] refactor commit_all() to be standalone function --- tensorboard/data/server/run.rs | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/tensorboard/data/server/run.rs b/tensorboard/data/server/run.rs index d18f92052b..701db6e2bb 100644 --- a/tensorboard/data/server/run.rs +++ b/tensorboard/data/server/run.rs @@ -190,7 +190,7 @@ impl RunLoader { let start = Instant::now(); self.update_file_set(filenames); self.reload_files(); - self.commit_all(run_data); + commit_all(&mut self.data, run_data); debug!( "Finished load for run {:?} ({:?})", run_name, @@ -260,13 +260,17 @@ impl RunLoader { } } } +} - fn commit_all(&mut self, run_data: &RwLock) { - let mut run = run_data.write().expect("acquiring tags lock"); - run.start_time = self.data.start_time; - for (tag, ts) in &mut self.data.time_series { - ts.commit(tag, &mut *run); - } +/// Commits all data staged in the run loader into the given run of the commit. +/// +/// This is a standalone function because it's called from `reload_files` in a context that already +/// has an exclusive reference into `self.files`, and so can't call methods on `&mut self`. +fn commit_all(run_loader_data: &mut RunLoaderData, run_data: &RwLock) { + let mut run = run_data.write().expect("acquiring tags lock"); + run.start_time = run_loader_data.start_time; + for (tag, ts) in &mut run_loader_data.time_series { + ts.commit(tag, &mut *run); } } From 14c1cfa62fc7f2d2de813f0be2c20ea4b764bbfd Mon Sep 17 00:00:00 2001 From: Nick Felt Date: Sun, 24 Jan 2021 16:31:24 -0800 Subject: [PATCH 5/9] refactor reload_files to parameterize how event is handled --- tensorboard/data/server/run.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tensorboard/data/server/run.rs b/tensorboard/data/server/run.rs index 701db6e2bb..6246936fd1 100644 --- a/tensorboard/data/server/run.rs +++ b/tensorboard/data/server/run.rs @@ -189,7 +189,7 @@ impl RunLoader { debug!("Starting load for run {:?}", run_name); let start = Instant::now(); self.update_file_set(filenames); - self.reload_files(); + self.reload_files(read_event); commit_all(&mut self.data, run_data); debug!( "Finished load for run {:?} ({:?})", @@ -235,8 +235,8 @@ impl RunLoader { } } - /// Reads data from all active event files. - fn reload_files(&mut self) { + /// Reads data from all active event files, and calls a handler for each event. + fn reload_files(&mut self, mut handle_event: F) { for (filename, ef) in self.files.iter_mut() { let reader = match ef { EventFile::Dead => continue, @@ -256,7 +256,7 @@ impl RunLoader { break; } }; - read_event(&mut self.data, event); + handle_event(&mut self.data, event); } } } From 106a0825913b19111aeda748de3a341695460811 Mon Sep 17 00:00:00 2001 From: Nick Felt Date: Sun, 24 Jan 2021 16:32:29 -0800 Subject: [PATCH 6/9] extend handle_event hook to commit every five seconds during run loading --- tensorboard/data/server/run.rs | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/tensorboard/data/server/run.rs b/tensorboard/data/server/run.rs index 6246936fd1..cac1ad8566 100644 --- a/tensorboard/data/server/run.rs +++ b/tensorboard/data/server/run.rs @@ -21,7 +21,7 @@ use std::fs::File; use std::io::BufReader; use std::path::PathBuf; use std::sync::RwLock; -use std::time::Instant; +use std::time::{Duration, Instant}; use crate::commit; use crate::data_compat::{EventValue, GraphDefValue, SummaryValue, TaggedRunMetadataValue}; @@ -156,6 +156,9 @@ impl StageTimeSeries { } } +/// Minimum time to wait between committing while a run is still loading. +const COMMIT_INTERVAL: Duration = Duration::from_secs(5); + impl RunLoader { pub fn new(run: Run) -> Self { Self { @@ -189,7 +192,23 @@ impl RunLoader { debug!("Starting load for run {:?}", run_name); let start = Instant::now(); self.update_file_set(filenames); - self.reload_files(read_event); + let mut n = 0; + let mut last_commit_time = Instant::now(); + self.reload_files(|run_loader_data, event| { + read_event(run_loader_data, event); + n += 1; + // Reduce overhead of checking elapsed time by only doing it every 100 events. + if n % 100 == 0 && last_commit_time.elapsed() >= COMMIT_INTERVAL { + debug!( + "Loaded {} events for run {:?} after {:?}", + n, + run_name, + start.elapsed() + ); + commit_all(run_loader_data, run_data); + last_commit_time = Instant::now(); + } + }); commit_all(&mut self.data, run_data); debug!( "Finished load for run {:?} ({:?})", From d149838bf27353f35f86b32d72d605d094ca3460 Mon Sep 17 00:00:00 2001 From: Nick Felt Date: Tue, 26 Jan 2021 19:33:25 -0800 Subject: [PATCH 7/9] cr: misc small fixes --- tensorboard/data/server/run.rs | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/tensorboard/data/server/run.rs b/tensorboard/data/server/run.rs index cac1ad8566..54fb897555 100644 --- a/tensorboard/data/server/run.rs +++ b/tensorboard/data/server/run.rs @@ -37,7 +37,7 @@ use crate::types::{Run, Step, Tag, WallTime}; #[derive(Debug)] pub struct RunLoader { /// The run name associated with this loader. Used primarily for logging; the run name is - /// canonically defined by the map key under which this RunLoader is stored in LogdirLoader. + /// canonically defined by the map key under which this `RunLoader` is stored in LogdirLoader. run: Run, /// The event files in this run. /// @@ -50,7 +50,7 @@ pub struct RunLoader { /// Whether to compute CRCs for records before parsing as protos. checksum: bool, - /// The data staged by this RunLoader. + /// The data staged by this `RunLoader`. data: RunLoaderData, } @@ -66,8 +66,8 @@ enum EventFile { Dead, } -/// Holds data staged by a RunLoader that will be commited to the Commit. -#[derive(Debug)] +/// Holds data staged by a `RunLoader` that will be committed to the `Commit`. +#[derive(Debug, Default)] struct RunLoaderData { /// The earliest event `wall_time` seen in any event file in this run. /// @@ -165,10 +165,7 @@ impl RunLoader { run: run, files: BTreeMap::new(), checksum: true, - data: RunLoaderData { - start_time: None, - time_series: HashMap::new(), - }, + data: RunLoaderData::default(), } } @@ -310,12 +307,8 @@ fn read_event(data: &mut RunLoaderData, e: pb::Event) { } Some(wt) => wt, }; - if data - .start_time - .map(|start| wall_time < start) - .unwrap_or(true) - { - (*data).start_time = Some(wall_time); + if data.start_time.map_or(true, |start| wall_time < start) { + data.start_time = Some(wall_time); } match e.what { Some(pb::event::What::GraphDef(graph_bytes)) => { From 69625de30cdb13da5100cecf2f30eddae00a664d Mon Sep 17 00:00:00 2001 From: Nick Felt Date: Tue, 26 Jan 2021 21:54:03 -0800 Subject: [PATCH 8/9] cr: convert commit_all() and read_event() to be methods on RunLoaderData --- tensorboard/data/server/run.rs | 154 ++++++++++++++++----------------- 1 file changed, 76 insertions(+), 78 deletions(-) diff --git a/tensorboard/data/server/run.rs b/tensorboard/data/server/run.rs index 54fb897555..0a8dbcd4d7 100644 --- a/tensorboard/data/server/run.rs +++ b/tensorboard/data/server/run.rs @@ -50,7 +50,9 @@ pub struct RunLoader { /// Whether to compute CRCs for records before parsing as protos. checksum: bool, - /// The data staged by this `RunLoader`. + /// The data staged by this `RunLoader`. This is encapsulated in a sub-struct so that these + /// fields can be reborrowed within `reload_files` in a context that already has an exclusive + /// reference into `self.files`, and hence can't call methods on the whole of `&mut self`. data: RunLoaderData, } @@ -192,7 +194,7 @@ impl RunLoader { let mut n = 0; let mut last_commit_time = Instant::now(); self.reload_files(|run_loader_data, event| { - read_event(run_loader_data, event); + run_loader_data.read_event(event); n += 1; // Reduce overhead of checking elapsed time by only doing it every 100 events. if n % 100 == 0 && last_commit_time.elapsed() >= COMMIT_INTERVAL { @@ -202,11 +204,11 @@ impl RunLoader { run_name, start.elapsed() ); - commit_all(run_loader_data, run_data); + run_loader_data.commit_all(run_data); last_commit_time = Instant::now(); } }); - commit_all(&mut self.data, run_data); + self.data.commit_all(run_data); debug!( "Finished load for run {:?} ({:?})", run_name, @@ -278,95 +280,91 @@ impl RunLoader { } } -/// Commits all data staged in the run loader into the given run of the commit. -/// -/// This is a standalone function because it's called from `reload_files` in a context that already -/// has an exclusive reference into `self.files`, and so can't call methods on `&mut self`. -fn commit_all(run_loader_data: &mut RunLoaderData, run_data: &RwLock) { - let mut run = run_data.write().expect("acquiring tags lock"); - run.start_time = run_loader_data.start_time; - for (tag, ts) in &mut run_loader_data.time_series { - ts.commit(tag, &mut *run); - } -} - -/// Reads a single event into the structures of a run loader. -/// -/// This is a standalone function because it's called from `reload_files` in a context that already -/// has an exclusive reference into `self.files`, and so can't call methods on `&mut self`. -fn read_event(data: &mut RunLoaderData, e: pb::Event) { - let step = Step(e.step); - let wall_time = match WallTime::new(e.wall_time) { - None => { - // TODO(@wchargin): Improve error handling. - warn!( - "Dropping event at step {} with invalid wall time {}", - e.step, e.wall_time - ); - return; +impl RunLoaderData { + /// Commits all staged data into the given run of the commit. + fn commit_all(&mut self, run_data: &RwLock) { + let mut run = run_data.write().expect("acquiring tags lock"); + run.start_time = self.start_time; + for (tag, ts) in &mut self.time_series { + ts.commit(tag, &mut *run); } - Some(wt) => wt, - }; - if data.start_time.map_or(true, |start| wall_time < start) { - data.start_time = Some(wall_time); } - match e.what { - Some(pb::event::What::GraphDef(graph_bytes)) => { - let sv = StageValue { - wall_time, - payload: EventValue::GraphDef(GraphDefValue(graph_bytes)), - }; - use std::collections::hash_map::Entry; - let ts = match data - .time_series - .entry(Tag(GraphDefValue::TAG_NAME.to_string())) - { - Entry::Occupied(o) => o.into_mut(), - Entry::Vacant(v) => { - v.insert(StageTimeSeries::new(GraphDefValue::initial_metadata())) - } - }; - ts.rsv.offer(step, sv); - } - Some(pb::event::What::TaggedRunMetadata(trm_proto)) => { - let sv = StageValue { - wall_time, - payload: EventValue::GraphDef(GraphDefValue(trm_proto.run_metadata)), - }; - use std::collections::hash_map::Entry; - let ts = match data.time_series.entry(Tag(trm_proto.tag)) { - Entry::Occupied(o) => o.into_mut(), - Entry::Vacant(v) => { - let metadata = TaggedRunMetadataValue::initial_metadata(); - v.insert(StageTimeSeries::new(metadata)) - } - }; - ts.rsv.offer(step, sv); + + /// Reads a single event and stages it for future committing. + fn read_event(&mut self, e: pb::Event) { + let step = Step(e.step); + let wall_time = match WallTime::new(e.wall_time) { + None => { + // TODO(@wchargin): Improve error handling. + warn!( + "Dropping event at step {} with invalid wall time {}", + e.step, e.wall_time + ); + return; + } + Some(wt) => wt, + }; + if self.start_time.map_or(true, |start| wall_time < start) { + self.start_time = Some(wall_time); } - Some(pb::event::What::Summary(sum)) => { - for mut summary_pb_value in sum.value { - let summary_value = match summary_pb_value.value { - None => continue, - Some(v) => SummaryValue(Box::new(v)), + match e.what { + Some(pb::event::What::GraphDef(graph_bytes)) => { + let sv = StageValue { + wall_time, + payload: EventValue::GraphDef(GraphDefValue(graph_bytes)), }; - use std::collections::hash_map::Entry; - let ts = match data.time_series.entry(Tag(summary_pb_value.tag)) { + let ts = match self + .time_series + .entry(Tag(GraphDefValue::TAG_NAME.to_string())) + { Entry::Occupied(o) => o.into_mut(), Entry::Vacant(v) => { - let metadata = - summary_value.initial_metadata(summary_pb_value.metadata.take()); - v.insert(StageTimeSeries::new(metadata)) + v.insert(StageTimeSeries::new(GraphDefValue::initial_metadata())) } }; + ts.rsv.offer(step, sv); + } + Some(pb::event::What::TaggedRunMetadata(trm_proto)) => { let sv = StageValue { wall_time, - payload: EventValue::Summary(summary_value), + payload: EventValue::GraphDef(GraphDefValue(trm_proto.run_metadata)), + }; + use std::collections::hash_map::Entry; + let ts = match self.time_series.entry(Tag(trm_proto.tag)) { + Entry::Occupied(o) => o.into_mut(), + Entry::Vacant(v) => { + let metadata = TaggedRunMetadataValue::initial_metadata(); + v.insert(StageTimeSeries::new(metadata)) + } }; ts.rsv.offer(step, sv); } + Some(pb::event::What::Summary(sum)) => { + for mut summary_pb_value in sum.value { + let summary_value = match summary_pb_value.value { + None => continue, + Some(v) => SummaryValue(Box::new(v)), + }; + + use std::collections::hash_map::Entry; + let ts = match self.time_series.entry(Tag(summary_pb_value.tag)) { + Entry::Occupied(o) => o.into_mut(), + Entry::Vacant(v) => { + let metadata = + summary_value.initial_metadata(summary_pb_value.metadata.take()); + v.insert(StageTimeSeries::new(metadata)) + } + }; + let sv = StageValue { + wall_time, + payload: EventValue::Summary(summary_value), + }; + ts.rsv.offer(step, sv); + } + } + _ => {} } - _ => {} } } From 30fae465063d80686ba44930c93430e62221e762 Mon Sep 17 00:00:00 2001 From: Nick Felt Date: Wed, 27 Jan 2021 11:49:48 -0800 Subject: [PATCH 9/9] cr: clippppppppyyyyyy --- tensorboard/data/server/run.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tensorboard/data/server/run.rs b/tensorboard/data/server/run.rs index 0a8dbcd4d7..db68bfa715 100644 --- a/tensorboard/data/server/run.rs +++ b/tensorboard/data/server/run.rs @@ -37,7 +37,7 @@ use crate::types::{Run, Step, Tag, WallTime}; #[derive(Debug)] pub struct RunLoader { /// The run name associated with this loader. Used primarily for logging; the run name is - /// canonically defined by the map key under which this `RunLoader` is stored in LogdirLoader. + /// canonically defined by the map key under which this `RunLoader` is stored in `LogdirLoader`. run: Run, /// The event files in this run. /// @@ -164,7 +164,7 @@ const COMMIT_INTERVAL: Duration = Duration::from_secs(5); impl RunLoader { pub fn new(run: Run) -> Self { Self { - run: run, + run, files: BTreeMap::new(), checksum: true, data: RunLoaderData::default(),