def _get_series_outputs(series_config: SeriesConfig) -> Dict[str, str]:
"""Get paths to series outputs from the dataset keyword argument specs.
Output file for a series named 'xxx' is specified by parameter 's_xxx_out'
Arguments:
series_config: A dictionary containing the dataset keyword argument
specs.
Returns:
A dictionary which maps serie names to the paths for their output
files.
"""
outputs = {}
for key, value in series_config.items():
matcher = SERIES_OUTPUT.match(key)
if matcher:
name = matcher.group(1)
if not isinstance(value, str):
raise ValueError(
"Output path for '{}' series must be a string, was {}.".
format(name, type(value)))
outputs[name] = cast(str, value)
return outputs
评论列表
文章目录