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

Add cli.py, diatomics.py + refactor metrics/discovery.py #203

Merged
merged 5 commits into from
Feb 8, 2025

Conversation

janosh
Copy link
Owner

@janosh janosh commented Feb 8, 2025

49d179f add metrics_df_from_yaml() function in metrics/init.py to extract metrics from model YAML files

  • metrics_df_from_yaml used to be get_df_metrics() in scripts/evals/discovery.py
  • move df_metrics, df_metrics_10k, df_metrics_uniq_protos from preds/discovery.py to metri
    cs/discovery.py
  • add test_metrics_init.py to cover metrics_df_from_yaml()
  • add test_discovery_preds.py to cover df_preds, df_each_pred, df_each_err
  • update plot scripts to use YAML-read metrics instead of expensive on-the-fly calculated
    df_metrics{_test_subset}

49d179f move all enums into enums.py: Files, DataFiles and Model enums were in data.py before. improves code org

7c876ec add cli.py with central argument parser for plotting scripts

  • support command-line configuration for models, test subsets, energy types, and plot options
  • add corresponding test suite in test_cli.py
  • ensure compatible with unknown sys.argv from Jupyter kernel
  • update DataFiles and Model enums to use auto() and tuple-based file path specification
  • add test cases for MbdKey, Task, ModelType, Open, and TestSubset enums

c9ba797 add diatomics module for generating atomic pair-repulsion curves

  • diatomics.py has functions to generate diatomic molecules and calculate potential energy and forces
  • test_diatomics.py tests molecule generation and energy/force results
  • support both homo-nuclear and hetero-nuclear diatomics

- diatomics.py has functions to generate diatomic molecules and calculate potential energy and forces
- test_diatomics.py tests molecule generation and energy/force results
- support both homo-nuclear and hetero-nuclear diatomics
- support command-line configuration for models, test subsets, energy types, and plot options
- add corresponding test suite in `test_cli.py`
- ensure compatible with unknown sys.argv from Jupyter kernel
- update DataFiles and Model enums to use `auto()` and tuple-based file path specification
- add test cases for MbdKey, Task, ModelType, Open, and TestSubset enums
… metrics from model YAML files

- metrics_df_from_yaml used to be get_df_metrics() in scripts/evals/discovery.py
- move df_metrics, df_metrics_10k, df_metrics_uniq_protos from preds/discovery.py to metrics/discovery.py
- add test_metrics_init.py to cover metrics_df_from_yaml()
- add test_discovery_preds.py to cover df_preds, df_each_pred, df_each_err
- update plot scripts to use YAML-read metrics instead of expensive on-the-fly calculated df_metrics{_test_subset}
@janosh janosh added analysis New model analysis refactor Refactor ux User experience labels Feb 8, 2025
@janosh janosh merged commit 426ff2b into main Feb 8, 2025
7 of 8 checks passed
@janosh janosh deleted the cli+diatomics+refactor-discovery-metrics branch February 8, 2025 22:42
janosh added a commit that referenced this pull request Feb 8, 2025
* add diatomics module for generating atomic pair-repulsion curves

- diatomics.py has functions to generate diatomic molecules and calculate potential energy and forces
- test_diatomics.py tests molecule generation and energy/force results
- support both homo-nuclear and hetero-nuclear diatomics

* add cli.py with central argument parser for plotting scripts

- support command-line configuration for models, test subsets, energy types, and plot options
- add corresponding test suite in `test_cli.py`
- ensure compatible with unknown sys.argv from Jupyter kernel
- update DataFiles and Model enums to use `auto()` and tuple-based file path specification
- add test cases for MbdKey, Task, ModelType, Open, and TestSubset enums

* move all enums into enums.py: Files, DataFiles and Model enums were in data.py before

improves code org

* add metrics_df_from_yaml() function in metrics/__init__.py to extract metrics from model YAML files

- metrics_df_from_yaml used to be get_df_metrics() in scripts/evals/discovery.py
- move df_metrics, df_metrics_10k, df_metrics_uniq_protos from preds/discovery.py to metrics/discovery.py
- add test_metrics_init.py to cover metrics_df_from_yaml()
- add test_discovery_preds.py to cover df_preds, df_each_pred, df_each_err
- update plot scripts to use YAML-read metrics instead of expensive on-the-fly calculated df_metrics{_test_subset}

* fix mypy and plotting scripts still importing models from matbench_discovery.preds.discovery.models
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
analysis New model analysis refactor Refactor ux User experience
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant