Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Race condition in downloads when running multiple jobs (manifests as 'file not found') #81

Closed
ianandersonlol opened this issue Sep 27, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@ianandersonlol
Copy link

Hi! Truly truly amazing release. Congratulations!

I've been running into some issues when running multiple folds in parallel some of them fail with this error. Any ideas what I might try? it seems to not do this when running multipel

Traceback (most recent call last):
  File "/aian/scripts/Chai/run_chai.py", line 25, in <module>
    output_paths = run_inference(
                   ^^^^^^^^^^^^^^
  File "/software/envs/chai/lib/python3.11/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/software/envs/chai/lib/python3.11/site-packages/chai_lab/chai1.py", line 271, in run_inference
    chains = load_chains_from_raw(fasta_inputs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/software/envs/chai/lib/python3.11/site-packages/chai_lab/data/dataset/inference_dataset.py", line 164, in load_chains_from_raw
    conformer_generator = RefConformerGenerator()
                          ^^^^^^^^^^^^^^^^^^^^^^^
  File "/software/envs/chai/lib/python3.11/site-packages/chai_lab/data/sources/rdkit.py", line 58, in __init__
    conformers_cache_file = paths.cached_conformers.get_path().as_posix()
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/software/envs/chai/lib/python3.11/site-packages/chai_lab/utils/paths.py", line 51, in get_path
    download(self.url, path=self.path)
  File "/software/envs/chai/lib/python3.11/site-packages/chai_lab/utils/paths.py", line 39, in download
    tmp_path.rename(path)
  File "/software/envs/chai/lib/python3.11/pathlib.py", line 1175, in rename
    os.rename(self, target)
FileNotFoundError: [Errno 2] No such file or directory: '/software/envs/chai/lib/python3.11/site-packages/downloads/conformers_v1.download_tmp' -> '/software/envs/chai/lib/python3.11/site-packages/downloads/conformers_v1.apkl'
@arogozhnikov
Copy link
Contributor

hi Ian,

thx for reporting, this part of code is not protected from race conditions, will fix

@arogozhnikov arogozhnikov added the bug Something isn't working label Sep 27, 2024
@arogozhnikov arogozhnikov changed the title file not found error when running multiple jobs Race condition in downloads when running multiple jobs Sep 29, 2024
@arogozhnikov arogozhnikov changed the title Race condition in downloads when running multiple jobs Race condition in downloads when running multiple jobs (manifests as 'file not found') Sep 29, 2024
@arogozhnikov
Copy link
Contributor

fixed in #114 (install new version from github!)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants