Skip to content

Commit

Permalink
cleanup for datastore examples
Browse files Browse the repository at this point in the history
  • Loading branch information
leifdenby committed Jul 26, 2024
1 parent 6fe19ac commit fe65a4d
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 18 deletions.
14 changes: 1 addition & 13 deletions neural_lam/datastore/npyfiles/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class Projection:
kwargs: A dictionary of keyword arguments specific to the projection type.
"""

class_name: str # = field(metadata={'data_key': 'class'})
class_name: str
kwargs: Dict[str, Any]


Expand Down Expand Up @@ -56,15 +56,3 @@ class NpyDatastoreConfig(dataclass_wizard.YAMLWizard):
dataset: Dataset
grid_shape_state: List[int]
projection: Projection


class NpyConfig:
"""Class for loading configuration files.
This class loads a configuration file and provides a way to access
its values as attributes.
"""

def num_data_vars(self):
"""Return the number of data variables for a given key."""
return len(self.dataset.var_names)
8 changes: 3 additions & 5 deletions neural_lam/train_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,14 @@ def main(input_args=None):
description="Train or evaluate NeurWP models for LAM"
)
parser.add_argument(
"--datastore-kind",
"datastore-kind",
type=str,
choices=["multizarr", "npyfiles", "mllam"],
default="multizarr",
help="Kind of datastore to use (default: multizarr)",
help="Kind of datastore to use",
)
parser.add_argument(
"--datastore-path",
"datastore-path",
type=str,
default="tests/datastore_configs/multizarr",
help="The root path for the datastore",
)
parser.add_argument(
Expand Down
File renamed without changes.
File renamed without changes.

0 comments on commit fe65a4d

Please sign in to comment.