Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LilcomChunkyWriter replaces storage_path if it contains "." #1183

Closed
chiiyeh opened this issue Oct 13, 2023 · 2 comments · Fixed by #1192
Closed

LilcomChunkyWriter replaces storage_path if it contains "." #1183

chiiyeh opened this issue Oct 13, 2023 · 2 comments · Fixed by #1192

Comments

@chiiyeh
Copy link
Contributor

chiiyeh commented Oct 13, 2023

Hi! I realize that when i use storage_path with . like "gigaspeech_overlap_0.3_TRAIN" it will end up becoming saving to the file "gigaspeech_overlap_0.lca" instead of "gigaspeech_overlap_0.3_TRAIN.lca" as expected.
It seems to be due to this line:

self.storage_path_ = Path(storage_path).with_suffix(".lca")

which replaces the words after "." with lca instead of appending.
I saw quite a few other places using .with_suffix as well so will have the same issue as well.

@desh2608
Copy link
Collaborator

Good catch. We should probably change those to:

p = Path(storage_path)
self.storage_path_ = p.with_suffix(p.suffix + ".lca")

@pzelasko
Copy link
Collaborator

+1, could you submit a PR? Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants