← Questions
ML configuration system with inheritance and validation
0
I was asked this
No reports yet. Sign in to say where you were asked it.
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): ...
Sign in to see the worked answer
The full answer, chapter by chapter, with what interviewers expect at each level. Free with an account: one full answer per company.
Sign in to see the worked answer
The full answer, chapter by chapter, with what interviewers expect at each level. Free with an account: one full answer per company.
Draw your answer hereBoxes, arrows and notes, saved for you to come back to.Sign in to start drawing
