WinError 1314 when trying to do a grid search

Hi,
I’m having trouble when trying to do a search with guild on a Windows 10 machine.

I took the example code fromt the tutorial

import numpy as np

# Hyperparameters
x = 0.1
noise = 0.1

# Simulated training loss
loss = (np.sin(5 * x) * (1 - np.tanh(x ** 2)) + np.random.randn() * noise)

print("loss: %f" % loss)

I’m running it from console with

guild run test.py x="[1,0,-1]"

When executing i get an error:

Traceback (most recent call last):
  File "c:\users\x\appdata\local\programs\python\python38\lib\runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "c:\users\x\appdata\local\programs\python\python38\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "C:\Users\x\AppData\Roaming\Python\Python38\site-packages\guild\batch_main.py", line 41, in <module>
    main()
  File "C:\Users\x\AppData\Roaming\Python\Python38\site-packages\guild\batch_main.py", line 27, in main
    batch_util.handle_trials(batch_run, trials)
  File "C:\Users\x\AppData\Roaming\Python\Python38\site-packages\guild\batch_util.py", line 73, in handle_trials
    _run_trials(batch_run, trials)
  File "C:\Users\x\AppData\Roaming\Python\Python38\site-packages\guild\batch_util.py", line 135, in _run_trials
    trial_runs = _init_trial_runs(batch_run, trials)
  File "C:\Users\x\AppData\Roaming\Python\Python38\site-packages\guild\batch_util.py", line 144, in _init_trial_runs
    return [init_trial_run(batch_run, trial) for trial in trials]
  File "C:\Users\x\AppData\Roaming\Python\Python38\site-packages\guild\batch_util.py", line 144, in <listcomp>
    return [init_trial_run(batch_run, trial) for trial in trials]
  File "C:\Users\x\AppData\Roaming\Python\Python38\site-packages\guild\batch_util.py", line 149, in init_trial_run
    _link_to_trial(batch_run, run)
  File "C:\Users\x\AppData\Roaming\Python\Python38\site-packages\guild\batch_util.py", line 168, in _link_to_trial
    os.symlink(rel_trial_path, trial_link)
OSError: [WinError 1314] A required privilege is not held by the client.

 '..\\749cba372c474a1598aac11e2d4fb902' -> 'C:\\Users\\x\\Anaconda3\\.guild\\runs\\045f73f210fb463f814f3334fd30825d\\749cba372c474a1598aac11e2d4fb902'

I don’t have administrator permissions on the machine and I’m probably not going to get them.

Installing it via pip with --User flag doesnt fix it, either.

Can I fix this somehow without having to run as admin?

Hello! Unfortunately Guild requires symbolic link permissions. If you can’t run as Admin you’ll need to get those permissions. That’s a pain I realize — I wish this was easier. I would reach out to your system admin to get those setup.

Hi! Are there any updates with respect to this? What are the functionalities that cannot be used without admin rights? Is there a limited suit of the package that can be used without those rights? Thanks in advance!

The issue is with symbolic links on Windows. The Windows security policy wrt to symbolic links is really painful - not only do you need explicit rights to create them, you need to run with elevated privileges on top of that.

The gist is that you need to run Guild commands as Admin whenever those commands generate symbolic links. These are created by default when resolving operation dependencies (run files) or when explicitly resolving project files as links.

When running on Windows I just always run as Admin.