passengersim.callbacks.

combine

Combination of tracer results from several trials, workers, or saved runs.

A finalized tracer table declares how it combines with another table of the same kind through df.attrs["aggregation_process"]. That string is the only contract between the tracer that wrote the table and the code that combines it, because it is all that survives once a result is saved. Combination is looked up in a registry keyed by that string.

Process identifiers are part of the saved-result format: once published, an identifier never changes meaning. A change in meaning takes a new identifier, so results saved before and after the change are never silently mixed.

Functions

combine_concat_rows(a, b)

Stack two tables of per-sample rows, such as those of separate trials.

combine_pooled_moments(a, b)

Pool two tables of per-cell count, mean, and sample standard deviation exactly.

combine_values(key, a, b)

Combine two values stored under the same callback_data key.

combine_wgt_by_samples(a, b)

Combine two per-sample means, weighted by attrs["n_samples"].

combine_wgt_by_trials(a, b)

Combine two per-trial means, weighted by attrs["n_trials"].

register_combiner(process, combiner)

Register how tables declaring an aggregation process are combined.

registered_processes()

Get the aggregation processes that have a registered combiner.