Hi,
I’m trying to use fastai.vision on google colab. When I try:
import from fastai.vision *
I get the following error:
ImportError: cannot import name '_update_worker_pids'
Here is the last part of the error trace:
2 import torch
3 import torch.multiprocessing as multiprocessing
----> 4 from torch._C import _set_worker_signal_handlers, _update_worker_pids, \
5 _remove_worker_pids, _error_if_any_worker_fails
6 from . import SequentialSampler, RandomSampler, BatchSampler
And this is how I’m installing torch v1/fastai v1:
# http://pytorch.org/
from os.path import exists
from wheel.pep425tags import get_abbr_impl, get_impl_ver, get_abi_tag
platform = '{}{}-{}'.format(get_abbr_impl(), get_impl_ver(), get_abi_tag())
cuda_output = !ldconfig -p|grep cudart.so|sed -e 's/.*\.\([0-9]*\)\.\([0-9]*\)$/cu\1\2/'
accelerator = cuda_output[0] if exists('/dev/nvidia0') else 'cpu'
!pip3 install torch_nightly -f https://download.pytorch.org/whl/nightly/{accelerator}/torch_nightly.html
import torch
print(torch.__version__)
print(torch.cuda.is_available())
print(torch.backends.cudnn.enabled)
!pip3 install fastai
Thanks for any advice!