Skip to content

Commit

Permalink
Ensure path exists, before writing dataset config file
Browse files Browse the repository at this point in the history
  • Loading branch information
Ilya Isaev committed Jan 8, 2025
1 parent 2d95165 commit f662807
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions s3torchbenchmarking/src/s3torchbenchmarking/datagen.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ def parse_human_readable_bytes(
def write_dataset_config(disambiguator: str, dataset_cfg: Dict[str, Any]):
current_dir = os.getcwd()
cfg_path = Path(current_dir) / "conf" / "dataset" / f"{disambiguator}.yaml"
cfg_path.parent.mkdir(parents=True, exist_ok=True)
with open(cfg_path, "w") as outfile:
yaml.dump(dataset_cfg, outfile, default_flow_style=False)
click.echo(f"Dataset Configuration created at: {cfg_path}")
Expand Down

0 comments on commit f662807

Please sign in to comment.