mhaham/uma-les main
References multiple AI or ML asset extensionsLoads a PyTorch checkpoint
SHA-25695d9d8de89fc6d34f8605ca96ce63639d9af8d7ae8ef3f16b3eca5afb7fd0dfa
MaleculeH₂(Db₂F)
Evidence
1import torch
2
3# Load the custom FAIRChem checkpoint object
4ckpt = torch.load("inference_ckpt.pt", map_location="cpu", weights_only=False)
5
6# It's a standard dictionary, so we assign the keys directly to expose the analytical gradients
7ckpt.model_config[ …
13:24… backbone"]["regress_stress"] = True
14
15# Save the modified object
16torch.save(ckpt, "inference_ckpt_with_gradients.pt")
17print("Success! Created inference_ckpt_with_gradients.pt")