pyna.workflow.tracing#

Dimension-agnostic tracing workflow helpers.

This module keeps orchestration optional. The public tracing functions use pyna.cache for local disk caching, while the *_flow helpers build Prefect flows only when Prefect is installed.

Functions#

trace_trajectory(→ Any)

Trace a finite-dimensional continuous trajectory.

trace_orbit(→ Any)

Trace a finite-dimensional discrete orbit.

trace_trajectory_flow(→ Any)

Run the Prefect flow for generic continuous trajectory tracing.

trace_orbit_flow(→ Any)

Run the Prefect flow for generic discrete orbit tracing.

build_prefect_trace_trajectory_flow(→ Any)

Return the canonical Prefect flow for generic trajectory tracing.

build_prefect_trace_orbit_flow(→ Any)

Return the canonical Prefect flow for generic orbit tracing.

Module Contents#

pyna.workflow.tracing.trace_trajectory(system: Any, x0: Any, t_span: Any, *, trace_id: str | None = None, dt: Any = None, t_eval: Any = None, cache_namespace: str = 'workflow.trajectory', use_cache: bool = True, cache: bool | None = None, cache_store: pyna.cache.CacheStore | None = None, cache_backend: str = 'npz', **kwargs: Any) Any[source]#

Trace a finite-dimensional continuous trajectory.

system must expose trajectory(x0, t_span, ...) or integrate(x0, t_span, ...). Local caching is independent of Prefect. When caching is enabled, callers must provide a stable trace_id because arbitrary Python system objects often have process-local repr values.

pyna.workflow.tracing.trace_orbit(map_obj: Any, x0: Any, n_iter: int, *, trace_id: str | None = None, cache_namespace: str = 'workflow.orbit', use_cache: bool = True, cache: bool | None = None, cache_store: pyna.cache.CacheStore | None = None, cache_backend: str = 'npz') Any[source]#

Trace a finite-dimensional discrete orbit.

map_obj may expose orbit_geometry or orbit; the result is the generic pyna.topo.core.Orbit shape used by TopologyWorkflow.

pyna.workflow.tracing.trace_trajectory_flow(system: Any, x0: Any, t_span: Any, *, trace_id: str | None = None, dt: Any = None, t_eval: Any = None, cache_namespace: str = 'workflow.trajectory', use_cache: bool = True, cache_store: pyna.cache.CacheStore | None = None, cache_backend: str = 'npz', **kwargs: Any) Any[source]#

Run the Prefect flow for generic continuous trajectory tracing.

pyna.workflow.tracing.trace_orbit_flow(map_obj: Any, x0: Any, n_iter: int, *, trace_id: str | None = None, cache_namespace: str = 'workflow.orbit', use_cache: bool = True, cache_store: pyna.cache.CacheStore | None = None, cache_backend: str = 'npz') Any[source]#

Run the Prefect flow for generic discrete orbit tracing.

pyna.workflow.tracing.build_prefect_trace_trajectory_flow() Any[source]#

Return the canonical Prefect flow for generic trajectory tracing.

pyna.workflow.tracing.build_prefect_trace_orbit_flow() Any[source]#

Return the canonical Prefect flow for generic orbit tracing.