pyphi.serialize.schema#

msgspec schema types for serializing PyPhi results.

Each serializable type has one frozen msgspec.Struct carrying a unique string tag. Schema is the tagged union of all of them; msgspec uses the tag to validate and dispatch on decode. Adding a type means adding its Struct here and registering its converter in pyphi.serialize.convert.

Classes

AcRIASchema(alpha, state, direction, ...[, ...])

AcSIASchema(alpha, direction, account, ...)

AccountSchema(causal_links)

AnalysisSchema(system, sia, ces)

AnalyticalRelationsRefSchema()

AnalyticalRelationsSchema(distinctions)

AxisScopeSchema(explicit, min_order, ...)

CESSchema(sia, distinctions, relations[, ...])

CESScopeSchema(mechanisms, cause_purviews, ...)

CESShardTaskSchema(task_id, kind, ...)

CampaignTaskOutputSchema(task_id, ...[, metrics])

CampaignTaskSchema(task_id, kind, compute, ...)

CausalLinkSchema(ria, extended_purview[, ...])

CellOutputSchema(status, result, traceback)

ComplexSchema(sia, substrate, is_maximal, ...)

ComplexesResultSchema(complexes, records, ties)

ConceptSchema

ConcreteRelationsRefSchema(relations)

ConcreteRelationsSchema(relations)

CoverageReportSchema(counts, n_units)

DataFrameSchema(parquet[, index_columns, ...])

A pandas DataFrame as embedded parquet.

DirectedAccountSchema(causal_links)

DirectedBipartitionSchema(direction, ...[, ...])

DirectedJointPartitionSchema(direction, ...)

DirectedSetPartitionSchema(node_indices, ...)

DirectionSchema(name)

DistanceResultSchema(value[, aux])

DistinctionSchema(mechanism, cause, effect)

DistinctionsSchema(concepts)

EdgeCutSchema(node_indices, cut_matrix, ...)

EvaluationRecordSchema(system, phi[, ...])

ExcludedCandidateSchema(node_indices, phi[, ...])

IIT3SIASchema(phi, distinctions, ...[, ...])

IIT4SIASchema(phi, partition, ...[, ...])

JointBipartitionSchema(part0, part1[, ...])

JointPartitionSchema(parts[, node_labels])

JointTripartitionSchema(parts[, node_labels])

MICECauseSchema(ria[, purview_margin, ...])

MICEEffectSchema(ria[, purview_margin, ...])

MICESchema(ria[, purview_margin, ...])

MacroSystemSchema(substrate, state, ...[, ...])

A MacroSystem.

MacroUnitSchema(constituents, update_grain, ...)

NoNodeLabelsSchema()

Marker for an object whose node_labels was None at encode time.

NodeLabelsSchema(labels, node_indices)

NullCESSchema(sia, distinctions, relations)

NullCutSchema(indices[, node_labels])

NullIIT4SIASchema(phi, partition, ...[, ...])

NullRelationsRefSchema()

NullRelationsSchema()

OptimizationResultSchema(best_params, ...)

An optimize() outcome.

PartSchema(mechanism, purview[, node_labels])

PhiPosteriorSchema(samples, complex_samples, ...)

ProvenanceSchema(pyphi_version, git_sha, ...)

RIASchema(phi, direction, mechanism, ...[, ...])

RelationRefSchema(distinction_indices)

RelationSchema(distinctions)

ResolvedDistinctionsSchema(concepts)

RunnerUpSchema(partition, phi[, normalized_phi])

SIAShardTaskSchema(task_id, kind, ...)

ShardSpecSchema(payload_kind, mechanisms, ...)

StateSpecificationSchema(direction, purview, ...)

SubstratePosteriorSchema(alpha_on, ...)

SubstrateSchema(factors, state_space, cm, ...)

Alphabet-general substrate encoding.

SweepResultSchema(df, results, skipped)

SystemSchema(substrate, state, node_indices, ...)

SystemStateSpecificationSchema(cause, effect)

TotalCutSchema(node_indices, node_labels)

TransitionSchema(substrate, before_state, ...)

TransitionSystemSchema(substrate, ...[, ...])

UnresolvedDistinctionsSchema(concepts)