Open anna-richter opened 1 year ago
This seems relevant:
https://stackoverflow.com/questions/6416782/what-is-namedtemporaryfile-useful-for-on-windows
Especially because of these lines here: https://github.com/mila-iqia/milatools/blob/1e5f211abe94ad2abdc3d10143bb5d26f08c33ea/milatools/cli/remote.py#L175-L178
It seems like self.put
uses the Connection
object from fabric
, which opens the file a second time. This behaviour is different on Windows, apparently we're not guaranteed that the file can be opened multiple times within the scope (:question: :exclamation: )
Update: Using WSL on Windows (instead of PowerShell) is a way to step around this issue.
Make sure you can reproduce the issue with the latest version available
What command did you run?
mila code /network/scratch/a/anna.richter/ --persist --alloc --gres=gpu:1 --partition=long --mem=32G --time=0-10:00:00
Describe the bug
A clear and concise description of what the bug is. If there is an error traceback, please paste it here.
The error solely occurs when using the --persist flag
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Windows 10 pro Version 22H2
Additional context
Add any other context about the problem here.