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

Fixes #235 defensive generate workers #267

Merged
merged 2 commits into from
May 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions icenet/data/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def __init__(self,
self._counts = self._config["counts"]
self._dtype = getattr(np, self._config["dtype"])
self._loader_config = self._config["loader_config"]
self._generate_workers = self._config["generate_workers"]
self._generate_workers = self._config.get("generate_workers", 4)
self._n_forecast_days = self._config["n_forecast_days"]
self._num_channels = self._config["num_channels"]
self._shape = tuple(self._config["shape"])
Expand Down Expand Up @@ -148,7 +148,7 @@ def get_data_loader(self,
if n_forecast_days is None:
n_forecast_days = self._config["n_forecast_days"]
if generate_workers is None:
generate_workers = self._config["generate_workers"]
generate_workers = self._config.get("generate_workers", 4)
loader = IceNetDataLoaderFactory().create_data_loader(
"dask", # This will load the `DaskMultiWorkerLoader` class.
self.loader_config,
Expand Down