pyphi.campaign.shards#

Shard planning for scoped cause-effect campaigns.

The planner descends a three-rung ladder, splitting only where the per-job budget requires: whole mechanisms are cost-balance-packed into shards; a mechanism over budget splits its scoped (direction, purview) list into cost-balanced ranges; a single (mechanism, direction, purview) pair over budget splits its partition enumeration into interleaved strides (shard i of k evaluates partitions i, i+k, i+2k, …), which balances any systematic cost trend along the enumeration. Sharding never changes results — every shard executes exact computations over a subset, and collection merges tie sets losslessly.

Functions

bottleneck_order(partitions, indices, cm, ...)

Reorder a partition slice so likely-reducible partitions come first.

cut_present_edges(partition, cm, direction)

Count present-in-cm connections severed by a mechanism partition.

enumerate_partition_stride(mechanism, ...)

Materialize stride i of k of the partition enumeration.

enumerate_system_partition_stride(system, ...)

Materialize stride i of k of the system-partition enumeration.

plan_ces_shards(system, scope, units_per_job)

Plan the shards of a scoped cause-effect computation.

plan_sia_shards(system, units_per_job[, ...])

Plan system-partition strides for the system irreducibility analysis.

Classes

ShardSpec(payload_kind[, mechanisms, ...])

One shard of a scoped analysis: what to compute and how it was split.