Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix KeyError: 'decay_fraction' and TypeError: Object of type int64 is not JSON serializable #169

Merged
merged 5 commits into from
Jun 21, 2024

Commits on Jun 21, 2024

  1. 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
    janosh committed Jun 21, 2024
    Configuration menu
    Copy the full SHA
    5962baf View commit details
    Browse the repository at this point in the history
  2. fix TypeError: Object of type int64 is not JSON serializable when pas…

    …sing trainer.train(save_test_result="test-preds.json")
    janosh committed Jun 21, 2024
    Configuration menu
    Copy the full SHA
    9df59b2 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    9484896 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    a5f8b48 View commit details
    Browse the repository at this point in the history
  5. pin numpy<2, setuptools<70

    janosh committed Jun 21, 2024
    Configuration menu
    Copy the full SHA
    3fc1cc1 View commit details
    Browse the repository at this point in the history