|
96 | 96 | "metadata": {},
|
97 | 97 | "outputs": [],
|
98 | 98 | "source": [
|
99 |
| - "s3_client = boto3.client('s3')\n", |
100 |
| - "model_dir = s3_client.list_objects_v2(Bucket=bucket, Delimiter='/', Prefix=f'{prefix}/{prefix}')['CommonPrefixes'][-1]['Prefix']\n", |
101 |
| - "\n", |
102 | 99 | "s3_images = f's3://{bucket}/{prefix}/outputs/test/'\n",
|
103 | 100 | "s3_manifest = f's3://{bucket}/{prefix}/outputs/manifest'\n",
|
104 |
| - "s3_model = f's3://{bucket}/{model_dir}output'\n", |
| 101 | + "s3_model = f's3://{bucket}/{prefix}/outputs/model/'\n", |
105 | 102 | "\n",
|
106 |
| - "print(f's3_images: {s3_images},\\n s3_manifest: {s3_manifest},\\n s3_model: {s3_model}')" |
| 103 | + "print(f's3_images: {s3_images},\\ns3_manifest: {s3_manifest},\\ns3_model: {s3_model}')" |
107 | 104 | ]
|
108 | 105 | },
|
109 | 106 | {
|
|
281 | 278 | "outputs": [],
|
282 | 279 | "source": [
|
283 | 280 | "script_processor.run(\n",
|
284 |
| - " code='evaluation.py',\n", |
285 |
| - " arguments=[\"--model-file\", \"model.tar.gz\"],\n", |
286 |
| - " inputs=[ProcessingInput(source=s3_images, \n", |
287 |
| - " destination=\"/opt/ml/processing/input/test\"),\n", |
288 |
| - " ProcessingInput(source=s3_manifest, \n", |
289 |
| - " destination=\"/opt/ml/processing/input/manifest\"),\n", |
290 |
| - " ProcessingInput(source=s3_model, \n", |
291 |
| - " destination=\"/opt/ml/processing/model\"),\n", |
292 |
| - " ],\n", |
293 |
| - " outputs=[\n", |
294 |
| - " ProcessingOutput(output_name=\"evaluation\", source=\"/opt/ml/processing/evaluation\", \n", |
295 |
| - " destination=s3_evaluation_output),\n", |
296 |
| - " ]\n", |
297 |
| - " )" |
| 281 | + " code='evaluation.py',\n", |
| 282 | + " arguments=[\"--model-file\", \"model.tar.gz\"],\n", |
| 283 | + " inputs=[ProcessingInput(source=s3_images, \n", |
| 284 | + " destination=\"/opt/ml/processing/input/test\"),\n", |
| 285 | + " ProcessingInput(source=s3_manifest, \n", |
| 286 | + " destination=\"/opt/ml/processing/input/manifest\"),\n", |
| 287 | + " ProcessingInput(source=s3_model, \n", |
| 288 | + " destination=\"/opt/ml/processing/model\"),\n", |
| 289 | + " ],\n", |
| 290 | + " outputs=[\n", |
| 291 | + " ProcessingOutput(output_name=\"evaluation\", source=\"/opt/ml/processing/evaluation\", \n", |
| 292 | + " destination=s3_evaluation_output),\n", |
| 293 | + " ]\n", |
| 294 | + ")" |
298 | 295 | ]
|
299 | 296 | },
|
300 | 297 | {
|
|
359 | 356 | "kernelspec": {
|
360 | 357 | "display_name": "Python 3 (Data Science)",
|
361 | 358 | "language": "python",
|
362 |
| - "name": "python3__SAGEMAKER_INTERNAL__arn:aws:sagemaker:us-east-1:081325390199:image/datascience-1.0" |
| 359 | + "name": "python3__SAGEMAKER_INTERNAL__arn:aws:sagemaker:eu-west-1:470317259841:image/datascience-1.0" |
363 | 360 | },
|
364 | 361 | "language_info": {
|
365 | 362 | "codemirror_mode": {
|
|
0 commit comments