diff --git a/neural_lam/datastore/__init__.py b/neural_lam/datastore/__init__.py index 901841db..8bda69c0 100644 --- a/neural_lam/datastore/__init__.py +++ b/neural_lam/datastore/__init__.py @@ -1,10 +1,10 @@ # Local from .mdp import MDPDatastore # noqa -from .npyfiles import NpyFilesDatastore # noqa +from .npyfilesmeps import NpyFilesDatastoreMEPS # noqa DATASTORES = dict( mdp=MDPDatastore, - npyfiles=NpyFilesDatastore, + npyfilesmeps=NpyFilesDatastoreMEPS, ) diff --git a/neural_lam/datastore/npyfiles/__init__.py b/neural_lam/datastore/npyfiles/__init__.py deleted file mode 100644 index 3bf6fadb..00000000 --- a/neural_lam/datastore/npyfiles/__init__.py +++ /dev/null @@ -1,2 +0,0 @@ -# Local -from .store import NpyFilesDatastore # noqa diff --git a/neural_lam/datastore/npyfilesmeps/__init__.py b/neural_lam/datastore/npyfilesmeps/__init__.py new file mode 100644 index 00000000..397a5075 --- /dev/null +++ b/neural_lam/datastore/npyfilesmeps/__init__.py @@ -0,0 +1,2 @@ +# Local +from .store import NpyFilesDatastoreMEPS # noqa diff --git a/neural_lam/datastore/npyfiles/config.py b/neural_lam/datastore/npyfilesmeps/config.py similarity index 100% rename from neural_lam/datastore/npyfiles/config.py rename to neural_lam/datastore/npyfilesmeps/config.py diff --git a/neural_lam/datastore/npyfiles/create_parameter_weights.py b/neural_lam/datastore/npyfilesmeps/create_parameter_weights.py similarity index 99% rename from neural_lam/datastore/npyfiles/create_parameter_weights.py rename to neural_lam/datastore/npyfilesmeps/create_parameter_weights.py index bdf54011..81baffe5 100644 --- a/neural_lam/datastore/npyfiles/create_parameter_weights.py +++ b/neural_lam/datastore/npyfilesmeps/create_parameter_weights.py @@ -163,7 +163,7 @@ def main(): rank = get_rank() world_size = get_world_size() datastore = init_datastore( - datastore_kind="npyfiles", config_path=args.datastore_config + datastore_kind="npyfilesmeps", config_path=args.datastore_config ) if distributed: diff --git a/neural_lam/datastore/npyfiles/store.py b/neural_lam/datastore/npyfilesmeps/store.py similarity index 99% rename from neural_lam/datastore/npyfiles/store.py rename to neural_lam/datastore/npyfilesmeps/store.py index 03160599..10cb374d 100644 --- a/neural_lam/datastore/npyfiles/store.py +++ b/neural_lam/datastore/npyfilesmeps/store.py @@ -37,7 +37,7 @@ def _load_np(fp, add_feature_dim): return arr -class NpyFilesDatastore(BaseCartesianDatastore): +class NpyFilesDatastoreMEPS(BaseCartesianDatastore): __doc__ = f""" Represents a dataset stored as numpy files on disk. The dataset is assumed to be stored in a directory structure where each sample is stored in a diff --git a/neural_lam/weather_dataset.py b/neural_lam/weather_dataset.py index f0251224..e7122e9d 100644 --- a/neural_lam/weather_dataset.py +++ b/neural_lam/weather_dataset.py @@ -117,7 +117,8 @@ def _sample_time(self, da, idx, n_steps: int, n_timesteps_offset: int = 0): n_steps : int The number of time steps to include in the sample. n_timestep_offset : int - A number of timesteps to use as offset from the start time of the slice + A number of timesteps to use as offset from the start time of the + slice """ # selecting the time slice if self.datastore.is_forecast: @@ -455,7 +456,7 @@ def __init__( self.test_dataset = None if num_workers > 0: # default to spawn for now, as the default on linux "fork" hangs - # when using dask (which the npyfiles datastore uses) + # when using dask (which the npyfilesmeps datastore uses) self.multiprocessing_context = "spawn" else: self.multiprocessing_context = None diff --git a/tests/conftest.py b/tests/conftest.py index a5440275..12854a0e 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -60,7 +60,7 @@ def download_meps_example_reduced_dataset(): DATASTORES_EXAMPLES = dict( mdp=(DATASTORE_EXAMPLES_ROOT_PATH / "mdp" / "danra.example.yaml"), - npyfiles=download_meps_example_reduced_dataset(), + npyfilesmeps=download_meps_example_reduced_dataset(), )