question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Pretrained.from_hparams() failing on windows when non admin

See original GitHub issue

The following code is failing on windows with non-admin rights (not a big issue but sadly a “standard” case in lots of “big” companies) due to symlinks.

EncoderClassifier.from_hparams(
  source=r"C:\path\to\pretrained\model",
  savedir="./tmp",
  overrides={"pretrained_path": r"C:\path\to\pretrained\model"})

I fixed it locally by copying models to savedir instead of making a symlink (fetching.py:L102), BUT I will not submit it as a fix.

try:
  destination.symlink_to(sourcepath)
except:
  import shutil
  shutil.copyfile(sourcepath, destination)

I can start working on local loading feature in a PR if you’re interested. When loading from local, we could even avoid copying or symlinking directories and loading directly from the local folder for example.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
Gastroncommented, Nov 24, 2021

Yes, this is a known issue, see for instance #893. Thanks for a new workaround idea! At the moment we don’t plan to change this implementation just for Windows users who cannot run with the right permissions. However, this might get solved as a side product if we decide to move away from symlinks to real copies - which seems to be behaviour that multiple users expect.

0reactions
padmalcomcommented, Oct 30, 2022

FYI this issue still exists for Tacotron2.from_hparams on Windows.

Read more comments on GitHub >

github_iconTop Results From Across the Web

No admin privileges in Windows 10 - can't install software
No admin privileges in Windows 10 - can't install software. I have the same problem as is described here: No administrator account and...
Read more >
Creating computer obect with non admin user returing ...
I have tried with newly created user account with newly created organizationalUnit to create Computer in OU. But it is failing with ...
Read more >
You receive an "Administrators only" error message in ...
You receive an "Administrators only" error message in Windows XP when you try to visit the Windows Update Web site or the Microsoft...
Read more >
You receive one or more error messages when the system ...
Describes a problem where you receive one or more error messages when Windows Update or Microsoft Update is disabled by the system administrator....
Read more >
Non admin user can't install driver from shared printer
I am running into a problem where non admin user cannot install the shared printer. If I use admin user there is no...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found