Skip to main content
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.

Instance attributes

Methods

Usage

Cirron

The configuration class. Covered on its own page; see Cirron.

CirronYaml

Pydantic model for the cirron.yaml project configuration file.

Fields

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.

ServingConfig

Pydantic model for the servingConfig: section of cirron.yaml. Describes how the Cirron platform should serve the model after it’s deployed. Extra fields are allowed (extra="allow") for platform-version-specific settings.

File and URL inputs

Each input_schema property is a flat JSON Schema entry (string, number, integer or boolean with a title). A string property can also declare a format:
The model receives each file as an object with source: "upload" and a data field holding a data URL, next to the scalar fields. An output_schema property declared format: binary renders inline when the model returns a base64 string or data URL for it: as an image for an image contentType, as a player for an audio one. Output properties can also be array or object, for values such as class probabilities or embedding vectors. Input properties stay scalar. The platform checks servingConfig when a model is registered. A config that does not match this shape is refused, and the error names each property at fault (for example input_schema.properties.image: format 'binary' requires a contentType such as image/*).

LazyHandle

Returned by ci.load(..., lazy=True). Call .collect() to materialize.
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.

Errors

Exception hierarchy.

Schemas

How these types serialize on disk and over the wire.