Skip to content

Conversation

@marvinborner
Copy link
Contributor

@marvinborner marvinborner commented Aug 18, 2023

Since the import uses a different function for torch 2.0, the arguments changed a bit. The function doesn't accept the checksums as before. I just removed it in this PR for now; this shouldn't be merged directly.

A better solution would probably be to use the new checksum arguments (SHA256) and remove support for torch <2 completely. But that's your decision I guess.

Edit: Some other arguments also changed.. Idk

@marvinborner marvinborner marked this pull request as draft August 18, 2023 10:55
@KinWaiCheuk
Copy link
Owner

Thank you for reporting this issue.
An alternative solution might be porting the old download_url function from torchaudio to here. I actually ported it to utils.py already.

def download_url(url: str,
download_folder: str,
filename: Optional[str] = None,
hash_value: Optional[str] = None,
hash_type: str = "sha256",
progress_bar: bool = True,
resume: bool = False) -> None:
"""Download file to disk.

And we can import it like this

from AudioLoader.utils import (
download_url,
extract_archive,
)

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 this pull request may close these issues.

2 participants