Skip to content

check_model_fanout

This check validates that a model has a limited number of direct children.

Parameters

Name Default Type Description
max_downstream_models 5 int The maximum number of direct child models the model is allowed to have

Info

For more information about how to set custom parameters for a check, see the documentation on configuration.

Source

def check(model: dict, children: list[dict], max_downstream_models: int = 5):
    downstream_models = [c for c in children if c["resource_type"] == "model"]
    assert len(downstream_models) <= max_downstream_models