mim icon indicating copy to clipboard operation
mim copied to clipboard

add `model_info_local` argument to `download` function

Open fcakyon opened this issue 4 years ago • 8 comments

Motivation

We want to parse model info from remote when using download function. Fixes https://github.com/open-mmlab/mim/issues/51

Modification

add model_info_local argument to download function.

BC-breaking (Optional)

Previous usage is not affected.

fcakyon avatar Jun 24 '21 11:06 fcakyon

Thanks for your contribution. But why we need download a checkpoint from remote GitHub.

zhouzaida avatar Jun 24 '21 12:06 zhouzaida

Thanks for your contribution. But why we need download a checkpoint from remote GitHub.

@zhouzaida because model_zoo.yml file may not be available at local.

fcakyon avatar Jun 24 '21 12:06 fcakyon

got it

zhouzaida avatar Jun 24 '21 12:06 zhouzaida

Got it. Please add an unittest. Another thing is that the config file can not be successfully obtained from remote because the config is parsed from the local repo.

zhouzaida avatar Jun 24 '21 12:06 zhouzaida

Got it. Please add an unittest. Another thing is that the config file can not be obtained from remote because the config is parsed from the local repo.

@zhouzaida it is also an issue. wheel package of mmdetection does not include configs directory and mim gives an error when trying to load config from local. I have created a separate issue for that: https://github.com/open-mmlab/mim/issues/50

fcakyon avatar Jun 24 '21 12:06 fcakyon

@zhouzaida added tests for model_info_local=False.

fcakyon avatar Jun 24 '21 13:06 fcakyon

hi @fcakyon , the following lines should be moved. In addition, we download checkpoints and configs by default so we can provide two options to only download one of them https://github.com/open-mmlab/mim/blob/eb35cceb8411f3767ffa374a462cf19ccc083e50/mim/commands/download.py#L63-L71

zhouzaida avatar Jul 27 '21 08:07 zhouzaida

Codecov Report

:exclamation: No coverage uploaded for pull request base (main@1bb17cd). Click here to learn what that means. The diff coverage is n/a.

:exclamation: Current head eb35cce differs from pull request most recent head 74e8203. Consider uploading reports for the commit 74e8203 to get more accurate results Impacted file tree graph

@@           Coverage Diff           @@
##             main      #49   +/-   ##
=======================================
  Coverage        ?   63.81%           
=======================================
  Files           ?       21           
  Lines           ?     1564           
  Branches        ?      347           
=======================================
  Hits            ?      998           
  Misses          ?      431           
  Partials        ?      135           
Flag Coverage Δ
unittests 63.81% <0.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.


Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 1bb17cd...74e8203. Read the comment docs.

codecov-commenter avatar Jul 27 '21 08:07 codecov-commenter