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

[CodeCamp2023-470] Runner supports setting the number of iterations for each epoch #1292

Merged
merged 56 commits into from
Oct 8, 2023
Merged
Changes from 1 commit
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
b89259c
本次修改增加了num_batch_per_epoch功能
ShuRaymond Aug 4, 2023
be7230b
[Feature]Add num_batch_per_epoch
ShuRaymond Aug 4, 2023
75d8dff
[Feature] Add num_batch_per_epoch
ShuRaymond Aug 4, 2023
d7df66a
[Feature] Add num_batch_per_epoch
ShuRaymond Aug 4, 2023
b3f0032
[Feature] Add num_batch_per_epoch
ShuRaymond Aug 4, 2023
40c5252
add tests and edit md
ShuRaymond Aug 7, 2023
e025c53
fix bugs
ShuRaymond Aug 7, 2023
ea3db4f
fix bugs
ShuRaymond Aug 7, 2023
3a06ed8
fix bugs
ShuRaymond Aug 7, 2023
5c444c7
fix bugs
ShuRaymond Aug 7, 2023
2f40dc0
fix bugs
ShuRaymond Aug 7, 2023
8ef9a26
fix bugs
ShuRaymond Aug 7, 2023
a446035
add tests
ShuRaymond Aug 8, 2023
f9b27e4
add tests
ShuRaymond Aug 8, 2023
d598fe1
fix bugs
ShuRaymond Aug 8, 2023
7ee46ed
fix bugs
ShuRaymond Aug 8, 2023
f88b104
fix bugs
ShuRaymond Aug 8, 2023
8bb15b6
modify metrics
ShuRaymond Aug 9, 2023
e0aa78a
modify docstring
ShuRaymond Aug 9, 2023
143ab59
modify unit tests
ShuRaymond Aug 9, 2023
4ed72c9
modify unit tests
ShuRaymond Aug 9, 2023
bd035d7
modify unit tests
ShuRaymond Aug 9, 2023
05087cd
modify unit tests
ShuRaymond Aug 9, 2023
d6e220b
modify unit tests
ShuRaymond Aug 9, 2023
3311ebe
modify unit tests
ShuRaymond Aug 9, 2023
b4d45a3
rerun ci
ShuRaymond Aug 13, 2023
9ea37fc
rerun ci
ShuRaymond Aug 13, 2023
90a23bc
change method to support num_batch_per_epoch
ShuRaymond Aug 18, 2023
22345a9
delete invaild tests
ShuRaymond Aug 18, 2023
f54f1c1
delete invaild tests
ShuRaymond Aug 18, 2023
5b4b2b4
delete invaild tests
ShuRaymond Aug 18, 2023
4d3e2f0
delete invaild tests
ShuRaymond Aug 18, 2023
8ba88da
update the documentation
ShuRaymond Aug 18, 2023
96ec4d6
update the documentation
ShuRaymond Aug 19, 2023
5c57054
fix
ShuRaymond Aug 19, 2023
0050ff7
Modify the variable name
ShuRaymond Aug 23, 2023
77bcad1
solve the conflicts
ShuRaymond Aug 27, 2023
d1a5456
Merge branch 'main' into dev
ShuRaymond Aug 27, 2023
36519f6
Update debug_tricks.md
ShuRaymond Aug 27, 2023
3fa23ec
Update debug_tricks.md
ShuRaymond Aug 27, 2023
deef4ad
modify the doc and runner.py
ShuRaymond Aug 30, 2023
7e31da4
modify the doc and runner.py
ShuRaymond Aug 30, 2023
988d790
Merge remote-tracking branch 'origin/dev' into dev
ShuRaymond Aug 30, 2023
adb92ef
Merge branch 'open-mmlab:main' into dev
ShuRaymond Aug 30, 2023
f01570b
modify the doc and runner.py
ShuRaymond Aug 30, 2023
de6fd78
modify the doc and runner.py
ShuRaymond Aug 30, 2023
53bc8e0
modify the doc and runner.py
ShuRaymond Aug 30, 2023
ac6e046
Merge remote-tracking branch 'origin/dev' into dev
ShuRaymond Aug 30, 2023
2881405
modify the doc and runner.py
ShuRaymond Aug 30, 2023
4eb168f
Update debug_tricks.md
zhouzaida Sep 1, 2023
9540f21
Update distributed_training.py
zhouzaida Sep 1, 2023
15f9d85
Update debug_tricks.md
zhouzaida Sep 1, 2023
379600b
Update tests/test_runner/test_runner.py
zhouzaida Sep 1, 2023
36ee77d
Minor refine
HAOCHENYE Oct 7, 2023
9ccbb3f
Merge remote-tracking branch 'origin/main' into dev
HAOCHENYE Oct 7, 2023
686ebfb
Merge remote-tracking branch 'origin/main' into dev
HAOCHENYE Oct 8, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix bugs
ShuRaymond committed Aug 7, 2023
commit ea3db4f4ddbc1f7b2a3e7a5e09a64257ff586198
14 changes: 0 additions & 14 deletions tests/test_runner/test_runner.py
Original file line number Diff line number Diff line change
@@ -1353,20 +1353,11 @@ def test_build_train_loop(self):
loop = runner.build_train_loop(cfg)
self.assertIsInstance(loop, EpochBasedTrainLoop)

cfg = dict(
type='IterBasedTrainLoop', max_iters=3, num_batch_per_epoch=5)
loop = runner.build_train_loop(cfg)
self.assertIsInstance(loop, IterBasedTrainLoop)

# input is a dict and does not contain type key
cfg = dict(max_epochs=3, num_batch_per_epoch=5)
loop = runner.build_train_loop(cfg)
self.assertIsInstance(loop, EpochBasedTrainLoop)

cfg = dict(max_iters=3, num_batch_per_epoch=5)
loop = runner.build_train_loop(cfg)
self.assertIsInstance(loop, IterBasedTrainLoop)

def test_build_val_loop(self):
cfg = copy.deepcopy(self.epoch_based_cfg)
cfg.experiment_name = 'test_build_val_loop'
@@ -1399,11 +1390,6 @@ def test_build_val_loop(self):
loop = runner.build_test_loop(cfg)
self.assertIsInstance(loop, ValLoop)

# input is a dict and contains num_batch_per_epoch
cfg = dict(num_batch_per_epoch=5)
loop = runner.build_test_loop(cfg)
self.assertIsInstance(loop, ValLoop)

def test_build_test_loop(self):
cfg = copy.deepcopy(self.epoch_based_cfg)
cfg.experiment_name = 'test_build_test_loop'