Skip to content

Support singleton datasets in shuffled epoch resampling - #1759

Open
VishnuR23 wants to merge 1 commit into
NVIDIA-BioNeMo:mainfrom
VishnuR23:fix/singleton-dataset-resampling
Open

VishnuR23 wants to merge 1 commit into
NVIDIA-BioNeMo:mainfrom
VishnuR23:fix/singleton-dataset-resampling

Conversation

@VishnuR23

Copy link
Copy Markdown

Description

MultiEpochDatasetResampler defaults to shuffle=True, but fetching any item from a one-record dataset raises ValueError because permute requires a length greater than one. This affects the default single epoch as well as explicit num_epochs and num_samples settings.

Use the identity permutation for singleton datasets, preserving the epoch index for epoch-dependent transforms. Keep the existing permutation path for larger datasets and regenerate the enforced Eden/phage copies.

Type of changes

  • Bug fix

Validation

  • Three shuffled-singleton regression cases fail on main.
  • All seven CPU cases pass after the fix: default/explicit epoch/sample counts with shuffle enabled and disabled, bounds checks, and deterministic complete permutations for larger datasets.
  • All applicable pre-commit hooks pass.
  • Full GPU recipe suites were not run locally.

Signed-off-by: VishnuR23 <vishnurajeev2345@gmail.com>
@copy-pr-bot

copy-pr-bot Bot commented Sep 21, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@coderabbitai

coderabbitai Bot commented Sep 21, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository: NVIDIA-BioNeMo/bionemo-recipes/.coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: a3a41cef-1414-4be6-bbfa-72f21def4cae

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Comment @coderabbitai help to get the list of available commands.

This branch has not been deployed

No deployments
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.

1 participant