Weight persistence module #46
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Parent
#37
What to build
Save and load all network tensors (actor, 2 critics, 2 target critics, alpha parameter, Adam optimizer states) as individual
.npytensors packed into a single.zipfile via Nim'sstd/zipfiles.Each tensor is a standard
.npyinside the archive — individually inspectable by extracting. Atomic save: write to a temp file, then rename to the target path.Checkpoint directory convention:
weights/latest.zipfor current state, periodic snapshots asweights/checkpoint_<N>.zip.Acceptance criteria
save(path, networks)creates a valid.zipcontaining.npyentries for all tensorsload(path) → networksrestores all tensors exactly (round-trip correctness).npyfiles are readable by numpytest_weights.nimpassesBlocked by
Weight persistence module complete — zipped .npy via std/zipfiles, atomic save (temp+rename), checkpoint includes Adam states with optional load. 12/12 tests pass. Full suite 69+ tests all green. Code reviewed clean.