MaxNeighborsCallback

class jaxrens.cli.monitor.MaxNeighborsCallback(logger_obj, interval=1)[source]

Bases: object

Writes per-iteration neighbor-bucket diagnostics to HDF5.

Captures the full per-walker max_neighbor_count distribution at each iteration, alongside the current bucket size and the overflow flag — enough to plot the per-iteration distribution of neighbor counts vs the current bucket boundary, and to diagnose bucket growth/shrink dynamics.

Reads directly off the post-step ns_state: no info-dict keys are required. For sharded runs, the redundant leading-G axis on info is collapsed upstream by _run_loop, but the population leaves are already gathered to (K, ...) via _gather_sharded_ns_state.

Parameters:
  • logger_obj (Any) – A ready-to-use MaxNeighborsLogger instance.

  • interval (int) – Fire every interval iterations. Default 1.