Skip to content

Commit 4fd6c3b

Browse files
authored
Sample notebook fix 2 (#1675)
* Reducing the random hpo resource values We've specified the total number of training jobs to be only 20 and the maximum number of parallel jobs to be 2. * Edited the text to be consistent with the new parameter values. With the new parameter values, this notebook now runs without error. * fixed typo fixed a typo
1 parent 24dee32 commit 4fd6c3b

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

hyperparameter_tuning/mxnet_gluon_cifar10_random_search/hyperparameter_tuning_mxnet_gluon_cifar10_random_search.ipynb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -269,9 +269,9 @@
269269
"cell_type": "markdown",
270270
"metadata": {},
271271
"source": [
272-
"Next, we can kick off our random search. We've defined the total number of training jobs to be 120. This is a large amount and drives most of the cost of this notebook. Also, we've specified up to 8 jobs to be run in parallel. This exceeds the default concurrent instance limit for ml.p3.8xlarge instances. If you're just testing this notebook out, decreasing both values will control costs and allow you to complete successfully without requiring a service limit increase.\n",
272+
"Next, we can kick off our random search. We've specified the total number of training jobs to be only 20 and the maximum number of parallel jobs to be 2. Below we have printed out the results from having used 120 training jobs and a maximum number of parallel jobs to be 8. But this is a large amount and could make the cost of this notebook at much as $400 to run. (That output will be overwritten when you run the tuning job with the new parameter values.) The larger set of values exceeds the default concurrent instance limit for ml.p3.8xlarge instances. For testing this notebook, the smaller values control costs and allow you to complete successfully without requiring a service limit increase.\n",
273273
"\n",
274-
"_Note, this step may take up to 2 hours to complete. Even if you loose connection with the notebook in the middle, as long as the notebook instance continues to run, `jobs` should still be successfully created for future use._"
274+
"_Note, this step may take up to an hour to complete. Even if you loose connection with the notebook in the middle, as long as the notebook instance continues to run, `jobs` should still be successfully created for future use._"
275275
]
276276
},
277277
{
@@ -284,8 +284,8 @@
284284
"\n",
285285
"jobs = rt.random_search(fit_random,\n",
286286
" hyperparameters,\n",
287-
" max_jobs=120,\n",
288-
" max_parallel_jobs=8)"
287+
" max_jobs=20,\n",
288+
" max_parallel_jobs=2)"
289289
]
290290
},
291291
{
@@ -1158,7 +1158,7 @@
11581158
"source": [
11591159
"As we can see, there's a huge variation in percent accuracy. Had we initially (unknowingly) set our learning rate near 0.5, momentum at 0.15, and weight decay to 0.0004, we would have an accuracy just over 20% (this is particularly bad considering random guessing would produce 10% accuracy).\n",
11601160
"\n",
1161-
"But, we also found many successful hyperparameter value combinations, and reached a peak validation accuracy of 73.7%. Note, this peak job occurs relatively early in our search but, due to randomness, our next best objective value occurred 89 jobs later. The actual peak could have occurred anywhere within the 120 jobs and will change across multiple runs. We can see that with hyperparameter tuning our accuracy is well above the default value baseline of 53%.\n",
1161+
"But, we also found many successful hyperparameter value combinations, and reached a peak validation accuracy of 74.5%. The peak occured midway through the run, but could have occurred anywhere within the 20 jobs and will change across multiple runs. We can see that with hyperparameter tuning our accuracy is well above the default value baseline of 53%.\n",
11621162
"\n",
11631163
"To get a rough understanding of how the hyperparameter values relate to one another and the objective metric, let's quickly plot them."
11641164
]

0 commit comments

Comments
 (0)