Enable creating graph from datastore YAML file#128
Closed
matschreiner wants to merge 11 commits intomllam:mainfrom
Closed
Enable creating graph from datastore YAML file#128matschreiner wants to merge 11 commits intomllam:mainfrom
matschreiner wants to merge 11 commits intomllam:mainfrom
Conversation
Author
Collaborator
|
As we are working towards #83, I am not sure how to prioritize updates to the current |
Collaborator
|
Thanks @matschreiner. Following up on @joeloskarsson's earlier suggestion - closing this in favour of the weather-model-graphs migration in #384 / #596, since |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds support for creating graphs directly from datastores. The current approach introduces unnecessary complexity by requiring neural_lam_config, even though graph creation only needs a datastore, and the sole function of the neural_lam_config in this context is to be the owner of the datastore path.
The first positional argument in
still refers to a neurallam_config and if both datastore and neurallam_config are specified, neurallam_config takes precedence, ensuring this is a non-breaking change. However, I propose deprecating neurallam_config usage in the future.
Imports are now explicit instead of relative, allowing create_graph.py to be executed both as a standalone script (
python create_graph.py) and as a module (python -m neural_lam.create_graph).This change improves usability, as some users feel more confident running scripts the traditional way.
New Script Arguments:
--datastore: Path to the datastore.
--datastore_type: Type of datastore (defaults to mdp). The script will throw an error if an invalid type is provided.
The change doesn't introduce any new dependencies to the code.
Checklist before requesting a review
pullwith--rebaseoption if possible).Checklist for reviewers
Each PR comes with its own improvements and flaws. The reviewer should check the following:
Author checklist after completed review
reflecting type of change (add section where missing):
Checklist for assignee