Skip to content

Commit

Permalink
Fixed tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
mmcdermott committed Aug 29, 2024
1 parent 24b8eeb commit 5f38154
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
7 changes: 4 additions & 3 deletions src/MEDS_transforms/mapreduce/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -453,10 +453,11 @@ def shard_iterator(
>>> includes_only_train
False
If it can't find any files, it will return an empty list:
If it can't find any files, it will error:
>>> fps, includes_only_train = shard_iterator(cfg)
>>> fps
[]
Traceback (most recent call last):
...
FileNotFoundError: No shards found in ... with suffix .parquet. Directory contents:...
"""

input_dir = Path(cfg.stage_cfg.data_input_dir)
Expand Down
6 changes: 3 additions & 3 deletions src/MEDS_transforms/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,8 +242,8 @@ def fix_str_for_path(s: str) -> str:
return s.replace(" ", "_").replace("/", ".")


if __name__ == "__main__":
OmegaConf.register_new_resolver("load_yaml_file", load_yaml_file, replace=False)
OmegaConf.register_new_resolver("fix_str_for_path", fix_str_for_path, replace=False)
OmegaConf.register_new_resolver("load_yaml_file", load_yaml_file, replace=False)
OmegaConf.register_new_resolver("fix_str_for_path", fix_str_for_path, replace=False)

if __name__ == "__main__":
main()

0 comments on commit 5f38154

Please sign in to comment.