Releases: TYTTYTTYT/HyperArgs
Releases · TYTTYTTYT/HyperArgs
Release list
0.1.4 — stop silently dropping values you wrote in your config
Every fix in this release is one shape of the same bug: a value written in a
config file that the library quietly ignored — the worst failure mode for a
config layer, because it surfaces days later as "why did it train with the
default?". No public API changed.
Highlights
- A nested block is no longer dropped when its type-selector field is left at
its default. Monitors only ran from__setattr__, so a field kept at its
default never triggered the swap to the concrete nestedConf; the block
stayed a bareConfand every key under it was discarded with only a log
line.Conf.__init__now fires monitors, so the nested type is in place
before the file's keys are applied. - Parsing is a single, dependency-ordered pass. Scalars are parsed first,
then containers and nested blocks are parsed into the existing nested Conf,
repairing only the fields whose type actually changed — instead of settling
the object and then re-parsing over it, which is where values were being lost.
Correctness fixes
- Rebuilt-field detection holds the object, not its
id(). The
invalidation signature compared nestedConfs by address, and CPython
recycles addresses: a monitor that assigns the same field twice frees the
original and the second allocation can land on the freed address, so the
signature came out identical, the repair was skipped, and the file's values
were lost. Measured 300/300 for that shape (0/300 for a single assignment),
which is why it stayed hidden — every monitor shipping here is a
single-assignment chain — but it is a real trap for any same-class
replacement. strict=Truenow checks fields, not values. It used to re-parse every
raw file value into the settled object, so a monitor that tightens a
constraint made strict reject a config thatstrict=Falseaccepts and gets
right (n=50clamped tomax 8: fine without strict,ValueErrorwith it).
Values are already validated as they are parsed; strict is about unknown
fields, and it now walks the settled objects comparing keys.- A config list shorter than the field it fills now warns, naming the field
(a list longer than the field remains an error).
Web / GUI mode (Streamlit)
- Corrections are written back to the right widget. The write-back rebuilt
each session key from its last path segment only, collapsing every nested
field onto a top-level one. Through real Streamlit this produced three
failures: a correction meant foroptimizer.lrsilently landed on an
unrelated top-levellrand was emitted in the saved config; a nested derived
field never converged so the app reran forever; and a list element
paths.[0]became[0], which the session parser rejects and which then
re-crashed on every rerun.
Compatibility
- No public API changes; drop-in over 0.1.3.
- Behaviour change worth noting for reproducibility: a config that was
previously (and silently) falling back to defaults through one of these bugs
will now apply its written values. If a 0.1.3 run was hitting one of these,
its effective configuration under 0.1.4 will differ — in the direction of
what the file actually said.
fix missing dependency
add function for dynamic option list
v0.1.2 add function to monitor dynamic option list
GUI is fully working now!
The first fully functional version
v0.1.0 update readme