[Hackathon 7th] 修复不存在 *.npy
文件的空文件夹导致的数据遍历错误
#3948
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR types
Bug fixes
PR changes
Others
Describe
修复不存在
*.npy
文件的空文件夹导致的数据遍历错误。MultiSpeakerMelDataset
初始化的时候,如果
list(speaker_dir.glob("*.npy"))
为空 list,即,speaker_dir
文件夹中没有npy
数据(数据集 dump 的时候,没有生成 npy 文件),则在后续遍历的时候跳出遍历 ~
而,
_DataLoaderIterMultiProcess
初始化的时候,由于上面
self._try_put_indices()
报错,导致其实例没有初始化self._shutdown
属性,从而报错综上,这里在
MultiSpeakerMelDataset
初始化的时候,便将空数据的文件夹过滤掉,命令可正常执行@zxcd @Liyulingyue @enkilee @GreatV @yinfan98