Skip to content

fix(triviaqa): update dataset loading path to use correct repository - #1104

Open
cris96spa wants to merge 1 commit into
NVIDIA-NeMo:mainfrom
cris96spa:fix/triviaqa-hf-dataset-id
Open

fix(triviaqa): update dataset loading path to use correct repository#1104
cris96spa wants to merge 1 commit into
NVIDIA-NeMo:mainfrom
cris96spa:fix/triviaqa-hf-dataset-id

Conversation

@cris96spa

@cris96spa cris96spa commented Jul 9, 2026

Copy link
Copy Markdown

Summary

Fix TriviaQA dataset loading by switching from the legacy dataset identifier to the current namespaced Hugging Face repository ID.

Problem

The loader currently uses load_dataset("trivia_qa", ...). Hugging Face Hub now enforces namespace/name repository IDs, so this fails with repository ID validation errors.

Change

  • Update dataset ID from trivia_qa to mandarjoshi/trivia_qa.

Impact

  • Restores TriviaQA data loading without changing evaluator semantics.
  • Keeps existing seeding and verification behavior intact.

Validation

  • Verified dataset streaming and row access using mandarjoshi/trivia_qa.
  • Verified expected fields remain compatible with current loader logic.
  • Run standard checks:
    • make test
    • make lint

Summary by CodeRabbit

  • Bug Fixes
    • Updated TriviaQA benchmark loading to use a more reliable dataset source, helping ensure the benchmark loads correctly.

@copy-pr-bot

copy-pr-bot Bot commented Jul 9, 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 Jul 9, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The Hugging Face dataset identifier used in TriviaQA loading is changed from trivia_qa to mandarjoshi/trivia_qa, retaining the same configuration and split. No other logic or public interfaces are altered.

Changes

TriviaQA loader update

Layer / File(s) Summary
Update dataset source identifier
src/nemo_evaluator/benchmarks/triviaqa.py
_load_triviaqa() now loads from mandarjoshi/trivia_qa instead of trivia_qa, keeping the rc.nocontext config and validation split unchanged.

Estimated code review effort: 1 (Trivial) | ~2 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main change: updating TriviaQA dataset loading to the correct repository path.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@cris96spa cris96spa changed the title # PR: Fix TriviaQA dataset ID for Hugging Face loading fix(triviaqa): update dataset loading path to use correct repository Jul 9, 2026
Signed-off-by: Cristian Spagnuolo <cristian.spagnuolo@artificialy.com>
@cris96spa
cris96spa force-pushed the fix/triviaqa-hf-dataset-id branch from acc5cac to 88e99a7 Compare July 9, 2026 15:43

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/nemo_evaluator/benchmarks/triviaqa.py`:
- Line 33: Pin the TriviaQA dataset load in triviaqa.py for reproducibility by
adding a fixed revision to the load_dataset call in the benchmark setup. Update
the ds assignment in the TriviaQA evaluator so the dataset source is tied to a
specific revision hash rather than the floating default, keeping future runs
stable even if mandarjoshi/trivia_qa changes upstream.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Enterprise

Run ID: ac7b846e-da00-4fbe-a793-816641beaad2

📥 Commits

Reviewing files that changed from the base of the PR and between a668af9 and 88e99a7.

📒 Files selected for processing (1)
  • src/nemo_evaluator/benchmarks/triviaqa.py

from datasets import load_dataset

ds = load_dataset("trivia_qa", "rc.nocontext", split="validation")
ds = load_dataset("mandarjoshi/trivia_qa", "rc.nocontext", split="validation")

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🗄️ Data Integrity & Integration | 🔵 Trivial | ⚡ Quick win

Consider pinning a dataset revision for reproducibility.

Without a pinned revision, future upstream changes to mandarjoshi/trivia_qa (re-uploads, config renames) could silently change eval results between runs.

♻️ Pin a revision hash
-    ds = load_dataset("mandarjoshi/trivia_qa", "rc.nocontext", split="validation")
+    ds = load_dataset("mandarjoshi/trivia_qa", "rc.nocontext", split="validation", revision="<commit_hash>")
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/nemo_evaluator/benchmarks/triviaqa.py` at line 33, Pin the TriviaQA
dataset load in triviaqa.py for reproducibility by adding a fixed revision to
the load_dataset call in the benchmark setup. Update the ds assignment in the
TriviaQA evaluator so the dataset source is tied to a specific revision hash
rather than the floating default, keeping future runs stable even if
mandarjoshi/trivia_qa changes upstream.

@cris96spa

Copy link
Copy Markdown
Author

Closes #1111

@svcnvidia-nemo-ci svcnvidia-nemo-ci added the waiting-on-maintainers Waiting on maintainers to respond label Jul 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community-request waiting-on-maintainers Waiting on maintainers to respond

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants