Skip to content

feat: get specific values and keys from metadata #154

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

Merged
merged 1 commit into from
Feb 27, 2025

Conversation

frazane
Copy link
Contributor

@frazane frazane commented Feb 26, 2025

Description

Adds the option to print out a specific part of the metadata from a checkpoint, using dot notation. For instance:

  • anemoi-inference metadata <checkpoint> --get config.dataloader prints out the dataloader config
  • anemoi-inference metadata <checkpoint> --get provenance_training. (note the dot at the end) prints out the keys at that node in the dictionary tree
  • anemoi-inference metadata <checkpoint> --get provenance_training.module_versions prints out the versions of all training dependencies
  • anemoi-inference metadata <checkpoint> --get . prints out the top-level keys

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update

Code Compatibility

  • I have performed a self-review of my code

Code Performance and Testing

  • I have added tests that prove my fix is effective or that my feature works
  • I ran the complete Pytest test suite locally, and they pass

Dependencies

  • I have ensured that the code is still pip-installable after the changes and runs
  • I have tested that new dependencies themselves are pip-installable.

Documentation

  • My code follows the style guidelines of this project
  • I have updated the documentation and docstrings to reflect the changes
  • I have added comments to my code, particularly in hard-to-understand areas

Additional Notes

This comment was marked as outdated.

gmertes

This comment was marked as resolved.

@github-project-automation github-project-automation bot moved this from Now In Progress to Under Review in Anemoi-dev Feb 27, 2025
@gmertes gmertes dismissed their stale review February 27, 2025 13:58

Derp. It's part of stdlib

@gmertes gmertes added the enhancement New feature or request label Feb 27, 2025
@gmertes gmertes merged commit 6821905 into ecmwf:main Feb 27, 2025
18 of 20 checks passed
@github-project-automation github-project-automation bot moved this from Under Review to Done in Anemoi-dev Feb 27, 2025
@gmertes
Copy link
Member

gmertes commented Feb 27, 2025

Thanks for your contribution!

@frazane frazane deleted the feature/metadata-get branch February 27, 2025 19:01
HCookie pushed a commit that referenced this pull request Mar 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributor enhancement New feature or request
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants