Troubleshooting¶
Prediction is running on CPU¶
dmri predict prints the selected JAX devices. CPU prediction can be very slow
even for a few thousand voxels. Install the appropriate accelerated JAX build
and confirm that jax.devices() lists the expected GPU or TPU.
On CPU, requested fp16 network precision falls back to fp32 because fp16 dot products with fp32 accumulation are not supported consistently.
First run is slow¶
JAX compiles model operations on first use. Automatic batch sizing also probes
each evaluation stage. Compilation and batch-size results are cached under
.jax_cache/; later runs with the same model, device, and sampling settings can
reuse them.
Out of memory¶
- Close other accelerator processes.
- Lower
--memory-fractionbefore JAX initializes. - Set a smaller
--batch-sizefor prediction. - For evaluation, set
evaluation.batch_sizeor stage-specificeval_batch_sizevalues. - Reduce theta samples or ODE steps when scientifically acceptable.
Evaluation halves a batch and retries after recognized runtime OOM errors.
Input folder is rejected¶
Prediction requires these exact default names:
Check that:
- the mask and image spatial shapes agree;
- the image measurement dimension matches b-values and b-vectors;
- the mask contains in-brain voxels;
- the acquisition includes a b=0 shell;
- b-vectors have the expected orientation and shape.
dmri eval permits filename overrides under evaluation.input.
Output directory already exists¶
Prediction refuses to replace an existing output directory. Pass --overwrite
only after confirming that the existing result can be removed, or choose another
--output-subdir.
Hub download or authentication fails¶
- Run
uv run hf auth loginfor private repositories. - Check
--repo-id, model name, and revision. - Use
--cache-dirwhen the default cache is unavailable. - Use
--local-files-onlyonly after all required files are cached. - Use
--local-checkpointwith a portable bundle to avoid Hub access.
Checkpoint cannot be restored¶
Confirm whether the requested checkpoint is latest, best, or a numeric
regular step. A run may not contain best/ if validation-selected checkpointing
was disabled or no best checkpoint was saved.
For portable bundles, config.yaml, artifact.yaml, and checkpoints/ must be
inside the model directory.
Training did not resume¶
training.continue_training=true searches the current Hydra output directory.
A new command normally creates a new timestamp, so point hydra.run.dir at the
existing run. Resume uses the latest regular checkpoint, not best/.
Simulation buffers and loader position are not checkpointed.
A documented command does not compose¶
Print the config first:
Remember that experiment groups need a leading +, list/removal overrides
should be quoted in a shell, and sweep parameters require --multirun.
Results contain non-finite samples¶
Rerun with fp32, check the input normalization and acquisition compatibility,
and compare with an uncorrected run. The evaluator reports the affected fraction
when it detects non-finite theta samples.
Acquisition compatibility¶
A checkpoint can load successfully and still be inappropriate for the input acquisition. Confirm shell distribution, b-values, direction distribution, signal normalization, and any model-specific acquisition assumptions before interpreting output.