-
Notifications
You must be signed in to change notification settings - Fork 9
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
Bake
fails without MetadataCacheStorage
in config
#46
Comments
Good question, @derekocallaghan! Perhaps it's not always required, at which point we should hide it behind a conditional. I can see that perhaps Cache is also not always required. Will need some digging into the pangeo-forge-recipes codebase maybe? Or we can just make it optional and see if something fails? Would you feel like submitting a PR? :D |
Hi @yuvipanda, I've been looking through the
pattern = FilePattern(
make_url,
ConcatDim(name="time", keys=dates, nitems_per_file=NITEMS_PER_FILE),
) @property
def nitems_per_input(self) -> Dict[str, Union[int, None]]:
"""Dictionary mapping concat dims to number of items per file."""
nitems = {} # type: Dict[str, Union[int, None]]
for op in self.combine_dims:
if isinstance(op, ConcatDim):
if op.nitems_per_file:
nitems[op.name] = op.nitems_per_file
else:
nitems[op.name] = None
return nitems @property
def concat_sequence_lens(self) -> Dict[str, Optional[int]]:
"""Dictionary mapping concat dims to sequence lengths.
Only available if ``nitems_per_input`` is set on the dimension."""
return {
dim_name: (nitems * self.dims[dim_name] if nitems is not None else None)
for dim_name, nitems in self.nitems_per_input.items()
}
self.concat_dim = self.file_pattern.concat_dims[0]
self.cache_metadata = any(
[v is None for v in self.file_pattern.concat_sequence_lens.values()]
) It looks like the storage metadata cache location passed to |
Currently, the
Bake
command requiresMetadataCacheStorage
in the associated config. E.g.:pangeo-forge-orchestrator
:pangeo-forge-runner/tests/test_bake.py
Line 44 in 36380ff
If a config is used that doesn't require a metadata cache (e.g. the CCMP recipe doesn't require it, and appeared to run faster without it, at least locally), it fails as follows:
Here's where it's used in
Bake
:pangeo-forge-runner/pangeo_forge_runner/commands/bake.py
Line 100 in 4c76cb5
Is a metadata cache always required, or can it be configurable e.g. via the recipe or
meta.yaml
?The text was updated successfully, but these errors were encountered: