question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Specifying gpu-ids with mim train

See original GitHub issue

Describe the feature I would like to specify the gpu-ids when I run mim train.

mim train mmcls config.py --gpu-ids 1

Currently, I think I can only specify the gpus as shown below.

mim train mmcls config.py --gpus 1

Motivation It is inconvenient when to specify the gpu-ids.

Related resources https://github.com/open-mmlab/mmclassification/blob/master/tools/train.py#L38-L43

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
kennymckormickcommented, Dec 31, 2021

Hi, okotaku. In mmcls, --gpu-ids and --gpus are two exclusive args. Maybe you can use CUDA_VISIBLE_DEVICES=1 mim train mmcls config.py --gpus 1 instead.

1reaction
zhouzaidacommented, Dec 21, 2021

Hi @okotaku , the command mim train mmcls config.py --gpu-ids 1 --gpus 1 should work well because gpu-ids will be parsed as other_args and they will also be passed to train.py.

https://github.com/open-mmlab/mim/blob/08a99cff036887883e59ae1a2dc21038219ceb41/mim/commands/train.py#L150-L151

Read more comments on GitHub >

github_iconTop Results From Across the Web

Training — MMOCR 0.6.3 documentation
A list of GPU ids to use. Only applicable to non-distributed training. --gpu-id, int, The GPU id to use. Only applicable to non- ......
Read more >
How to use specified GPUs with Accelerator to train the model?
I'm training my own prompt-tuning model using transformers package. I'm following the training framework in the official example to train ...
Read more >
Training neural networks with pre-trained models - Zhangsheng Lai
While I had experience with training neural networks, the neural networks ... The --gpu-ids helps to specify which GPU to use so you...
Read more >
How to set specific gpu in tensorflow? - Stack Overflow
There are 3 ways to achieve this: Using CUDA_VISIBLE_DEVICES environment variable. by setting environment variable CUDA_VISIBLE_DEVICES="1" makes only ...
Read more >
GPU ID (Environment setting)—ArcGIS Pro | Documentation
GPU ID—The GPU identification number to use to process your data. The default is 0. Scripting syntax. arcpy.env.gpuId = GPU_ID ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found