Skip to content

Commit

Permalink
[Docs] Fix the examples of other_args (#209)
Browse files Browse the repository at this point in the history
  • Loading branch information
yukke42 authored Oct 23, 2023
1 parent 8021d1b commit 5d54183
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -217,14 +217,14 @@ Please refer to [installation.md](docs/en/installation.md) for installation.
from mim import train

train(repo='mmcls', config='resnet18_8xb16_cifar10.py', gpus=0,
other_args='--work-dir tmp')
other_args=('--work-dir', 'tmp'))
train(repo='mmcls', config='resnet18_8xb16_cifar10.py', gpus=1,
other_args='--work-dir tmp')
other_args=('--work-dir', 'tmp'))
train(repo='mmcls', config='resnet18_8xb16_cifar10.py', gpus=4,
launcher='pytorch', other_args='--work-dir tmp')
launcher='pytorch', other_args=('--work-dir', 'tmp'))
train(repo='mmcls', config='resnet18_8xb16_cifar10.py', gpus=8,
launcher='slurm', gpus_per_node=8, partition='partition_name',
other_args='--work-dir tmp')
other_args=('--work-dir', 'tmp'))
```

</details>
Expand Down Expand Up @@ -260,15 +260,15 @@ Please refer to [installation.md](docs/en/installation.md) for installation.
```python
from mim import test
test(repo='mmcls', config='resnet101_b16x8_cifar10.py',
checkpoint='tmp/epoch_3.pth', gpus=1, other_args='--metrics accuracy')
checkpoint='tmp/epoch_3.pth', gpus=1, other_args=('--metrics', 'accuracy'))
test(repo='mmcls', config='resnet101_b16x8_cifar10.py',
checkpoint='tmp/epoch_3.pth', gpus=1, other_args='--out tmp.pkl')
checkpoint='tmp/epoch_3.pth', gpus=1, other_args=('--out', 'tmp.pkl'))
test(repo='mmcls', config='resnet101_b16x8_cifar10.py',
checkpoint='tmp/epoch_3.pth', gpus=4, launcher='pytorch',
other_args='--metrics accuracy')
other_args=('--metrics', 'accuracy'))
test(repo='mmcls', config='resnet101_b16x8_cifar10.py',
checkpoint='tmp/epoch_3.pth', gpus=8, partition='partition_name',
launcher='slurm', gpus_per_node=8, other_args='--metrics accuracy')
launcher='slurm', gpus_per_node=8, other_args=('--metrics', 'accuracy'))
```

</details>
Expand Down Expand Up @@ -305,13 +305,13 @@ Please refer to [installation.md](docs/en/installation.md) for installation.
from mim import run

run(repo='mmcls', command='get_flops',
other_args='resnet101_b16x8_cifar10.py')
other_args=('resnet101_b16x8_cifar10.py',))
run(repo='mmcls', command='publish_model',
other_args='input.pth output.pth')
other_args=('input.pth', 'output.pth'))
run(repo='mmcls', command='train',
other_args='resnet101_b16x8_cifar10.py --work-dir tmp')
other_args=('resnet101_b16x8_cifar10.py', '--work-dir', 'tmp'))
run(repo='mmcls', command='test',
other_args='resnet101_b16x8_cifar10.py tmp/epoch_3.pth --metrics accuracy')
other_args=('resnet101_b16x8_cifar10.py', 'tmp/epoch_3.pth', '--metrics accuracy'))
```

</details>
Expand Down Expand Up @@ -366,28 +366,28 @@ Please refer to [installation.md](docs/en/installation.md) for installation.

gridsearch(repo='mmcls', config='resnet101_b16x8_cifar10.py', gpus=0,
search_args='--optimizer.lr 1e-2 1e-3',
other_args='--work-dir tmp')
other_args=('--work-dir', 'tmp'))
gridsearch(repo='mmcls', config='resnet101_b16x8_cifar10.py', gpus=1,
search_args='--optimizer.lr 1e-2 1e-3',
other_args='--work-dir tmp')
other_args=('--work-dir', 'tmp'))
gridsearch(repo='mmcls', config='resnet101_b16x8_cifar10.py', gpus=1,
search_args='--optimizer.weight_decay 1e-3 1e-4',
other_args='--work-dir tmp')
other_args=('--work-dir', 'tmp'))
gridsearch(repo='mmcls', config='resnet101_b16x8_cifar10.py', gpus=1,
search_args='--optimizer.lr 1e-2 1e-3 --optimizer.weight_decay'
'1e-3 1e-4',
other_args='--work-dir tmp')
other_args=('--work-dir', 'tmp'))
gridsearch(repo='mmcls', config='resnet101_b16x8_cifar10.py', gpus=8,
partition='partition_name', gpus_per_node=8, launcher='slurm',
search_args='--optimizer.lr 1e-2 1e-3 --optimizer.weight_decay'
' 1e-3 1e-4',
other_args='--work-dir tmp')
other_args=('--work-dir', 'tmp'))
gridsearch(repo='mmcls', config='resnet101_b16x8_cifar10.py', gpus=8,
partition='partition_name', gpus_per_node=8, launcher='slurm',
max_workers=2,
search_args='--optimizer.lr 1e-2 1e-3 --optimizer.weight_decay'
' 1e-3 1e-4',
other_args='--work-dir tmp')
other_args=('--work-dir', 'tmp'))
```

</details>
Expand Down

0 comments on commit 5d54183

Please sign in to comment.