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

OSError in speechbrain.pretrained.fetching #893

Closed
BrownsugarZeer opened this issue Jul 25, 2021 · 3 comments
Closed

OSError in speechbrain.pretrained.fetching #893

BrownsugarZeer opened this issue Jul 25, 2021 · 3 comments

Comments

@BrownsugarZeer
Copy link

SpeechBrain really give me a big help, thanks.

OS: Win 10
Python version: 3.8.6

def fetch(
    filename,
    source,
    savedir="./pretrained_model_checkpoints",
    overwrite=False,
    save_filename=None,
    use_auth_token=False,
):
...
elif pathlib.Path(source).is_dir():
        # Interpret source as local directory path
        # Just symlink
        sourcepath = pathlib.Path(sourcefile).absolute()
        MSG = f"Fetch {filename}: Linking to local file in {str(sourcepath)}."
        logger.info(MSG)
        _missing_ok_unlink(destination)
        destination.symlink_to(sourcepath)
...

The following error occurred if the source is a valid directory path
OSError: [WinError 1314] A required privilege is not held by the client

The code destination.symlink_to(sourcepath) is a little inconvenient for Windows users, as requires to run with admin privileges because of some security considerations. I wonder if it is possible to switch to copying or any alternatives instead of symlinking in a future release.

@TParcollet
Copy link
Collaborator

Good point. I am not sure that it would be possible to find a solution that will suit all the existing OS. SpeechBrain has been designed for linux-based OS. @Gastron any idea?

@Gastron
Copy link
Collaborator

Gastron commented Aug 10, 2021

This is unfortunate. Still, personally I feel that since this can actually work on Windows, the permissions just need to be set right, we should probably keep it as it is for now. On a larger scale, this fetching functionality is in danger of becoming a mess, it tries to support so many different sources etc. We could reconsider this issue if we end up refactoring the whole functionality.

@Gastron
Copy link
Collaborator

Gastron commented Aug 23, 2021

Closing, I guess what I said above is the current plan for this.

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

No branches or pull requests

3 participants