You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After importing the libraries, CUDA is initialized, which means that running notebook_launcher results in a ValueError.
print(f"{torch.cuda.is_initialized()}")
from fastai.distributed import *
from fastai.vision.all import *
from fastai.vision.models.xresnet import *
from accelerate import notebook_launcher
from accelerate.utils import write_basic_config
print(f"{torch.cuda.is_initialized()}")
Prints
False
True
Which results in the following error, when running notebook_launcher():
ValueError: To launch a multi-GPU training from your notebook, you need to avoid running any instruction using torch.cuda in any cell. Restart your notebook and make sure no cells use any CUDA function.
After importing the libraries, CUDA is initialized, which means that running notebook_launcher results in a ValueError.
Prints
Which results in the following error, when running notebook_launcher():
ValueError: To launch a multi-GPU training from your notebook, you need to avoid running any instruction using
torch.cudain any cell. Restart your notebook and make sure no cells use any CUDA function.
Documentation (https://docs.fast.ai/tutorial.distributed.html) could be made clearer to explain how/where to import libraries to avoid throwing this error.
The text was updated successfully, but these errors were encountered: