geoml.catalogue
Every class and function a model or a script may use, described as data, for programs that build geoML models without reading its code. Write it with
python -m geoml.catalogue catalogue.json
or read it in Python with geoml.catalogue.build(). The same geoML version
writes the same bytes. Each entry is keyed by the dotted path a saved model
records, so a catalogue entry and a saved spec name a class the same way.
The catalogue: every class and function a model or a script may use, described as data, for programs that build geoML models without reading its code.
build returns it as a dictionary and dumps as JSON text;
python -m geoml.catalogue [path] writes that text to a file or to the
standard output, and --show NAME and --list CATEGORY answer for one
entry or one category at a time. Signatures, defaults and descriptions come from the code.
What introspection cannot know – a class’s category, how many parents it
takes, how its output size follows from its arguments, whether inducing
points pass through it – each class declares beside its code, in a
_catalogue class attribute. The containers a script builds are listed
here, in CONTAINERS, and the columns each variable type writes are
declared on its class, in _COLUMNS.
- geoml.catalogue.build()[source]
The catalogue of the geoML in use, as a dictionary.
- Returns:
dict – catalogue_format, geoml_version, persistence_format (the format number a saved model carries), variable_types with the columns each writes, classes, containers and functions, all three keyed by the dotted path of what they describe, and workflow. Every value is JSON.
- Return type:
dict[str, Any]
- geoml.catalogue.dumps()[source]
The catalogue as JSON text, keys sorted: the same bytes for the same geoML.
- Return type:
str
What introspection cannot read off a class, the class declares in a
_catalogue attribute, assigned where its module ends: its category, its
parents, how its size follows from its arguments, whether inducing points
pass through it, and which variables a likelihood accepts. The package’s
tests build every class against its declaration.
Since geoML 0.8.0 the catalogue is format 2. Every entry carries a
description, the docstring’s account of when to use it and how it works;
every bound a constructor clips a value to is a constraint on its argument;
a size rule may name a fallback for a parameter left null; a categorical
likelihood names its contour_rule; containers lists what a script
builds or predicts into, with the methods it calls on each; and each
variable type lists the columns it writes, with their role and scale. The design record is
The catalogue, under internals.