From 8e206d4636dbcfd5d70fbf83757bd2069a50b72e Mon Sep 17 00:00:00 2001 From: Andrew White Date: Mon, 27 Jul 2026 20:47:15 -0500 Subject: [PATCH] fix: invalid split leaves selection variable undefined --- dust3r/datasets/blendedmvs.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dust3r/datasets/blendedmvs.py b/dust3r/datasets/blendedmvs.py index 93e68c2..344bfe2 100644 --- a/dust3r/datasets/blendedmvs.py +++ b/dust3r/datasets/blendedmvs.py @@ -26,12 +26,14 @@ def _load_data(self, split): pairs = np.load(osp.join(self.ROOT, 'blendedmvs_pairs.npy')) if split is None: selection = slice(None) - if split == 'train': + elif split == 'train': # select 90% of all scenes selection = (pairs['seq_low'] % 10) > 0 - if split == 'val': + elif split == 'val': # select 10% of all scenes selection = (pairs['seq_low'] % 10) == 0 + else: + raise ValueError(f'bad {split=}') self.pairs = pairs[selection] # list of all scenes