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
Cuda becomes unavailable and script is excuted by multiple times #2622
Comments
Can you check This means something is up with your torch build and/or cuda drivers. And yes, print will be ran |
You also have multiple envs active, which can lead to weird issues like this (been there/seen it before). Do a |
@muellerzr Thanks for your quick response! |
My best guess is you installed accelerate in another env, and it's messed up your bash scripts, so How to check: which accelerate launch It should point to something equivalent to: /.../mycondalocation/envs/meshgpt/bin/accelerate |
Let me know if it doesn't |
Should I reinstall accelerate or the whole environment? |
I'd uninstall accelerate on your base environment first (without conda), which seems to stem the issue. Then reinstall it in the conda env using |
@muellerzr Thanks for your help! Problems in this issue and issue2621 are resolved! |
Fantastic! Glad to hear it @MagicianWu :) |
System Info
Information
Tasks
no_trainer
script in theexamples
folder of thetransformers
repo (such asrun_no_trainer_glue.py
)Reproduction
import torch
from accelerate import Accelerator
import os
def main():
accelerator = Accelerator()
print(torch.cuda.is_available())
if name == "main":
main()
Executed with command:
accelerate launch accelerate_test.py
When executed with command:
python accelerate_test.py
Expected behavior
Cuda should be available while using accelerate.
And based on my understanding, print function should not be excuted by multiple times?
The text was updated successfully, but these errors were encountered: