Skip to content

Fix NumPy array value error in MetaDataset.init_seq_order#1825

Merged
albertz merged 1 commit into
masterfrom
fix-numpy-array-value-error
May 23, 2026
Merged

Fix NumPy array value error in MetaDataset.init_seq_order#1825
albertz merged 1 commit into
masterfrom
fix-numpy-array-value-error

Conversation

@Stefanwuu

Copy link
Copy Markdown
Contributor

When configuring a dataset with multiple loading or post-processing workers (num_data_loading_workers > 1), self._current_seq_order gets distributed as a NumPy array containing sequence indices.

In MetaDataset.init_seq_order, evaluating not self._current_seq_order attempts to resolve the truth value of a multi-element array, which is ambiguous in NumPy and throws a runtime ValueError. This causes the background loader processes to crash.

The current solution is tested.

@Stefanwuu Stefanwuu requested review from a team and albertz as code owners May 22, 2026 15:29
@albertz albertz merged commit 0cbee37 into master May 23, 2026
65 checks passed
@albertz albertz deleted the fix-numpy-array-value-error branch May 23, 2026 21:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants