-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #883 from marrlab/num_batches_est_ratio
unit test number batches for estimate loss raiot
- Loading branch information
Showing
2 changed files
with
29 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# find $1 -type f -print0 | xargs -0 grep -li error | ||
# # B means before, A means after, some erros have long stack exception message so we need at least | ||
# # 100 lines before the error, the last line usually indicate the root cause of error | ||
grep -B 100 -wnr "error" --group-separator="=========begin_slurm_error===============" $1 > slurm_errors.txt | ||
cat slurm_errors.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
""" | ||
loss ratio estimate | ||
""" | ||
from tests.utils_test import utils_test_algo | ||
|
||
|
||
def test_loss_ratio_estimate0(): | ||
""" | ||
test different number of batches | ||
""" | ||
args = "--te_d=0 --tr_d 2 4 --task=mnistcolor10 --debug --bs=8 \ | ||
--model=erm --trainer=mldg --nname=conv_bn_pool_2 \ | ||
--nb4reg_over_task_ratio=0" | ||
utils_test_algo(args) | ||
|
||
|
||
def test_loss_ratio_estimate100(): | ||
""" | ||
test different number of batches | ||
""" | ||
args = "--te_d=0 --tr_d 2 4 --task=mnistcolor10 --debug --bs=8 \ | ||
--model=erm --trainer=mldg --nname=conv_bn_pool_2 \ | ||
--nb4reg_over_task_ratio=100" | ||
utils_test_algo(args) |