pyphi.mcp.server.prepare_campaign#

pyphi.mcp.server.prepare_campaign(handles, directory, states='all', subsets='full', formalisms=None, compute='sia', jobs=None, units_per_job=None)[source]#

Materialize a sweep as an HTCondor campaign directory.

Enumerates the sweep cells over the given substrate handles, packs them into cost-balanced condor tasks, and writes a self-contained campaign directory (task files, substrates, submit file). The user submits it with condor_submit pyphi.sub; monitor with campaign_status and reassemble results with collect_campaign. See the campaigns reference topic for the workflow.

Parameters:
  • handles (list of str) – Substrate handles from load_example or build_substrate; the handle strings become the substrate labels in the result.

  • directory (str) – Target campaign directory; must not already exist.

  • states (Any) – Sweep axes: "all" / "full", one state or subset as a flat list, or a list of them.

  • subsets (Any) – Sweep axes: "all" / "full", one state or subset as a flat list, or a list of them.

  • formalisms (list[str] | None) – Sweep axes: "all" / "full", one state or subset as a flat list, or a list of them.

  • compute (str) – "sia" (default), "full", "ces" or "distinctions", as in analyze.

  • jobs (int, optional) – Pack into exactly this many cost-balanced tasks.

  • units_per_job (float, optional) – Target work units per task (mutually exclusive with jobs).

Returns:

dict – A card (human-readable summary) and a status mapping with the task ledger.

Return type:

dict[str, Any]