Repository navigation
Fix DataAnalyzer.run_map crashing when specific_threads is set - #8758
Merged
sfc-gh-truwase merged 2 commits intoOct 9, 2026
Merged
sfc-gh-truwase merged 2 commits into
sfc-gh-truwase merged 2 commits into
Conversation
The process list was indexed by thread id while being filled in the order of threads_to_run, so any specific_threads other than [0..k] raised IndexError. Signed-off-by: rakshit-gen <sisodiarakshit456@gmail.com>
Rakshit-gen
requested review from
loadams,
tjruwase and
tohtana
as code owners
October 6, 2026 16:32
sfc-gh-truwase
approved these changes
Oct 9, 2026
sfc-gh-truwase
enabled auto-merge
October 9, 2026 10:01
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.
DataAnalyzer.run_mapfills the process list in the order ofthreads_to_runbut starts and joins withp[thread], sospecific_threadsonly works when it is[0, 1, ..., k]. Anything else, like[2, 3]to rerun two failed threads, raisesIndexError: list index out of range.Fix: start the process that was just appended (
p[-1]) and join overpdirectly. Two lines.Test:
test_data_analyzer_runs_only_the_specific_threadsrunsrun_mapwithnum_threads=4, specific_threads=[2, 3]and checks that onlyworker0_thread2andworker0_thread3are written, holding samples 10 to 14 and 15 to 19. It fails on master with the IndexError and passes with the fix.pytest tests/unit/runtime/test_data_efficiency.py: 15 passed, 2 skipped (the two-GPU curriculum tests). Run on an M-series Mac, CPU only, torch 2.14.0. pre-commit passes on both changed files.This doesn't touch the
len(data)sample counting in the same file, which #8505 already covers.Fixes #8757