Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feat] Support specify gpu for testing and training with gpu-id instead of gpu-ids and gpus #756

Merged
merged 5 commits into from
Jan 27, 2022

Conversation

Harold-lkk
Copy link
Collaborator

@Harold-lkk Harold-lkk commented Jan 26, 2022

open-mmlab/mmdetection#7019

Motivation

  1. support test for specifying GPU
  2. Since MMDP does not support non-distributed multi-GPU training, --gpus in train.py lost its role, so it is removed, --gpu-ids is changed to --gpu-id, because only one GPU can be specified for non-distribution training and testing.
    If the number of GPUs is more than 1, there will be an assertion error in MMDP because MMDP does not support the situation with more than one GPU.

Modification

--gpu-ids is changed to --gpu-id.

BC-breaking (Optional)

--gpus-ids and --gpus will be deprecated, please use --gpu-id.

@codecov
Copy link

codecov bot commented Jan 26, 2022

Codecov Report

Merging #756 (df4754c) into main (a36de7b) will increase coverage by 0.08%.
The diff coverage is n/a.

❗ Current head df4754c differs from pull request most recent head d7467c7. Consider uploading reports for the commit d7467c7 to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##             main     #756      +/-   ##
==========================================
+ Coverage   84.53%   84.62%   +0.08%     
==========================================
  Files         165      165              
  Lines       10664    10664              
  Branches     1622     1622              
==========================================
+ Hits         9015     9024       +9     
+ Misses       1303     1295       -8     
+ Partials      346      345       -1     
Flag Coverage Δ
unittests 84.62% <ø> (+0.08%) ⬆️

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

Impacted Files Coverage Δ
mmocr/datasets/pipelines/transforms.py 83.99% <0.00%> (+1.42%) ⬆️

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 a809a52...d7467c7. Read the comment docs.

Copy link
Collaborator

@gaotongxiao gaotongxiao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to update docs (training.md & test.md)

docs/en/training.md Outdated Show resolved Hide resolved
@gaotongxiao gaotongxiao merged commit e0ff118 into open-mmlab:main Jan 27, 2022
gaotongxiao added a commit to gaotongxiao/mmocr that referenced this pull request Jul 15, 2022
…ad of gpu-ids and gpus (open-mmlab#756)

* support set gpu number for testing and deprecate gpu_ids and gpus with gpu_id

* update gpu-ids gpus and gpu-id dostring

* add args.gpus process

* fix typo

Co-authored-by: Tong Gao <gaotongxiao@gmail.com>
gaotongxiao added a commit to gaotongxiao/mmocr that referenced this pull request Jul 15, 2022
…ad of gpu-ids and gpus (open-mmlab#756)

* support set gpu number for testing and deprecate gpu_ids and gpus with gpu_id

* update gpu-ids gpus and gpu-id dostring

* add args.gpus process

* fix typo

Co-authored-by: Tong Gao <gaotongxiao@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants