From c13ed6ebd48ce09a4cf72563f5eb6a371dbd29b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guanghui=20Ren=28=E4=BB=BB=E5=B9=BF=E8=BE=89=29?= Date: Wed, 5 Feb 2020 17:21:20 +0800 Subject: [PATCH 1/5] Fix bug for testing MedianstopAssessor --- src/sdk/pynni/nni/medianstop_assessor/test.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/sdk/pynni/nni/medianstop_assessor/test.py b/src/sdk/pynni/nni/medianstop_assessor/test.py index bad19911c2..bb68562f6c 100644 --- a/src/sdk/pynni/nni/medianstop_assessor/test.py +++ b/src/sdk/pynni/nni/medianstop_assessor/test.py @@ -31,11 +31,11 @@ def test(): # [1,1,1,1,1,1,1,1,1,1], # [1,1,1,1,1,1,1,1,1,1]] - assessor = MedianstopAssessor(FLAGS.start_step, FLAGS.optimize_mode) - for i in range(4): + assessor = MedianstopAssessor(FLAGS.optimize_mode, FLAGS.start_step) + for i in range(len(lcs): #lc = [] to_complete = True - for k in range(10): + for k in range(FLAGS.start_step): #d = random.randint(i*100+0, i*100+100) #lc.append(d) ret = assessor.assess_trial(i, lcs[i][:k+1]) From 28b8b7050411a1286d5c35e58eb87b8d9e49a3dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guanghui=20Ren=28=E4=BB=BB=E5=B9=BF=E8=BE=89=29?= Date: Wed, 5 Feb 2020 17:24:58 +0800 Subject: [PATCH 2/5] Correct the description of Median Stop --- docs/zh_CN/Assessor/MedianstopAssessor.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/zh_CN/Assessor/MedianstopAssessor.md b/docs/zh_CN/Assessor/MedianstopAssessor.md index 86f6f3b48b..6f422a6f63 100644 --- a/docs/zh_CN/Assessor/MedianstopAssessor.md +++ b/docs/zh_CN/Assessor/MedianstopAssessor.md @@ -2,4 +2,4 @@ ## Median Stop -Medianstop 是一种简单的提前终止 Trial 的策略,可参考[论文](https://static.googleusercontent.com/media/research.google.com/en//pubs/archive/46180.pdf)。 如果 Trial X 的在步骤 S 的最好目标值比所有已完成 Trial 的步骤 S 的中位数值明显要低,这个 Trial 就会被提前停止。 \ No newline at end of file +Medianstop 是一种简单的提前终止 Trial 的策略,可参考[论文](https://static.googleusercontent.com/media/research.google.com/en//pubs/archive/46180.pdf)。 如果 Trial X 在步骤 S 的最好目标值低于所有已完成 Trial 前S个步骤目标平均值的中位数,这个 Trial 就会被提前停止。 From 8f6ffd3a78ca9419b0315dc684786c22ca18bdbf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guanghui=20Ren=28=E4=BB=BB=E5=B9=BF=E8=BE=89=29?= Date: Wed, 5 Feb 2020 17:28:43 +0800 Subject: [PATCH 3/5] Fix typos --- src/sdk/pynni/nni/medianstop_assessor/test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sdk/pynni/nni/medianstop_assessor/test.py b/src/sdk/pynni/nni/medianstop_assessor/test.py index bb68562f6c..0603390a6f 100644 --- a/src/sdk/pynni/nni/medianstop_assessor/test.py +++ b/src/sdk/pynni/nni/medianstop_assessor/test.py @@ -32,7 +32,7 @@ def test(): # [1,1,1,1,1,1,1,1,1,1]] assessor = MedianstopAssessor(FLAGS.optimize_mode, FLAGS.start_step) - for i in range(len(lcs): + for i in range(len(lcs)): #lc = [] to_complete = True for k in range(FLAGS.start_step): From 10313c11b10ebfd14b8d892fea8e5a3569e6c570 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guanghui=20Ren=28=E4=BB=BB=E5=B9=BF=E8=BE=89=29?= Date: Fri, 7 Feb 2020 16:14:31 +0800 Subject: [PATCH 4/5] Update --- src/sdk/pynni/nni/medianstop_assessor/test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sdk/pynni/nni/medianstop_assessor/test.py b/src/sdk/pynni/nni/medianstop_assessor/test.py index 0603390a6f..8c7d6d927b 100644 --- a/src/sdk/pynni/nni/medianstop_assessor/test.py +++ b/src/sdk/pynni/nni/medianstop_assessor/test.py @@ -35,7 +35,7 @@ def test(): for i in range(len(lcs)): #lc = [] to_complete = True - for k in range(FLAGS.start_step): + for k in range(len(lcs[0])): #d = random.randint(i*100+0, i*100+100) #lc.append(d) ret = assessor.assess_trial(i, lcs[i][:k+1]) From a50f4c27e15e605e1ed50a5f1f3e1398f43e5d44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BB=BB=E5=B9=BF=E8=BE=89?= Date: Fri, 7 Feb 2020 17:28:46 +0800 Subject: [PATCH 5/5] Revert "Correct the description of Median Stop" This reverts commit 28b8b7050411a1286d5c35e58eb87b8d9e49a3dc. --- docs/zh_CN/Assessor/MedianstopAssessor.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/zh_CN/Assessor/MedianstopAssessor.md b/docs/zh_CN/Assessor/MedianstopAssessor.md index 6f422a6f63..86f6f3b48b 100644 --- a/docs/zh_CN/Assessor/MedianstopAssessor.md +++ b/docs/zh_CN/Assessor/MedianstopAssessor.md @@ -2,4 +2,4 @@ ## Median Stop -Medianstop 是一种简单的提前终止 Trial 的策略,可参考[论文](https://static.googleusercontent.com/media/research.google.com/en//pubs/archive/46180.pdf)。 如果 Trial X 在步骤 S 的最好目标值低于所有已完成 Trial 前S个步骤目标平均值的中位数,这个 Trial 就会被提前停止。 +Medianstop 是一种简单的提前终止 Trial 的策略,可参考[论文](https://static.googleusercontent.com/media/research.google.com/en//pubs/archive/46180.pdf)。 如果 Trial X 的在步骤 S 的最好目标值比所有已完成 Trial 的步骤 S 的中位数值明显要低,这个 Trial 就会被提前停止。 \ No newline at end of file