ccflow is a framework for configuring and running workflows, in which each unit of work is a model that’s called with a context and returns a result. A ValidationModel is such a model for a Pointblank validation: calling it composes a YAML configuration with hydra_interrogate() and returns the interrogated validation. It can be put in a ccflow model registry and run with the rest of a flow.
Parameters
config
The path to a YAML file to compose. Without a file, the configuration is made up of the config group options selected in overrides=.
overrides
Hydra overrides, such as "pointblank/thresholds=strict" to select a config group option or "thresholds.warning=0.2" to set a value.
config_dir
A directory of config groups to add to the search path.
allow_python
Whether to run the Python code in the configuration: the code of python: blocks (see yaml_interrogate()), and the mappings with a _target_ key, which are made into the Python objects they describe. Only set it for configurations that you trust.
Returns
ValidationModel
A model that returns a ValidationResult when it’s called with a ccflow.NullContext.
Examples
Let’s write a configuration that selects the small_table dataset and the strict thresholds (both come with Pointblank), and make a model for it.