Skip to content

Commit 93b6a2d

Browse files
committed
fix: update logging messages for clarity and consistency in ForwardPass and ForwardPassStrategy
1 parent e97de91 commit 93b6a2d

3 files changed

Lines changed: 8 additions & 5 deletions

File tree

‎sup3r/pipeline/forward_pass.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,7 @@ def run(cls, strategy, node_index):
448448
"""
449449
if not strategy.node_finished(node_index):
450450
logger.info(
451-
'Starting forward pass on node %s with %s chunks using %s '
451+
'Starting forward pass on node %s with %s chunk(s) using %s '
452452
'execution.',
453453
node_index,
454454
len(strategy.node_chunks[node_index]),
@@ -517,7 +517,7 @@ def _run_serial(cls, strategy, node_index):
517517
raise MemoryError(msg)
518518

519519
logger.info(
520-
'Finished forward passes on %s chunks in %s',
520+
'Finished forward pass(es) on %s chunk(s) in %s',
521521
len(strategy.node_chunks[node_index]),
522522
dt.now() - start,
523523
)

‎sup3r/pipeline/strategy.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -468,7 +468,7 @@ def preflight(self):
468468
non_masked = self.fwp_slicer.n_spatial_chunks - sum(self.fwp_mask)
469469
non_masked *= self.fwp_slicer.n_time_chunks
470470
logger.info(
471-
'Chunk strategy uses %s nodes across %s total chunks '
471+
'Chunk strategy uses %s node(s) across %s chunk(s): '
472472
'(%s spatial x %s temporal, %s unmasked).',
473473
len(self.node_chunks),
474474
self.fwp_slicer.n_chunks,

‎sup3r/preprocessing/samplers/base.py‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,12 +191,15 @@ def preflight(self):
191191
'building batches with n_samples = batch_size, each with '
192192
'n_time_steps = sample_shape[2].'
193193
)
194-
if self.data.shape[2] < self.sample_shape[2] * self.batch_size:
194+
if (
195+
self.data.shape[2] < self.sample_shape[2] * self.batch_size
196+
and self.data.shape[2] > 1
197+
):
195198
logger.warning(msg)
196199
warn(msg)
197200

198201
if self.mode == 'eager':
199-
logger.info('Received mode = "eager".')
202+
logger.debug('Received mode = "eager".')
200203
_ = self.compute()
201204

202205
def check_proxy_obs_consistency(self):

0 commit comments

Comments
 (0)