You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Move rbc scratch dirs off cache shards via independent scratch root
Two problems with the prior generate_exec_folder pattern:
1. It hijacked the niwrap runner's data_dir + uid + execution_counter,
forcing _CacheProxyingRunner to forward those attributes through to
the base runner on every access.
2. Several rbc sites then wrote sibling files via `input_file.parent /
...`. When input_file was served from a styxcache shard (which is
the norm under caching), those writes landed inside the shard,
racing other workers' reads and silently truncating cached files.
The test_single_session_qc EOFError was a cached .nii.gz truncated
this way.
generate_exec_folder now owns its own root (RBC_SCRATCH_DIR override,
else a process-unique tempfile.mkdtemp). Every touched call site was
migrated off `input_file.parent / ...` to `generate_exec_folder(...) /
...`. Sites audited:
- core/functional/resampling.py:107, 201
- core/functional/nuisance.py:112
- core/longitudinal/transform.py:145
- core/longitudinal/freesurfer.py:142
- core/metrics/reho.py:191
- core/metrics/alff.py:259
- core/metrics/standardization.py:74
- core/metrics/timeseries.py:159
distortion.py's topup.parent is a read-only lookup into the tool's own
output set (no write), left as-is.
Unit tests for generate_exec_folder rewritten for the new semantics:
no more uid/counter-based naming, just unique scratch dirs.
0 commit comments