pyphi.campaign.prepare_ces#
- pyphi.campaign.prepare_ces(substrates, *, states, subsets='full', formalisms=None, scope=None, directory, units_per_job=None, limit=100000000, workloads=None, sia=None, resolution_state=None, ordering=None, infeasible_threshold=1000000000.0, strict=False, container_image='pyphi.sif', request_memory='4GB', request_disk='4GB')[source]#
Materialize a scoped CES sweep as a campaign.
Enumerates exactly the cells
pyphi.sweep()would run over the same axes, all sharing one scope, and plans shards for each cell’s scoped distinction computation (and, unless a precomputedsiaor explicitresolution_stateis given, for its system irreducibility analysis), descending mechanism → purview-range → partition-stride only whereunits_per_jobrequires. The shard plan depends only on the substrate, subset, and formalism — not the state — so cells that differ only by state share one planning pass and replicate its shard tasks. Shards are independent condor jobs on the standard campaign scaffold; collection merges them exactly (tie sets preserved) and assembles each cell’s cause-effect structure through the standard analysis path.- Parameters:
substrates (Any) – As in
pyphi.sweep(): one substrate, a sequence, or a{label: substrate}mapping.states (Any) – As in
pyphi.sweep(); scalars are accepted anywhere.subsets (Any) – As in
pyphi.sweep(); scalars are accepted anywhere.formalisms (Any) – As in
pyphi.sweep(); scalars are accepted anywhere.scope (CESScope, optional) – One feasibility surface shared by every cell, resolved per substrate;
Noneis the unconstrained scope.directory (Any) – Target campaign directory; created, and must not already exist.
units_per_job (float, optional) – Target work units per shard — the planning ladder’s budget. With None (the default), each cell’s structure is one task and, under IIT 4.0, its system analysis another.
limit (int, optional) – Work budget for each planning walk. The walk raises
ValueErrorpast the limit — the workload is then too large to plan; narrow the scope or raise the limit.workloads (dict, optional) – Per-mechanism workloads to plan against, replacing the counting walk — a
pyphi.cost.mechanism_workloads()mapping, or one derived from measured runtimes when the caller knows the cost better than the analytic model does. Applies to a campaign with a single planning group (one substrate, formalism, and subset);ValueErrorotherwise, since a group’s workloads are specific to its substrate and subset.sia (optional) – A precomputed system irreducibility analysis; suppresses SIA shards and is used at collection. Single-cell campaigns only. It must name the cell’s units and their state (
ValueErrorotherwise); the state of the substrate’s other units is not checked.resolution_state (optional) – Explicit congruence-resolution states; suppresses SIA shards, and the collected structures then carry no φₛ. One specification (the result of
pyphi.formalism.iit4.system_intrinsic_specification()) for a single-cell campaign; for multi-cell campaigns, a mapping keyed by the full(label, formalism, subset, state)cell tuples, a mapping keyed by state alone (when the other axes are singletons), or a callablecell -> specification. Every cell must resolve; values are validated here rather than at collect time. IIT 3.0 resolves no congruence, so a campaign with a cell under IIT 3.0 raisesValueError.ordering ({"bottleneck_first", None}, optional) – Reorder each partition-stride shard’s slice so likely-reducible partitions are evaluated first (sparse substrates short-circuit sooner). Never affects results.
infeasible_threshold (float, optional) – A shard whose estimate exceeds this triggers a warning (or an error with
strict).strict (bool, optional) – Escalate admission-control warnings to errors.
container_image (str, optional) – Substituted into the generated submit file.
request_disk (str, optional) – Substituted into the generated submit file.
request_memory (str, optional) – Minimum per-shard memory request (the floor). Every shard requests the greater of this and its estimated peak, so a large floor disables memory stratification.
- Returns:
CampaignStatus – The freshly prepared ledger (all tasks pending).
- Return type: