//! Architecture load (JSON + SHA-256 verification).
//!
//! Reads `arch.json` and verifies the SHA-256 of the topology
//! against `arch.json.sha256`. Returns an error if the file is
//! tampered with or missing. Used by `src/infer.rs`.
//!
// Read a `ModelArch` from a JSON file.
//
// We do NOT call `arch.build()` here — load is purely a
// deserialization step. Validation (e.g. "does `hidden_dim` agree
// with `size`?") happens in `build`, so callers can inspect or fix
// a malformed arch before deciding what to do with it.
use File;
use BufReader;
use Path;
use crate::;
use ModelArch;
/// Read a `ModelArch` from the JSON file at `path`. The file is
/// expected to be pretty-printed or compact JSON; either is fine.