From 03dc5d2f8a54a21f65f1844967215bd0c02befd8 Mon Sep 17 00:00:00 2001 From: Rasmus Oersoe Date: Sat, 23 Sep 2023 11:18:36 +0200 Subject: [PATCH] Update code comment in 04-01 --- examples/04_training/01_train_dynedge.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/examples/04_training/01_train_dynedge.py b/examples/04_training/01_train_dynedge.py index 6a8bf2f15..58e513ec2 100644 --- a/examples/04_training/01_train_dynedge.py +++ b/examples/04_training/01_train_dynedge.py @@ -164,10 +164,13 @@ def main( # Save results as .csv results.to_csv(f"{path}/results.csv") - # Save full model (including weights) to .pth file - Not version proof + # Save full model (including weights) to .pth file - not version safe + # Note: Models saved as .pth files in one version of graphnet + # may not be compatible with a different version of graphnet. model.save(f"{path}/model.pth") # Save model config and state dict - Version safe save method. + # This method of saving models is the safest way. model.save_state_dict(f"{path}/state_dict.pth") model.save_config(f"{path}/model_config.yml")