zenml-io / zenml

ZenML πŸ™: The bridge between ML and Ops. https://zenml.io.
https://zenml.io
Apache License 2.0
4.08k stars 442 forks source link

[BUG]: permission error #2990

Open Aadik1ng opened 2 months ago

Aadik1ng commented 2 months ago

System Information

CURRENT STACK

Name: flux ID: a89e5736-d4e2-4bba-b585-ca3af1332884 User: aadik1ng / ad821108-896e-4929-ac50-5b9da8d83a58 Workspace: default / d9df48d2-a4ca-4106-b9a3-6ae7316bd453

ORCHESTRATOR: default

Name: default ID: 86236dca-0c93-4d69-a486-2f37db1f0d0f Type: orchestrator Flavor: local Configuration: {} Workspace: default / d9df48d2-a4ca-4106-b9a3-6ae7316bd453

ARTIFACT_STORE: flux_store

Name: flux_store ID: 332a1d67-40b4-47cf-bd9b-e9a66c5a9b63 Type: artifact_store Flavor: local Configuration: {'path': 'D:\Ailusion\data'} User: aadik1ng / ad821108-896e-4929-ac50-5b9da8d83a58 Workspace: default / d9df48d2-a4ca-4106-b9a3-6ae7316bd453

What happened?

PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\Users\aadit\AppData\Local\Temp\zenml-temp-6456fj4v\image_file.PNG'

Reproduction steps

1Just setup your pipeline 2. 3. ...

Relevant log output

(ailusion) PS D:\Ailusion> python .\src\run_merge_images.py .\params.yaml
Initiating a new run for the pipeline: image_merge_pipeline.
Executing a new run.
Using user: aadik1ng
Using stack: default
  orchestrator: default
  artifact_store: default
Dashboard URL for Pipeline Run: http://localhost:8080/runs/d3754f83-f7ad-4635-bf50-c43bdc92064d
Using cached version of load_data.
Step load_data has started.
Step merge_images has started.
Exception ignored in: <finalize object at 0x5d9a7960; dead>
Traceback (most recent call last):
  File "C:\Program Files\Python311\Lib\weakref.py", line 590, in __call__
    return info.func(*info.args, **(info.kwargs or {}))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\Python311\Lib\tempfile.py", line 933, in _cleanup
    cls._rmtree(name, ignore_errors=ignore_errors)
  File "C:\Program Files\Python311\Lib\tempfile.py", line 929, in _rmtree
    _shutil.rmtree(name, onerror=onerror)
  File "C:\Program Files\Python311\Lib\shutil.py", line 787, in rmtree
    return _rmtree_unsafe(path, onerror)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\Python311\Lib\shutil.py", line 634, in _rmtree_unsafe
    onerror(os.unlink, fullname, sys.exc_info())
  File "C:\Program Files\Python311\Lib\tempfile.py", line 893, in onerror
    _os.unlink(path)
PermissionError: [WinError 32] The process cannot access the file because it is being used 
by another process: 'C:\\Users\\aadit\\AppData\\Local\\Temp\\zenml-temp-lz7cjzgt\\image_file.PNG'
Exception ignored in: <finalize object at 0x5f538f80; dead>
Traceback (most recent call last):
  File "C:\Program Files\Python311\Lib\weakref.py", line 590, in __call__
    return info.func(*info.args, **(info.kwargs or {}))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\Python311\Lib\tempfile.py", line 933, in _cleanup
    cls._rmtree(name, ignore_errors=ignore_errors)
  File "C:\Program Files\Python311\Lib\tempfile.py", line 929, in _rmtree
    _shutil.rmtree(name, onerror=onerror)
  File "C:\Program Files\Python311\Lib\shutil.py", line 787, in rmtree
    return _rmtree_unsafe(path, onerror)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\Python311\Lib\shutil.py", line 634, in _rmtree_unsafe
    onerror(os.unlink, fullname, sys.exc_info())
  File "C:\Program Files\Python311\Lib\tempfile.py", line 893, in onerror
    _os.unlink(path)
PermissionError: [WinError 32] The process cannot access the file because it is being used 
by another process: 'C:\\Users\\aadit\\AppData\\Local\\Temp\\zenml-temp-6456fj4v\\image_file.PNG'
Configuration loaded successfully.
Loading pipeline components...:  14%|β–ˆβ–ˆβ–ˆβ–Ž                   | 1/7 [00:00<00:01,  5.58it/s]You set `add_prefix_space`. The tokenizer needs to be converted from the slow tokenizers    
Loading pipeline components...:  71%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–      | 5/7 [00:01<00:00,  3.64it/s]
(ailusion) PS D:\Ailusion>
avishniakov commented 2 months ago

Hey @Aadik1ng , Can you post more details on the case? I see that you use the local artifact store 'D:\Ailusion\data', but is the code of merge_images and also any other relevant info, like custom materialized if any, etc. Thanks!