valid_dump_dir and train_dump_dir can be None. But it enforces type conversion as Path(...).
Quick fix would be something like train_dump_dir = Path(train_dump_dir) if train_dump_dir is not None else None.
Basic environments:
Current codebase will have this problem regardless of version.
Task information:
ESPnet-EZ
To Reproduce
Feed None to dump_dir, and dataset object to train_dataset.
Error logs
Traceback (most recent call last):
File "/ocean/projects/cis240125p/vtiwari2/homework/espnet_tutorial_f2024.py", line 82, in <module>
trainer = ez.Trainer(
File "/ocean/projects/cis240125p/vtiwari2/espnet/espnetez/trainer.py", line 197, in __init__
train_dump_dir = Path(train_dump_dir)
File "/jet/home/vtiwari2/miniconda3/envs/espnet/lib/python3.9/pathlib.py", line 1082, in __new__
self = cls._from_parts(args, init=False)
File "/jet/home/vtiwari2/miniconda3/envs/espnet/lib/python3.9/pathlib.py", line 707, in _from_parts
drv, root, parts = self._parse_args(args)
File "/jet/home/vtiwari2/miniconda3/envs/espnet/lib/python3.9/pathlib.py", line 691, in _parse_args
a = os.fspath(a)
TypeError: expected str, bytes or os.PathLike object, not NoneType
Describe the bug
valid_dump_dir
andtrain_dump_dir
can be None. But it enforces type conversion asPath(...)
.train_dump_dir = Path(train_dump_dir) if train_dump_dir is not None else None
.Basic environments:
Task information:
To Reproduce
Error logs