mmsegmentation icon indicating copy to clipboard operation
mmsegmentation copied to clipboard

Missing instruction to install mmengine.

Open saratrajput opened this issue 2 years ago • 2 comments

Thanks for your error report and we appreciate it a lot.

Checklist

  1. I have searched related issues but cannot get the expected help.
  2. The bug has not been fixed in the latest version.

Describe the bug In the getting started docs, when I try to download the pspnet config and checkpoint files, I get the following error:

... line 93, in download
    raise ImportError(highlighted_error(msg))
ImportError: Please install mmengine to use the download command.

Reproduction

  1. What command or script did you run?

    mim download mmsegmentation --config pspnet_r50-d8_512x1024_40k_cityscapes --dest .
    
  2. Did you make any modifications on the code or config? Did you understand what you have modified? -NA

  3. What dataset did you use? -NA Environment

  4. Please run python mmseg/utils/collect_env.py to collect necessary environment information and paste it here.

  5. You may add addition that may be helpful for locating the problem, such as

    • How you installed PyTorch [e.g., pip, conda, source]
    • Other environment variables that may be related (such as $PATH, $LD_LIBRARY_PATH, $PYTHONPATH, etc.)

Error traceback

... line 93, in download
    raise ImportError(highlighted_error(msg))
ImportError: Please install mmengine to use the download command.

Bug fix

It can be fixed with adding the following command before downloading the config and checkpoint files:

mim install mmengine

I've made a small PR to fix the docs if you'd like to use it. PR: https://github.com/open-mmlab/mmsegmentation/pull/2073

saratrajput avatar Sep 15 '22 02:09 saratrajput

@ice-tong please have a look

MeowZheng avatar Sep 15 '22 06:09 MeowZheng

Hi @saratrajput, thanks for the feedback.

Since mmengine is an extra requirement of mim download, you should install it manually.

I totally agree with you that the error message would be better if it tells the user how to install mmengine. If you are interested, a PR that refines the error message in mim is welcome. ^_^

p.s. mim install mmengine equivalent to pip install mmengine

ice-tong avatar Sep 15 '22 06:09 ice-tong

@ice-tong Thanks. I made a PR to add the instructions to the README, but this sounds better. Let me make a small PR to add this to the error message.

saratrajput avatar Sep 22 '22 00:09 saratrajput