module

language

module laco.language

Configuration language — the lie-typing scaffolding ====================================================

This module exposes the user-facing DSL used to author Laco configuration files: :func:`call`, :func:`partial`, :func:`node`, :func:`ref`, the typed container macros (:class:`Dict`, :class:`List`, :class:`Tuple`, :class:`Set`, :class:`OrderedDict`), the :func:`params` decorator, and the tracing API (:func:`configurable`, :func:`trace`).

Members

type

  • ChoicesValidator: value must be one of the given options.
  • ConvertMode
  • DictTyped mapping macro — see module docstring fiction #5.
  • DictFromItemsTyped mapping-from-items macro — see module docstring fiction #5.
  • HiddenType annotation that hides a ``@L.params`` field from ``laco app``.
  • LacoParamRuntime wrapper produced by :func:`param`.
  • LazyCallIntrospectionWarningEmitted once per ``L.call`` decoration when ``inspect.signature`` cannot describe the target (e.g. C-extension callables like :class:`range`).
  • ListTyped homogeneous list macro — see module docstring fiction #5.
  • NodeSpec
  • OrderedDictTyped ordered-mapping macro — see module docstring fiction #5.
  • ParamType annotation marking a module-level variable as a ``laco app`` param.
  • ParamsWrapper
  • RangeValidator: value must lie within ``[min, max]``.
  • SetTyped set macro — see module docstring fiction #5.
  • TupleTyped heterogeneous tuple macro — see module docstring fiction #5.

function

  • callPerform a lazy call to a function or class.
  • configurableMark a callable as a configuration boundary for :func:`trace`.
  • justWrap an arbitrary value in a config node (task **C27a**).
  • nodeUses a template :class:`ConfigNode` to define an OmegaConf node that has the same fields as the template.
  • pairsKey-value pairs from a configuration node, where special keys are ignored.
  • paramDeclare a one-off ``laco app`` hyperparameter outside a ``@L.params`` block.
  • paramsCreate a class that represents a set of hyperparameters.
  • partialPartially apply a function with keyword arguments.
  • refReference to another variable in the configuration using an OmegaConf interpolation string.
  • repeat
  • taskHydra app task decorator (task **B8**).
  • traceExecute a thunk inside a tracing scope and return the captured config tree.
  • wrap_on_resultRun a function on the result of another function. Useful in configuration files when you want to wrap a function on the result of another function, without having to change the keys of the configuration file.

property

Source: laco/language.py:1