multigedi.io.load_model¶
- multigedi.io.load_model(adata, filename, *, key='gedi')[source]¶
Load a safely serialized GEDI result tree into
.uns.Only the versioned JSON-manifest NPZ format written by
save_model()is accepted. NumPy archives are always opened withallow_pickle=False; legacy archives containing stringified Python dictionaries are rejected.- Parameters:
- Return type:
Notes
Loading restores only
adata.uns[key](ormdata.uns[key]). It does not reconstruct or modifyX,obs,var,layers,obsm, orvarm. The destination is mutated only after the complete archive has passed validation.Examples
>>> import multigedi as gd >>> gd.io.load_model(adata, "gedi_model.npz") >>> adata.uns["gedi"]["model"]