Repository navigation
Conversation
kevin9327
force-pushed
the
fix/dataset-inspector-config-fallback
branch
from
September 28, 2026 11:02
69b29b2 to
676c80b
Compare
When the requested --config is not present, the fallback used list(available_configs)[0] on a set, so the config chosen varied between runs and ignored whether that config had the requested split. Pick the lowest-sorted config that actually has the split instead.
kevin9327
force-pushed
the
fix/dataset-inspector-config-fallback
branch
from
October 4, 2026 22:08
676c80b to
291e8bd
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Symptom
Running the dataset inspector on a multi-config dataset gives a different answer every time, and sometimes just fails. Same command, five consecutive runs on
upstream/main(f3186ef):skills/huggingface-vision-trainer/scripts/dataset_inspector.pyis the same script and behaves the same way:This matters because the skill's documented workflow is "inspect the dataset, read the compatibility verdict, then train" (
SKILL.md: "Step 2: Validate dataset format (run dataset_inspector.py)"). The verdict is for whichever config the run happened to land on, and nothing in the output says the choice was arbitrary.Cause
available_configsis aset, and the fallback takeslist(...)[0]:Set iteration order for strings depends on per-process hash randomisation, so the "first available" config is a different one on each invocation. Two lines further down the same set is already printed with
sorted(available_configs), so the ordering problem is only in the selection.Separately, the fallback never checks whether the chosen config actually has the requested split. On
nyu-mll/gluetheaxconfig only has atestsplit, so when the draw landed there the run died with a 500 from the rows endpoint rather than inspecting anything.Fix
Track which configs carry the requested split and pick the lowest-sorted one, falling back to the previous "any config" behaviour when no config has that split. 5 added / 2 removed lines, applied identically to both copies of the script.
After
Ten runs, five per script, deterministic and landing on a config that actually has a
trainsplit:(Two of those ten runs hit an unrelated transient
read operation timed outfrom datasets-server; the config selection line wascolain every one of the ten.)Cases pinned — unchanged before and after
--dataset trl-lib/Capybara --split train(single config nameddefault)Config: defaultConfig: default--dataset nyu-mll/glue --config sst2 --split train(config given explicitly)Config: sst2Config: sst2--dataset rishitdagli/cppe-5 --split train(vision-trainer)Config: defaultConfig: default--dataset nyu-mll/glue --split nope(split exists in no config)None of these reach the changed branch except the last, which keeps the old "any available config" semantics.
Verification
Version bumped to
1.0.29and manifests regenerated perscripts/publish.sh; if that collides with another PR it is reproducible withuv run scripts/plugin_versions.py bump patch && ./scripts/publish.sh.