|
18 | 18 | },
|
19 | 19 | {
|
20 | 20 | "cell_type": "code",
|
21 |
| - "execution_count": 56, |
| 21 | + "execution_count": null, |
22 | 22 | "metadata": {},
|
23 | 23 | "outputs": [],
|
24 | 24 | "source": [
|
|
39 | 39 | },
|
40 | 40 | {
|
41 | 41 | "cell_type": "code",
|
42 |
| - "execution_count": 57, |
| 42 | + "execution_count": null, |
43 | 43 | "metadata": {},
|
44 | 44 | "outputs": [],
|
45 | 45 | "source": [
|
|
70 | 70 | },
|
71 | 71 | {
|
72 | 72 | "cell_type": "code",
|
73 |
| - "execution_count": 58, |
| 73 | + "execution_count": null, |
74 | 74 | "metadata": {},
|
75 | 75 | "outputs": [],
|
76 | 76 | "source": [
|
|
84 | 84 | },
|
85 | 85 | {
|
86 | 86 | "cell_type": "code",
|
87 |
| - "execution_count": 59, |
| 87 | + "execution_count": null, |
88 | 88 | "metadata": {},
|
89 | 89 | "outputs": [],
|
90 | 90 | "source": [
|
|
103 | 103 | "estimator = TensorFlow(\n",
|
104 | 104 | " entry_point=\"train-mobilenet.py\",\n",
|
105 | 105 | " source_dir=\"code\",\n",
|
106 |
| - " output_path=model_path, \n", |
107 | 106 | " instance_type=training_instance_type,\n",
|
108 | 107 | " instance_count=training_instance_count, \n",
|
109 |
| - " distribution=distribution,\n", |
110 | 108 | " hyperparameters=shared_hyperparameters, \n",
|
111 | 109 | " metric_definitions=metric_definitions, \n",
|
112 | 110 | " role=role,\n",
|
|
179 | 177 | },
|
180 | 178 | {
|
181 | 179 | "cell_type": "code",
|
182 |
| - "execution_count": 55, |
| 180 | + "execution_count": null, |
183 | 181 | "metadata": {},
|
184 |
| - "outputs": [ |
185 |
| - { |
186 |
| - "name": "stdout", |
187 |
| - "output_type": "stream", |
188 |
| - "text": [ |
189 |
| - "\n", |
190 |
| - "2022-11-03 14:07:17 Starting - Preparing the instances for training\n", |
191 |
| - "2022-11-03 14:07:17 Downloading - Downloading input data\n", |
192 |
| - "2022-11-03 14:07:17 Training - Training image download completed. Training in progress.\n", |
193 |
| - "2022-11-03 14:07:17 Uploading - Uploading generated training model\n", |
194 |
| - "2022-11-03 14:07:17 Completed - Resource reused by training job: cv-hpo-221103-1357-004-4196ca7b\n", |
195 |
| - "Best model artifact file is uploaded here: s3://sagemaker-us-east-1-379642174303/postprocessing/cv-hpo-221103-1357-002-0901bc7e/output ========\n" |
196 |
| - ] |
197 |
| - } |
198 |
| - ], |
| 182 | + "outputs": [], |
199 | 183 | "source": [
|
200 |
| - "training_job_name = tuner.best_estimator().latest_training_job.name\n", |
| 184 | + "best_model_uri = tuner.best_estimator().latest_training_job.describe()['ModelArtifacts']['S3ModelArtifacts']\n", |
201 | 185 | "\n",
|
202 |
| - "print(f\"Best model artifact file is uploaded here: {model_path}/{training_job_name}/output ========\")\n" |
| 186 | + "print(f\"\\nBest model artifact file is uploaded here: {best_model_uri}\")" |
203 | 187 | ]
|
204 | 188 | }
|
205 | 189 | ],
|
|
208 | 192 | "kernelspec": {
|
209 | 193 | "display_name": "Python 3 (Data Science)",
|
210 | 194 | "language": "python",
|
211 |
| - "name": "python3__SAGEMAKER_INTERNAL__arn:aws:sagemaker:us-east-1:081325390199:image/datascience-1.0" |
| 195 | + "name": "python3__SAGEMAKER_INTERNAL__arn:aws:sagemaker:eu-west-1:470317259841:image/datascience-1.0" |
212 | 196 | },
|
213 | 197 | "language_info": {
|
214 | 198 | "codemirror_mode": {
|
|
0 commit comments