Documentation Index Fetch the complete documentation index at: https://docs.cirron.com/llms.txt
Use this file to discover all available pages before exploring further.
Non-error types exported from the cirron package.
Profiler
Returned by ci.profile(). Most callers ignore the return value;
reach for it when you want to flush, inspect health, or shut down
without going through the module-level functions.
from cirron import Profiler
Instance attributes
Attribute Type Purpose enabledboolFalse if created with enabled=FalsecirronCirronThe owning configuration instance installed_hookslist[str]Framework hooks that installed successfully hook_handleslist[HookHandle]Internal handles used for uninstall on shutdown platform_contextdict[str, str]Resolved CIRRON_RUN_ID / PIPELINE_ID / etc.
Methods
Method See flush()ci.flushhealth()ci.healthtrace(format=..., name=..., last=...)ci.traceshutdown()ci.shutdown
Usage
import cirron as ci
p = ci.profile()
print (p.health())
# later
p.flush()
p.shutdown()
Cirron
The configuration class. Covered on its own page; see
Cirron .
CirronYaml
Pydantic model for the cirron.yaml project configuration file.
from cirron import CirronYaml, find_cirron_yaml, load_cirron_yaml
path = find_cirron_yaml() # walks parents looking for cirron.yaml
config: CirronYaml = load_cirron_yaml(path)
Fields
Field Type Purpose namestr (required) Model / project identifier frameworkenum (required) pytorch, tensorflow, sklearn, or onnxtypeenum (required) classification, regression, time-series, embedding, computer-visionversionstr (required) Semantic version descriptionstr?Free-form description profilingProfilingConfig?SDK profiling defaults (see below) serving_configServingConfig?Deployment serving contract. YAML alias: servingConfig envdict[str, str]Build / runtime env vars (default {}) secretslist[str]Declared secret names (default []) datadict[str, str]Dataset aliases for ci.load(source="platform") (default {})
When profiling or serving_config is omitted entirely, the SDK
falls back to its own defaults (not to a Pydantic-default instance
of the sub-model). See
Configuration, cirron.yaml
for the narrative and example.
Parse failures raise CirronYamlError .
Unknown keys are tolerated (extra="allow") so CLI-owned sections
like build / deploy / environments don’t fail SDK validation.
ProfilingConfig
Pydantic model for the profiling: section of cirron.yaml.
Field Type Default Purpose snapshots"stats" | "sampled" | "full""stats"Default snapshot mode sample_ratefloat (0.0–1.0)0.01Default sample_rate for "sampled" mode flush_intervalfloat (> 0)1.0Flush thread wake interval (seconds) frameworkslist[str]?NoneOverride framework autodetect
ServingConfig
Pydantic model for the servingConfig: section of cirron.yaml.
Describes how the Cirron platform should serve the model after it’s
deployed.
Field Type Purpose runtime"onnx" | "sklearn-joblib" | "pytorch" | "tensorflow-serving"Serving runtime on the platform class_labelslist[str]?Class labels for classification outputs feature_orderlist[str]?Input feature order for tabular models input_schemadict? (flat JSON Schema)Input payload contract output_schemadict? (flat JSON Schema)Output payload contract
Extra fields are allowed (extra="allow") for
platform-version-specific settings.
LazyHandle
Returned by ci.load(..., lazy=True). Call .collect() to
materialize.
handle = ci.load( "./events.parquet" , as_ = "polars" , lazy = True )
df = handle.collect()
Behavior depends on the backend:
as_="polars": returns a polars.LazyFrame directly; .collect()
is Polars’ native method.
Other backends: LazyHandle defers the I/O and the
.collect() call does the full load.
Scope
Yielded by the ci.scope() context manager. Most callers ignore it;
ci.mark attaches by thread-local lookup, not by Scope reference.
Attribute Type Purpose idstr32-char hex span ID namestrScope name start_nsintWall time at open parent_idstr?Parent span ID, or None for session root attrsdictAttribute key-values
Errors Exception hierarchy.
Schemas How these types serialize on disk and over the wire.