v1
gcc_calculation record, v1 — canonical aliases.
Consumers and the record registry import from here and never touch the inner
module names, mirroring steps/*/v1/__init__.py.
Module
Submodules
- bitfount.cache.types.gcc_calculation.v1.migrations - No inbound migration — this is the base version.
- bitfount.cache.types.gcc_calculation.v1.model - Pydantic record for the
gcc_calculationcache table (v1). - bitfount.cache.types.gcc_calculation.v1.schema - SQLAlchemy ORM for the
gcc_calculationcache table (v1). - bitfount.cache.types.gcc_calculation.v1.store - Store for the
gcc_calculationtable (v1).
Classes
ORM
class ORM(**kwargs):SQLAlchemy model for the gcc_calculation cache table.
One row per (task_hash, file_id): the Ganglion Cell Complex asymmetry /
glaucoma-staging metrics computed for a scan from retinal-layer segmentation
and macula landmark predictions. GCC is a deterministic function of the
scan and the model output (and the config, which folds into task_hash) —
NOT of the project — so project_id is provenance only and excluded from
the key, letting two projects on the same datasource share rows (mirrors
model_inferences, fluid_calculation and cst_calculation).
A row is either a full result or a reason, never a partial object:
metrics_json holds the GCCMetrics fields (the scalar fields plus the
macula_coordinates tuple) for a computed file, and is null when the file
could not be computed — in which case error carries the reason
(missing_data:<fields> for absent inputs, calculation_error:<detail> for
compute failures). The two columns are mutually exclusive.
A simple constructor that allows initialization from kwargs.
Sets attributes on the constructed instance using the names and
values in kwargs.
Only keys that are present as attributes of the instance's class are allowed. These could be, for example, any mapped columns or relationships.
Ancestors
Variables
-
error : Union[sqlalchemy.orm.attributes.InstrumentedAttribute[+_T_co], +_T_co]
-
file_id : Union[sqlalchemy.orm.attributes.InstrumentedAttribute[+_T_co], +_T_co]
-
last_accessed_at : Union[sqlalchemy.orm.attributes.InstrumentedAttribute[+_T_co], +_T_co]
-
metrics_json : Union[sqlalchemy.orm.attributes.InstrumentedAttribute[+_T_co], +_T_co]
-
processed_at : Union[sqlalchemy.orm.attributes.InstrumentedAttribute[+_T_co], +_T_co]
-
project_id : Union[sqlalchemy.orm.attributes.InstrumentedAttribute[+_T_co], +_T_co]
-
run_id : Union[sqlalchemy.orm.attributes.InstrumentedAttribute[+_T_co], +_T_co]
-
tags : Union[sqlalchemy.orm.attributes.InstrumentedAttribute[+_T_co], +_T_co]
-
task_hash : Union[sqlalchemy.orm.attributes.InstrumentedAttribute[+_T_co], +_T_co]
Record
class Record(**data: Any):Record of a single row from the gcc_calculation table.
metrics_json holds the GCC metrics for a successfully computed file and is
None when the file could not be computed; in that case error carries the
reason (a missing_data:<fields> or calculation_error:<detail> string).
The two are mutually exclusive: a file is either a full result or a reason,
never a partial object.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be
validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
Variables
- static
error : str | None
- static
file_id : str
- static
last_accessed_at : datetime.datetime | None
- static
metrics_json : dict[str, typing.Any] | None
- static
model_config
- static
processed_at : datetime.datetime
- static
project_id : str | None
- static
run_id : str | None
- static
tags : dict[str, typing.Any] | None
- static
task_hash : str