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

Various fixes #2

Merged
merged 4 commits into from
Oct 24, 2022
Merged

Various fixes #2

merged 4 commits into from
Oct 24, 2022

Conversation

joegilkes
Copy link
Contributor

Fixes to two previously discussed bugs (crash on single reaction prediction; crash on prediction with --direction forward or --direction backward), as well as a common crash I was having when running KPM with no available GUI (headless).

Full details for each fix are included in the individual commits. All have been tested with the examples and should be fully compatible with previous versions.

Previously, running `KPM predict` on a single reactant/product pair would cause KPM to fail due to NumPy loading in the enthalpy as a 0-dimensional array which couldn't be indexed. Fixed by enforcing a 1D array be loaded.
KPM could not run headless (without a `DISPLAY` environment variable set) due to it loading the `TkAgg` backend for Matplotlib. This has been fixed, so if `DISPLAY` is not set or empty, KPM will instead load the `Agg` backend, allowing for headless running of both training and rediction modes.
Calling `KPM predict` with a direction of 'forward' or 'backward' was failing due to an incorrectly set `num_reacs` in `calc_diffs()`. This has now been set correctly based on the requested prediction directionality.
@idilismail idilismail merged commit b85c803 into idilismail:main Oct 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants