pytorch / pytorch/benchmark

Permission Issue with installation.

Open
#1,983 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

windows
Dominant language
Python
Stars
1k
Forks
346
PR merge metrics
No merged PRs in 30d

Description

(python310) C:\Users\prs\work_projects\pytorch_benchmark>python install.py models phi_1_5
checking packages torch, torchvision, torchaudio are installed...OK
running setup for C:\Users\prs\work_projects\pytorch_benchmark\torchbenchmark\models\phi_1_5...Traceback (most recent call last):
File "C:\Users\prs\work_projects\pytorch_benchmark\install.py", line 60, in
success &= setup(models=args.models, verbose=args.verbose, continue_on_fail=args.continue_on_fail, test_mode=args.test_mode, allow_canary=args.canary)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\prs\work_projects\pytorch_benchmark\torchbenchmark_init_.py", line 153, in setup
success, errmsg, stdout_stderr = install_deps(model_path, verbose=verbose)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\prs\work_projects\pytorch_benchmark\torchbenchmark_init
.py", line 99, in _install_deps
os.remove(stdout_fpath)
PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\Users\prs\AppData\Local\Temp\tmpu2dkrtmn'

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing python install.py models phi_1_5 on Windows and read torchbenchmark/__init__.py, especially _install_deps and the cleanup at line 99. Trace how the temporary stdout file is created and used before os.remove runs. Done means the model setup no longer fails with the reported PermissionError.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, pytorch
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.