facebookresearch/d2go

cannot import name 'shared_memory' from 'multiprocessing'

Natriumpikant opened this issue ยท 1 comments

Instructions To Reproduce the ๐Ÿ› Bug:

  1. Full runnable code or full changes you made:
<
!pip3 install --pre torch torchvision -f https://download.pytorch.org/whl/nightly/cu102/torch_nightly.html
!python -m pip install 'git+https://github.com/facebookresearch/detectron2.git'
!python -m pip install 'git+https://github.com/facebookresearch/mobile-vision.git'
!git clone https://github.com/facebookresearch/d2go
%cd d2go
!python -m pip install .
%cd ..>
  1. What exact command you run:

from d2go.runner import GeneralizedRCNNRunner

  1. Full logs or other relevant observations:
<ImportError                               Traceback (most recent call last)
[<ipython-input-12-56fd20cf67bc>](https://localhost:8080/#) in <module>
----> 1 from d2go.runner import GeneralizedRCNNRunner
      2 from d2go.model_zoo import model_zoo
      3 from d2go.utils.demo_predictor import DemoPredictor
      4 
      5 def prepare_for_launch():

4 frames
[/usr/local/lib/python3.7/dist-packages/mobile_cv/torch/utils_pytorch/shareables.py](https://localhost:8080/#) in <module>
      5 import os
      6 import pickle
----> 7 from multiprocessing import shared_memory
      8 from typing import Any, List, Tuple, Union
      9 

ImportError: cannot import name 'shared_memory' from 'multiprocessing' (/usr/lib/python3.7/multiprocessing/__init__.py)>
  1. please simplify the steps as much as possible so they do not require additional resources to run, such as a private dataset.

Runtime - Standard Google Colab CPU

It requires python3.8+, now both mobile_cv and d2go would require that.