save_samples_chunk#

jeanspy.sampler_numpyro.NumPyroSampler.save_samples_chunk

Class and construction: NumPyroSampler.

NumPyroSampler.save_samples_chunk(*, datatree=None, wait=False, **arviz_kwargs)[source]#

Write an ArviZ sample chunk.

Notes

Inputs and units. Optional datatree; wait=True writes synchronously; other keywords go to the converter.

Returns and shape. Tuple (chunk_index, path, write_submitted). False in the third entry means the write was synchronous.

Validity. The sampler assigns a fresh chunk index. Wait for flush/close before relying on an asynchronous write.

Errors. FileExistsError prevents replacing a reserved chunk. Conversion, array loading and write failures propagate; asynchronous failures are raised by flush/close.

Differentiation. Host-side sampling/storage control; this method has no physical-parameter derivative.

Parameters:
  • datatree (xarray.core.datatree.DataTree | None)

  • wait (bool)

  • arviz_kwargs (Any)

Return type:

tuple[int, pathlib.Path, bool]