Skip to content

Commit 84fdc8d

Browse files
committed
Update the testing pipeline to fix potential memory overflow issues when testing on large-scale datasets.
1 parent 7e11859 commit 84fdc8d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

basicts/runners/base_tsf_runner.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -519,7 +519,7 @@ def on_test_end(self, save_metrics: bool = False):
519519
self.logger.info(f'Test results saved to {os.path.join(self.ckpt_save_dir, "test_results")}.')
520520
if save_metrics:
521521
self.logger.info(f'Test metrics saved to {os.path.join(self.ckpt_save_dir, "test_metrics.json")}.')
522-
522+
523523
@master_only
524524
def _save_test_results(self, batch_idx: int, batch_data: Dict[str, np.ndarray]) -> None:
525525

@@ -536,7 +536,7 @@ def _save_test_results(self, batch_idx: int, batch_data: Dict[str, np.ndarray])
536536
"""
537537

538538
total_samples = len(self.test_data_loader.dataset)
539-
539+
540540
save_dir = os.path.join(self.ckpt_save_dir, 'test_results')
541541
os.makedirs(save_dir, exist_ok=True)
542542
inputs_path = os.path.join(save_dir, 'inputs.npy')

0 commit comments

Comments
 (0)