-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix
KeyError: 'decay_fraction'
and `TypeError: Object of type int64…
… is not JSON serializable` (#169) * fix KeyError: 'decay_fraction' Loaded model params = 412,525 Traceback (most recent call last): File "{path}/trainer_reload.py", line 31, in <module> trainer = load_trainer(file_path) ^^^^^^^^^^^^^^^^^^^^^^^ File "{path}/trainer_reload.py", line 25, in load_trainer trainer = Trainer.load(trainer_path) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "{path}/lib/python3.11/site-packages/chgnet/trainer/trainer.py", line 545, in load trainer = Trainer(model=model, **state["trainer_args"]) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "{path}/lib/python3.11/site-packages/chgnet/trainer/trainer.py", line 147, in __init__ decay_fraction = scheduler_params.pop("decay_fraction") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ KeyError: 'decay_fraction' #168 * fix TypeError: Object of type int64 is not JSON serializable when passing trainer.train(save_test_result="test-preds.json") * test passing save_test_result in test_trainer
- Loading branch information
Showing
5 changed files
with
34 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters