← Questions

ML configuration system with inheritance and validation

0
AnthropicML designLast asked Apr 2026

Design and partly implement an ML configuration system covering schemas, inheritance and overrides, validation, and reproducibility.

class Field:
    def __init__(self, type_, default=..., choices=None, min=None, max=None): ...


class ConfigError(Exception):
    def __init__(self, errors): ...


def merge(base, over): ...                                   # dicts merge, lists replace, None deletes
def resolve(name, registry, schema, overrides=()): ...       # base chain, CLI overrides, ${refs}, validation
def validate(cfg, schema, prefix=""): ...                    # -> list of "path: problem"
def config_hash(cfg): ...
Your canvas
Draw your answer hereBoxes, arrows and notes, saved for you to come back to.Sign in to start drawing