diff --git a/03_model_evaluation/code/inference.py b/03_model_evaluation/code/inference.py deleted file mode 100644 index 6ba331b..0000000 --- a/03_model_evaluation/code/inference.py +++ /dev/null @@ -1,140 +0,0 @@ -print('******* in inference.py *******') -import tensorflow as tf -print(f'TensorFlow version is: {tf.version.VERSION}') - -from tensorflow.keras.preprocessing import image -from tensorflow.keras.applications.mobilenet_v2 import MobileNetV2, preprocess_input -print(f'Keras version is: {tf.keras.__version__}') - -import io -import base64 -import json -import numpy as np -from numpy import argmax -from collections import namedtuple -from PIL import Image -import time -import requests - -# Imports for GRPC invoke on TFS -import grpc -from tensorflow.compat.v1 import make_tensor_proto -from tensorflow_serving.apis import predict_pb2 -from tensorflow_serving.apis import prediction_service_pb2_grpc - -import os -# default to use of GRPC -PREDICT_USING_GRPC = os.environ.get('PREDICT_USING_GRPC', 'true') -if PREDICT_USING_GRPC == 'true': - USE_GRPC = True -else: - USE_GRPC = False - -MAX_GRPC_MESSAGE_LENGTH = 512 * 1024 * 1024 - -HEIGHT = 224 -WIDTH = 224 - -# Restrict memory growth on GPU's -physical_gpus = tf.config.experimental.list_physical_devices('GPU') -if physical_gpus: - try: - # Currently, memory growth needs to be the same across GPUs - for gpu in physical_gpus: - tf.config.experimental.set_memory_growth(gpu, True) - logical_gpus = tf.config.experimental.list_logical_devices('GPU') - print(len(physical_gpus), 'Physical GPUs,', len(logical_gpus), 'Logical GPUs') - except RuntimeError as e: - # Memory growth must be set before GPUs have been initialized - print(e) -else: - print('**** NO physical GPUs') - - -num_inferences = 0 -print(f'num_inferences: {num_inferences}') - -Context = namedtuple('Context', - 'model_name, model_version, method, rest_uri, grpc_uri, ' - 'custom_attributes, request_content_type, accept_header') - -def handler(data, context): - - global num_inferences - num_inferences += 1 - - print(f'\n************ inference #: {num_inferences}') - if context.request_content_type == 'application/x-image': - stream = io.BytesIO(data.read()) - img = Image.open(stream).convert('RGB') - _print_image_metadata(img) - - img = img.resize((WIDTH, HEIGHT)) - img_array = image.img_to_array(img) #, data_format = "channels_first") - # the image is now in an array of shape (224, 224, 3) or (3, 224, 224) based on data_format - # need to expand it to add dim for num samples, e.g. (1, 224, 224, 3) - x = img_array.reshape((1,) + img_array.shape) - instance = preprocess_input(x) - print(f' final image shape: {instance.shape}') - del x, img - else: - _return_error(415, 'Unsupported content type "{}"'.format(context.request_content_type or 'Unknown')) - - start_time = time.time() - - if USE_GRPC: - prediction = _predict_using_grpc(context, instance) - - else: # use TFS REST API - inst_json = json.dumps({'instances': instance.tolist()}) - response = requests.post(context.rest_uri, data=inst_json) - if response.status_code != 200: - raise Exception(response.content.decode('utf-8')) - prediction = response.content - - end_time = time.time() - latency = int((end_time - start_time) * 1000) - print(f'=== TFS invoke took: {latency} ms') - - response_content_type = context.accept_header - return prediction, response_content_type - -def _return_error(code, message): - raise ValueError('Error: {}, {}'.format(str(code), message)) - -def _predict_using_grpc(context, instance): - request = predict_pb2.PredictRequest() - request.model_spec.name = 'model' - request.model_spec.signature_name = 'serving_default' - - request.inputs['input_1'].CopyFrom(make_tensor_proto(instance)) - options = [ - ('grpc.max_send_message_length', MAX_GRPC_MESSAGE_LENGTH), - ('grpc.max_receive_message_length', MAX_GRPC_MESSAGE_LENGTH) - ] - channel = grpc.insecure_channel(f'0.0.0.0:{context.grpc_port}', options=options) - stub = prediction_service_pb2_grpc.PredictionServiceStub(channel) - result_future = stub.Predict.future(request, 30) # 5 seconds - output_tensor_proto = result_future.result().outputs['output'] - output_shape = [dim.size for dim in output_tensor_proto.tensor_shape.dim] - output_np = np.array(output_tensor_proto.float_val).reshape(output_shape) - predicted_class_idx = argmax(output_np) - print(f' Predicted class: {predicted_class_idx}') - prediction_json = {'predictions': output_np.tolist()} - return json.dumps(prediction_json) - -def _print_image_metadata(img): - # Retrieve the attributes of the image - fileFormat = img.format - imageMode = img.mode - imageSize = img.size # (width, height) - colorPalette = img.palette - - print(f' File format: {fileFormat}') - print(f' Image mode: {imageMode}') - print(f' Image size: {imageSize}') - print(f' Color pal: {colorPalette}') - - print(f' Keys from image.info dictionary:') - for key, value in img.info.items(): - print(f' {key}') \ No newline at end of file diff --git a/03_model_evaluation/code/requirements-gpu.txt b/03_model_evaluation/code/requirements-gpu.txt deleted file mode 100644 index 9b72a18..0000000 --- a/03_model_evaluation/code/requirements-gpu.txt +++ /dev/null @@ -1,3 +0,0 @@ -Pillow -numpy -tensorflow-gpu \ No newline at end of file diff --git a/03_model_evaluation/code/requirements.txt b/03_model_evaluation/code/requirements.txt deleted file mode 100644 index cb35fb5..0000000 --- a/03_model_evaluation/code/requirements.txt +++ /dev/null @@ -1,5 +0,0 @@ -# This is the set of Python packages that will get pip installed -# at startup of the Amazon SageMaker endpoint or batch transformation. -Pillow -numpy -tensorflow==2.4.1 \ No newline at end of file diff --git a/03_model_evaluation/docker/Dockerfile b/03_model_evaluation/docker/Dockerfile deleted file mode 100644 index 381336c..0000000 --- a/03_model_evaluation/docker/Dockerfile +++ /dev/null @@ -1,11 +0,0 @@ - -FROM public.ecr.aws/docker/library/python:3.7 - -ADD requirements.txt / - -RUN pip3 install -r requirements.txt - -ENV PYTHONUNBUFFERED=TRUE -ENV TF_CPP_MIN_LOG_LEVEL="2" - -ENTRYPOINT ["python3"] diff --git a/03_model_evaluation/docker/requirements.txt b/03_model_evaluation/docker/requirements.txt deleted file mode 100644 index a0d6a69..0000000 --- a/03_model_evaluation/docker/requirements.txt +++ /dev/null @@ -1,10 +0,0 @@ -# This is the set of Python packages that will get pip installed -# at startup of the Amazon SageMaker endpoint or batch transformation. -Pillow -scikit-learn -pandas -numpy -tensorflow==2.1 -boto3==1.18.4 -sagemaker-experiments -matplotlib==3.4.2 diff --git a/03_model_evaluation/model-evaluation-processing-job.ipynb b/03_model_evaluation/model-evaluation-processing-job.ipynb index 4f7fe01..86f8f7c 100644 --- a/03_model_evaluation/model-evaluation-processing-job.ipynb +++ b/03_model_evaluation/model-evaluation-processing-job.ipynb @@ -58,7 +58,7 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -83,7 +83,7 @@ "### Dataset\n", "The dataset we are using is from [Caltech Birds (CUB 200 2011)](http://www.vision.caltech.edu/visipedia/CUB-200-2011.html). \n", "\n", - "Here we are using the artifacts from previous labs, thus we need to update the s3 location below for you Test images and Test data annotation file.\n", + "Here we are using the artifacts from previous labs:\n", "\n", "- S3 path for test image data\n", "- S3 path for test data annotation file\n", @@ -92,13 +92,19 @@ }, { "cell_type": "code", - "execution_count": 4, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ - "s3_images = f's3://{bucket}/preprocess/outputs/1667290054/test/'\n", - "s3_manifest = f's3://{bucket}/preprocess/outputs/1667290054/manifest'\n", - "s3_model = f's3://{bucket}/{prefix}/postprocessing-model-evaluation-2022-11-01-09-17-05-235/output'" + "s3_client = boto3.client('s3')\n", + "outputs_dir = s3_client.list_objects_v2(Bucket=bucket, Delimiter='/', Prefix='preprocess/outputs/')['CommonPrefixes'][0]['Prefix']\n", + "postproc_dir = s3_client.list_objects_v2(Bucket=bucket, Delimiter='/', Prefix=f'{prefix}/')['CommonPrefixes'][-1]['Prefix']\n", + "\n", + "s3_images = f's3://{bucket}/{outputs_dir}test/'\n", + "s3_manifest = f's3://{bucket}/{outputs_dir}manifest'\n", + "s3_model = f's3://{bucket}/{postproc_dir}output'\n", + "\n", + "print(f's3_images: {s3_images},\\n s3_manifest: {s3_manifest},\\n s3_model: {s3_model}')" ] }, { @@ -113,9 +119,9 @@ "metadata": {}, "source": [ "### Prepare the Script and Docker File\n", - "With SageMaker, you can run data processing jobs using the SKLearnProcessor, popular ML frameworks processors, Apache Spark, or BYOC. To learn more about [SageMaker Processing](https://docs.aws.amazon.com/sagemaker/latest/dg/processing-job.html)\n", + "With SageMaker, you can run data processing jobs using the SKLearnProcessor, popular ML frameworks processors, Apache Spark, or BYOC. To learn more about visit [SageMaker Processing](https://docs.aws.amazon.com/sagemaker/latest/dg/processing-job.html).\n", "\n", - "For this example we are going to practice using ScriptProcess and Bring Our Own Container (BYOC). ScriptProcess require you to feed a container uri from ECR and a custom script for the process." + "For this example we are going to practice using ScriptProcess and Bring Your Own Container (BYOC). ScriptProcess require you to feed a container URI from ECR and a custom script for the process." ] }, { @@ -137,7 +143,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "#### Bring Our Own Container (BYOC)\n", + "#### Bring Your Own Container (BYOC)\n", "Below we build a custom docker container and push to Amazon Elastic Container Registry (ECR).\n", "\n", "You can use the standard TFflow container, but ScriptProcessor currently does not support `source_dir` for custom requirement.txt and multiple python file. That is on the roadmap, please follow this [thread](https://github.com/aws/sagemaker-python-sdk/issues/1248) for updates." @@ -145,34 +151,18 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "mkdir: cannot create directory ‘docker’: File exists\n" - ] - } - ], + "outputs": [], "source": [ "!mkdir docker" ] }, { "cell_type": "code", - "execution_count": 35, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Overwriting docker/requirements.txt\n" - ] - } - ], + "outputs": [], "source": [ "%%writefile docker/requirements.txt\n", "# This is the set of Python packages that will get pip installed\n", @@ -190,17 +180,9 @@ }, { "cell_type": "code", - "execution_count": 48, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Overwriting docker/Dockerfile\n" - ] - } - ], + "outputs": [], "source": [ "%%writefile docker/Dockerfile\n", "\n", @@ -222,463 +204,25 @@ "source": [ "The easiest way to build a container image and push to ECR is to use studio image builder. This require certain permission for your sagemaker execution role, which is already provided in this setup. \n", "\n", - "But please check this [blog](https://aws.amazon.com/blogs/machine-learning/using-the-amazon-sagemaker-studio-image-build-cli-to-build-container-images-from-your-studio-notebooks/) for additional information on how to use the Amazon SageMaker Studio Image Build CLI to build container images from your Studio notebooks in case you need to update your role policy. " + "But please check this [blog](https://aws.amazon.com/blogs/machine-learning/using-the-amazon-sagemaker-studio-image-build-cli-to-build-container-images-from-your-studio-notebooks/) for additional information on how to use the Amazon SageMaker studio image build cli to build container images from your studio notebooks in case you need to update your role policy. " ] }, { "cell_type": "code", - "execution_count": 49, + "execution_count": null, "metadata": { "scrolled": true }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Requirement already satisfied: sagemaker-studio-image-build in /opt/conda/lib/python3.7/site-packages (0.6.0)\n", - "Requirement already satisfied: boto3<2.0,>=1.10.44 in /opt/conda/lib/python3.7/site-packages (from sagemaker-studio-image-build) (1.24.62)\n", - "Requirement already satisfied: sagemaker<3.0 in /opt/conda/lib/python3.7/site-packages (from sagemaker-studio-image-build) (2.116.0)\n", - "Requirement already satisfied: s3transfer<0.7.0,>=0.6.0 in /opt/conda/lib/python3.7/site-packages (from boto3<2.0,>=1.10.44->sagemaker-studio-image-build) (0.6.0)\n", - "Requirement already satisfied: botocore<1.28.0,>=1.27.62 in /opt/conda/lib/python3.7/site-packages (from boto3<2.0,>=1.10.44->sagemaker-studio-image-build) (1.27.62)\n", - "Requirement already satisfied: jmespath<2.0.0,>=0.7.1 in /opt/conda/lib/python3.7/site-packages (from boto3<2.0,>=1.10.44->sagemaker-studio-image-build) (1.0.1)\n", - "Requirement already satisfied: attrs<23,>=20.3.0 in /opt/conda/lib/python3.7/site-packages (from sagemaker<3.0->sagemaker-studio-image-build) (21.4.0)\n", - "Requirement already satisfied: packaging>=20.0 in /opt/conda/lib/python3.7/site-packages (from sagemaker<3.0->sagemaker-studio-image-build) (20.1)\n", - "Requirement already satisfied: protobuf<4.0,>=3.1 in /opt/conda/lib/python3.7/site-packages (from sagemaker<3.0->sagemaker-studio-image-build) (3.20.1)\n", - "Requirement already satisfied: schema in /opt/conda/lib/python3.7/site-packages (from sagemaker<3.0->sagemaker-studio-image-build) (0.7.5)\n", - "Requirement already satisfied: protobuf3-to-dict<1.0,>=0.1.5 in /opt/conda/lib/python3.7/site-packages (from sagemaker<3.0->sagemaker-studio-image-build) (0.1.5)\n", - "Requirement already satisfied: smdebug-rulesconfig==1.0.1 in /opt/conda/lib/python3.7/site-packages (from sagemaker<3.0->sagemaker-studio-image-build) (1.0.1)\n", - "Requirement already satisfied: google-pasta in /opt/conda/lib/python3.7/site-packages (from sagemaker<3.0->sagemaker-studio-image-build) (0.2.0)\n", - "Requirement already satisfied: importlib-metadata<5.0,>=1.4.0 in /opt/conda/lib/python3.7/site-packages (from sagemaker<3.0->sagemaker-studio-image-build) (4.12.0)\n", - "Requirement already satisfied: pandas in /opt/conda/lib/python3.7/site-packages (from sagemaker<3.0->sagemaker-studio-image-build) (1.3.5)\n", - "Requirement already satisfied: numpy<2.0,>=1.9.0 in /opt/conda/lib/python3.7/site-packages (from sagemaker<3.0->sagemaker-studio-image-build) (1.21.6)\n", - "Requirement already satisfied: pathos in /opt/conda/lib/python3.7/site-packages (from sagemaker<3.0->sagemaker-studio-image-build) (0.2.9)\n", - "Requirement already satisfied: urllib3<1.27,>=1.25.4 in /opt/conda/lib/python3.7/site-packages (from botocore<1.28.0,>=1.27.62->boto3<2.0,>=1.10.44->sagemaker-studio-image-build) (1.26.12)\n", - "Requirement already satisfied: python-dateutil<3.0.0,>=2.1 in /opt/conda/lib/python3.7/site-packages (from botocore<1.28.0,>=1.27.62->boto3<2.0,>=1.10.44->sagemaker-studio-image-build) (2.8.1)\n", - "Requirement already satisfied: zipp>=0.5 in /opt/conda/lib/python3.7/site-packages (from importlib-metadata<5.0,>=1.4.0->sagemaker<3.0->sagemaker-studio-image-build) (3.8.1)\n", - "Requirement already satisfied: typing-extensions>=3.6.4 in /opt/conda/lib/python3.7/site-packages (from importlib-metadata<5.0,>=1.4.0->sagemaker<3.0->sagemaker-studio-image-build) (4.3.0)\n", - "Requirement already satisfied: six in /opt/conda/lib/python3.7/site-packages (from packaging>=20.0->sagemaker<3.0->sagemaker-studio-image-build) (1.14.0)\n", - "Requirement already satisfied: pyparsing>=2.0.2 in /opt/conda/lib/python3.7/site-packages (from packaging>=20.0->sagemaker<3.0->sagemaker-studio-image-build) (2.4.6)\n", - "Requirement already satisfied: pytz>=2017.3 in /opt/conda/lib/python3.7/site-packages (from pandas->sagemaker<3.0->sagemaker-studio-image-build) (2019.3)\n", - "Requirement already satisfied: ppft>=1.7.6.5 in /opt/conda/lib/python3.7/site-packages (from pathos->sagemaker<3.0->sagemaker-studio-image-build) (1.7.6.5)\n", - "Requirement already satisfied: multiprocess>=0.70.13 in /opt/conda/lib/python3.7/site-packages (from pathos->sagemaker<3.0->sagemaker-studio-image-build) (0.70.13)\n", - "Requirement already satisfied: dill>=0.3.5.1 in /opt/conda/lib/python3.7/site-packages (from pathos->sagemaker<3.0->sagemaker-studio-image-build) (0.3.5.1)\n", - "Requirement already satisfied: pox>=0.3.1 in /opt/conda/lib/python3.7/site-packages (from pathos->sagemaker<3.0->sagemaker-studio-image-build) (0.3.1)\n", - "Requirement already satisfied: contextlib2>=0.5.5 in /opt/conda/lib/python3.7/site-packages (from schema->sagemaker<3.0->sagemaker-studio-image-build) (0.6.0.post1)\n", - "\u001b[33mWARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv\u001b[0m\u001b[33m\n", - "\u001b[0m\n", - "\u001b[1m[\u001b[0m\u001b[34;49mnotice\u001b[0m\u001b[1;39;49m]\u001b[0m\u001b[39;49m A new release of pip available: \u001b[0m\u001b[31;49m22.2.2\u001b[0m\u001b[39;49m -> \u001b[0m\u001b[32;49m22.3\u001b[0m\n", - "\u001b[1m[\u001b[0m\u001b[34;49mnotice\u001b[0m\u001b[1;39;49m]\u001b[0m\u001b[39;49m To update, run: \u001b[0m\u001b[32;49mpip install --upgrade pip\u001b[0m\n" - ] - } - ], + "outputs": [], "source": [ "!pip install sagemaker-studio-image-build" ] }, { "cell_type": "code", - "execution_count": 50, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "....[Container] 2022/11/01 11:20:45 going inside waitForAgent\n", - "\n", - "[Container] 2022/11/01 11:20:45 Waiting for agent ping\n", - "[Container] 2022/11/01 11:20:46 Waiting for DOWNLOAD_SOURCE\n", - "[Container] 2022/11/01 11:20:48 Phase is DOWNLOAD_SOURCE\n", - "[Container] 2022/11/01 11:20:48 finished waitForAgent\n", - "[Container] 2022/11/01 11:20:48 inside CopySrc\n", - "[Container] 2022/11/01 11:20:48 CODEBUILD_SRC_DIR=/codebuild/output/src948061306/src\n", - "[Container] 2022/11/01 11:20:48 finished CopySrc\n", - "[Container] 2022/11/01 11:20:48 YAML location is /codebuild/output/src948061306/src/buildspec.yml\n", - "[Container] 2022/11/01 11:20:48 Setting HTTP client timeout to higher timeout for S3 source\n", - "[Container] 2022/11/01 11:20:48 Processing environment variables\n", - "[Container] 2022/11/01 11:20:48 No runtime version selected in buildspec.\n", - "[Container] 2022/11/01 11:20:48 Moving to directory /codebuild/output/src948061306/src\n", - "[Container] 2022/11/01 11:20:49 Configuring ssm agent with target id: codebuild:29026d2d-6c5d-4265-ab78-ed2015436f1e\n", - "[Container] 2022/11/01 11:20:49 Successfully updated ssm agent configuration\n", - "[Container] 2022/11/01 11:20:49 Registering with agent\n", - "[Container] 2022/11/01 11:20:49 Phases found in YAML: 3\n", - "[Container] 2022/11/01 11:20:49 POST_BUILD: 3 commands\n", - "[Container] 2022/11/01 11:20:49 PRE_BUILD: 9 commands\n", - "[Container] 2022/11/01 11:20:49 BUILD: 4 commands\n", - "[Container] 2022/11/01 11:20:49 Phase complete: DOWNLOAD_SOURCE State: SUCCEEDED\n", - "[Container] 2022/11/01 11:20:49 Phase context status code: Message:\n", - "[Container] 2022/11/01 11:20:49 Entering execCommands\n", - "[Container] 2022/11/01 11:20:49 Entering phase INSTALL\n", - "[Container] 2022/11/01 11:20:49 Phase complete: INSTALL State: SUCCEEDED\n", - "[Container] 2022/11/01 11:20:49 Phase context status code: Message:\n", - "[Container] 2022/11/01 11:20:49 Entering phase PRE_BUILD\n", - "[Container] 2022/11/01 11:20:49 Running command echo Logging in to Amazon ECR...\n", - "Logging in to Amazon ECR...\n", - "\n", - "[Container] 2022/11/01 11:20:49 Running command $(aws ecr get-login --no-include-email --region $AWS_DEFAULT_REGION)\n", - "WARNING! Using --password via the CLI is insecure. Use --password-stdin.\n", - "WARNING! Your password will be stored unencrypted in /root/.docker/config.json.\n", - "Configure a credential helper to remove this warning. See\n", - "https://docs.docker.com/engine/reference/commandline/login/#credentials-store\n", - "\n", - "Login Succeeded\n", - "\n", - "[Container] 2022/11/01 11:21:06 Running command $(aws ecr get-login --no-include-email --region $AWS_DEFAULT_REGION --registry-ids 763104351884)\n", - "WARNING! Using --password via the CLI is insecure. Use --password-stdin.\n", - "WARNING! Your password will be stored unencrypted in /root/.docker/config.json.\n", - "Configure a credential helper to remove this warning. See\n", - "https://docs.docker.com/engine/reference/commandline/login/#credentials-store\n", - "\n", - "Login Succeeded\n", - "\n", - "[Container] 2022/11/01 11:21:06 Running command $(aws ecr get-login --no-include-email --region $AWS_DEFAULT_REGION --registry-ids 217643126080)\n", - "WARNING! Using --password via the CLI is insecure. Use --password-stdin.\n", - "WARNING! Your password will be stored unencrypted in /root/.docker/config.json.\n", - "Configure a credential helper to remove this warning. See\n", - "https://docs.docker.com/engine/reference/commandline/login/#credentials-store\n", - "\n", - "Login Succeeded\n", - "\n", - "[Container] 2022/11/01 11:21:07 Running command $(aws ecr get-login --no-include-email --region $AWS_DEFAULT_REGION --registry-ids 727897471807)\n", - "WARNING! Using --password via the CLI is insecure. Use --password-stdin.\n", - "WARNING! Your password will be stored unencrypted in /root/.docker/config.json.\n", - "Configure a credential helper to remove this warning. See\n", - "https://docs.docker.com/engine/reference/commandline/login/#credentials-store\n", - "\n", - "Login Succeeded\n", - "\n", - "[Container] 2022/11/01 11:21:07 Running command $(aws ecr get-login --no-include-email --region $AWS_DEFAULT_REGION --registry-ids 626614931356)\n", - "WARNING! Using --password via the CLI is insecure. Use --password-stdin.\n", - "WARNING! Your password will be stored unencrypted in /root/.docker/config.json.\n", - "Configure a credential helper to remove this warning. See\n", - "https://docs.docker.com/engine/reference/commandline/login/#credentials-store\n", - "\n", - "Login Succeeded\n", - "\n", - "[Container] 2022/11/01 11:21:08 Running command $(aws ecr get-login --no-include-email --region $AWS_DEFAULT_REGION --registry-ids 683313688378)\n", - "WARNING! Using --password via the CLI is insecure. Use --password-stdin.\n", - "WARNING! Your password will be stored unencrypted in /root/.docker/config.json.\n", - "Configure a credential helper to remove this warning. See\n", - "https://docs.docker.com/engine/reference/commandline/login/#credentials-store\n", - "\n", - "Login Succeeded\n", - "\n", - "[Container] 2022/11/01 11:21:08 Running command $(aws ecr get-login --no-include-email --region $AWS_DEFAULT_REGION --registry-ids 520713654638)\n", - "WARNING! Using --password via the CLI is insecure. Use --password-stdin.\n", - "WARNING! Your password will be stored unencrypted in /root/.docker/config.json.\n", - "Configure a credential helper to remove this warning. See\n", - "https://docs.docker.com/engine/reference/commandline/login/#credentials-store\n", - "\n", - "Login Succeeded\n", - "\n", - "[Container] 2022/11/01 11:21:09 Running command $(aws ecr get-login --no-include-email --region $AWS_DEFAULT_REGION --registry-ids 462105765813)\n", - "WARNING! Using --password via the CLI is insecure. Use --password-stdin.\n", - "WARNING! Your password will be stored unencrypted in /root/.docker/config.json.\n", - "Configure a credential helper to remove this warning. See\n", - "https://docs.docker.com/engine/reference/commandline/login/#credentials-store\n", - "\n", - "Login Succeeded\n", - "\n", - "[Container] 2022/11/01 11:21:09 Phase complete: PRE_BUILD State: SUCCEEDED\n", - "[Container] 2022/11/01 11:21:09 Phase context status code: Message:\n", - "[Container] 2022/11/01 11:21:09 Entering phase BUILD\n", - "[Container] 2022/11/01 11:21:09 Running command echo Build started on `date`\n", - "Build started on Tue Nov 1 11:21:09 UTC 2022\n", - "\n", - "[Container] 2022/11/01 11:21:09 Running command echo Building the Docker image...\n", - "Building the Docker image...\n", - "\n", - "[Container] 2022/11/01 11:21:09 Running command docker build -t $IMAGE_REPO_NAME:$IMAGE_TAG . --file Dockerfile\n", - "Sending build context to Docker daemon 5.12kB\n", - "Step 1/6 : FROM public.ecr.aws/docker/library/python:3.7\n", - "3.7: Pulling from docker/library/python\n", - "17c9e6141fdb: Pulling fs layer\n", - "de4a4c6caea8: Pulling fs layer\n", - "4edced8587e6: Pulling fs layer\n", - "a7969cffbf46: Pulling fs layer\n", - "74fbfde6af91: Pulling fs layer\n", - "16fe51aed899: Pulling fs layer\n", - "a418194ab798: Pulling fs layer\n", - "e1b9101d5fa4: Pulling fs layer\n", - "c0b070a4672c: Pulling fs layer\n", - "16fe51aed899: Waiting\n", - "a418194ab798: Waiting\n", - "e1b9101d5fa4: Waiting\n", - "c0b070a4672c: Waiting\n", - "a7969cffbf46: Waiting\n", - "74fbfde6af91: Waiting\n", - "de4a4c6caea8: Verifying Checksum\n", - "de4a4c6caea8: Download complete\n", - "4edced8587e6: Verifying Checksum\n", - "4edced8587e6: Download complete\n", - "17c9e6141fdb: Verifying Checksum\n", - "17c9e6141fdb: Download complete\n", - "a7969cffbf46: Verifying Checksum\n", - "a7969cffbf46: Download complete\n", - "16fe51aed899: Verifying Checksum\n", - "16fe51aed899: Download complete\n", - "a418194ab798: Verifying Checksum\n", - "a418194ab798: Download complete\n", - "e1b9101d5fa4: Verifying Checksum\n", - "e1b9101d5fa4: Download complete\n", - "c0b070a4672c: Verifying Checksum\n", - "c0b070a4672c: Download complete\n", - "74fbfde6af91: Verifying Checksum\n", - "74fbfde6af91: Download complete\n", - "17c9e6141fdb: Pull complete\n", - "de4a4c6caea8: Pull complete\n", - "4edced8587e6: Pull complete\n", - "a7969cffbf46: Pull complete\n", - "74fbfde6af91: Pull complete\n", - "16fe51aed899: Pull complete\n", - "a418194ab798: Pull complete\n", - "e1b9101d5fa4: Pull complete\n", - "c0b070a4672c: Pull complete\n", - "Digest: sha256:53e59319730a41a52e8b3c43bd114131c91ebc8689dcece363b796cb4e623cc1\n", - "Status: Downloaded newer image for public.ecr.aws/docker/library/python:3.7\n", - " ---> c643d609e965\n", - "Step 2/6 : ADD requirements.txt /\n", - " ---> d1c9e0849a16\n", - "Step 3/6 : RUN pip3 install -r requirements.txt\n", - " ---> Running in 3146973c7f6e\n", - "Collecting Pillow\n", - " Downloading Pillow-9.3.0-cp37-cp37m-manylinux_2_28_x86_64.whl (3.3 MB)\n", - " ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.3/3.3 MB 91.8 MB/s eta 0:00:00\n", - "Collecting scikit-learn\n", - " Downloading scikit_learn-1.0.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (24.8 MB)\n", - " ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 24.8/24.8 MB 79.0 MB/s eta 0:00:00\n", - "Collecting pandas\n", - " Downloading pandas-1.3.5-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (11.3 MB)\n", - " ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 11.3/11.3 MB 107.7 MB/s eta 0:00:00\n", - "Collecting numpy\n", - " Downloading numpy-1.21.6-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (15.7 MB)\n", - " ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 15.7/15.7 MB 102.0 MB/s eta 0:00:00\n", - "Collecting tensorflow==2.10\n", - " Downloading tensorflow-2.10.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (578.0 MB)\n", - " ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 578.0/578.0 MB 3.0 MB/s eta 0:00:00\n", - "Collecting boto3==1.18.4\n", - " Downloading boto3-1.18.4-py3-none-any.whl (131 kB)\n", - " ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 131.6/131.6 KB 31.5 MB/s eta 0:00:00\n", - "Collecting sagemaker-experiments\n", - " Downloading sagemaker_experiments-0.1.39-py3-none-any.whl (42 kB)\n", - " ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 42.6/42.6 KB 10.5 MB/s eta 0:00:00\n", - "Collecting matplotlib==3.4.2\n", - " Downloading matplotlib-3.4.2-cp37-cp37m-manylinux1_x86_64.whl (10.3 MB)\n", - " ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 10.3/10.3 MB 52.7 MB/s eta 0:00:00\n", - "Collecting seaborn\n", - " Downloading seaborn-0.12.1-py3-none-any.whl (288 kB)\n", - " ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 288.2/288.2 KB 49.6 MB/s eta 0:00:00\n", - "Collecting gast<=0.4.0,>=0.2.1\n", - " Downloading gast-0.4.0-py3-none-any.whl (9.8 kB)\n", - "Collecting keras<2.11,>=2.10.0\n", - " Downloading keras-2.10.0-py2.py3-none-any.whl (1.7 MB)\n", - " ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.7/1.7 MB 32.3 MB/s eta 0:00:00\n", - "Collecting flatbuffers>=2.0\n", - " Downloading flatbuffers-22.10.26-py2.py3-none-any.whl (26 kB)\n", - "Requirement already satisfied: setuptools in /usr/local/lib/python3.7/site-packages (from tensorflow==2.10->-r requirements.txt (line 7)) (57.5.0)\n", - "Collecting libclang>=13.0.0\n", - " Downloading libclang-14.0.6-py2.py3-none-manylinux2010_x86_64.whl (14.1 MB)\n", - " ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 14.1/14.1 MB 46.6 MB/s eta 0:00:00\n", - "Collecting astunparse>=1.6.0\n", - " Downloading astunparse-1.6.3-py2.py3-none-any.whl (12 kB)\n", - "Collecting grpcio<2.0,>=1.24.3\n", - " Downloading grpcio-1.50.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.7 MB)\n", - " ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 4.7/4.7 MB 42.8 MB/s eta 0:00:00\n", - "Collecting packaging\n", - " Downloading packaging-21.3-py3-none-any.whl (40 kB)\n", - " ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 40.8/40.8 KB 12.9 MB/s eta 0:00:00\n", - "Collecting opt-einsum>=2.3.2\n", - " Downloading opt_einsum-3.3.0-py3-none-any.whl (65 kB)\n", - " ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 65.5/65.5 KB 19.5 MB/s eta 0:00:00\n", - "Collecting google-pasta>=0.1.1\n", - " Downloading google_pasta-0.2.0-py3-none-any.whl (57 kB)\n", - " ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 57.5/57.5 KB 19.9 MB/s eta 0:00:00\n", - "Collecting protobuf<3.20,>=3.9.2\n", - " Downloading protobuf-3.19.6-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.1 MB)\n", - " ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.1/1.1 MB 104.5 MB/s eta 0:00:00\n", - "Collecting termcolor>=1.1.0\n", - " Downloading termcolor-2.1.0-py3-none-any.whl (5.8 kB)\n", - "Collecting tensorflow-io-gcs-filesystem>=0.23.1\n", - " Downloading tensorflow_io_gcs_filesystem-0.27.0-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (2.4 MB)\n", - " ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.4/2.4 MB 109.6 MB/s eta 0:00:00\n", - "Collecting wrapt>=1.11.0\n", - " Downloading wrapt-1.14.1-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (75 kB)\n", - " ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 75.2/75.2 KB 18.6 MB/s eta 0:00:00\n", - "Collecting absl-py>=1.0.0\n", - " Downloading absl_py-1.3.0-py3-none-any.whl (124 kB)\n", - " ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 124.6/124.6 KB 33.8 MB/s eta 0:00:00\n", - "Collecting typing-extensions>=3.6.6\n", - " Downloading typing_extensions-4.4.0-py3-none-any.whl (26 kB)\n", - "Collecting six>=1.12.0\n", - " Downloading six-1.16.0-py2.py3-none-any.whl (11 kB)\n", - "Collecting tensorflow-estimator<2.11,>=2.10.0\n", - " Downloading tensorflow_estimator-2.10.0-py2.py3-none-any.whl (438 kB)\n", - " ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 438.7/438.7 KB 75.4 MB/s eta 0:00:00\n", - "Collecting h5py>=2.9.0\n", - " Downloading h5py-3.7.0-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (4.1 MB)\n", - " ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 4.1/4.1 MB 118.7 MB/s eta 0:00:00\n", - "Collecting keras-preprocessing>=1.1.1\n", - " Downloading Keras_Preprocessing-1.1.2-py2.py3-none-any.whl (42 kB)\n", - " ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 42.6/42.6 KB 13.8 MB/s eta 0:00:00\n", - "Collecting tensorboard<2.11,>=2.10\n", - " Downloading tensorboard-2.10.1-py3-none-any.whl (5.9 MB)\n", - " ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 5.9/5.9 MB 122.3 MB/s eta 0:00:00\n", - "Collecting botocore<1.22.0,>=1.21.4\n", - " Downloading botocore-1.21.65-py3-none-any.whl (8.0 MB)\n", - " ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 8.0/8.0 MB 123.9 MB/s eta 0:00:00\n", - "Collecting jmespath<1.0.0,>=0.7.1\n", - " Downloading jmespath-0.10.0-py2.py3-none-any.whl (24 kB)\n", - "Collecting s3transfer<0.6.0,>=0.5.0\n", - " Downloading s3transfer-0.5.2-py3-none-any.whl (79 kB)\n", - " ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 79.5/79.5 KB 25.9 MB/s eta 0:00:00\n", - "Collecting python-dateutil>=2.7\n", - " Downloading python_dateutil-2.8.2-py2.py3-none-any.whl (247 kB)\n", - " ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 247.7/247.7 KB 53.1 MB/s eta 0:00:00\n", - "Collecting pyparsing>=2.2.1\n", - " Downloading pyparsing-3.0.9-py3-none-any.whl (98 kB)\n", - " ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 98.3/98.3 KB 23.5 MB/s eta 0:00:00\n", - "Collecting cycler>=0.10\n", - " Downloading cycler-0.11.0-py3-none-any.whl (6.4 kB)\n", - "Collecting kiwisolver>=1.0.1\n", - " Downloading kiwisolver-1.4.4-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.whl (1.1 MB)\n", - " ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.1/1.1 MB 103.4 MB/s eta 0:00:00\n", - "Collecting joblib>=0.11\n", - " Downloading joblib-1.2.0-py3-none-any.whl (297 kB)\n", - " ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 298.0/298.0 KB 61.6 MB/s eta 0:00:00\n", - "Collecting threadpoolctl>=2.0.0\n", - " Downloading threadpoolctl-3.1.0-py3-none-any.whl (14 kB)\n", - "Collecting scipy>=1.1.0\n", - " Downloading scipy-1.7.3-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (38.1 MB)\n", - " ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 38.1/38.1 MB 61.5 MB/s eta 0:00:00\n", - "Collecting pytz>=2017.3\n", - " Downloading pytz-2022.6-py2.py3-none-any.whl (498 kB)\n", - " ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 498.1/498.1 KB 70.4 MB/s eta 0:00:00\n", - "Requirement already satisfied: wheel<1.0,>=0.23.0 in /usr/local/lib/python3.7/site-packages (from astunparse>=1.6.0->tensorflow==2.10->-r requirements.txt (line 7)) (0.37.1)\n", - "Collecting urllib3<1.27,>=1.25.4\n", - " Downloading urllib3-1.26.12-py2.py3-none-any.whl (140 kB)\n", - " ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 140.4/140.4 KB 37.8 MB/s eta 0:00:00\n", - "Collecting requests<3,>=2.21.0\n", - " Downloading requests-2.28.1-py3-none-any.whl (62 kB)\n", - " ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 62.8/62.8 KB 14.9 MB/s eta 0:00:00\n", - "Collecting tensorboard-plugin-wit>=1.6.0\n", - " Downloading tensorboard_plugin_wit-1.8.1-py3-none-any.whl (781 kB)\n", - " ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 781.3/781.3 KB 92.2 MB/s eta 0:00:00\n", - "Collecting tensorboard-data-server<0.7.0,>=0.6.0\n", - " Downloading tensorboard_data_server-0.6.1-py3-none-manylinux2010_x86_64.whl (4.9 MB)\n", - " ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 4.9/4.9 MB 124.9 MB/s eta 0:00:00\n", - "Collecting werkzeug>=1.0.1\n", - " Downloading Werkzeug-2.2.2-py3-none-any.whl (232 kB)\n", - " ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 232.7/232.7 KB 53.2 MB/s eta 0:00:00\n", - "Collecting google-auth<3,>=1.6.3\n", - " Downloading google_auth-2.14.0-py2.py3-none-any.whl (175 kB)\n", - " ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 175.0/175.0 KB 41.2 MB/s eta 0:00:00\n", - "Collecting markdown>=2.6.8\n", - " Downloading Markdown-3.4.1-py3-none-any.whl (93 kB)\n", - " ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 93.3/93.3 KB 23.8 MB/s eta 0:00:00\n", - "Collecting google-auth-oauthlib<0.5,>=0.4.1\n", - " Downloading google_auth_oauthlib-0.4.6-py2.py3-none-any.whl (18 kB)\n", - "Collecting rsa<5,>=3.1.4\n", - " Downloading rsa-4.9-py3-none-any.whl (34 kB)\n", - "Collecting pyasn1-modules>=0.2.1\n", - " Downloading pyasn1_modules-0.2.8-py2.py3-none-any.whl (155 kB)\n", - " ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 155.3/155.3 KB 41.4 MB/s eta 0:00:00\n", - "Collecting cachetools<6.0,>=2.0.0\n", - " Downloading cachetools-5.2.0-py3-none-any.whl (9.3 kB)\n", - "Collecting requests-oauthlib>=0.7.0\n", - " Downloading requests_oauthlib-1.3.1-py2.py3-none-any.whl (23 kB)\n", - "Collecting importlib-metadata>=4.4\n", - " Downloading importlib_metadata-5.0.0-py3-none-any.whl (21 kB)\n", - "Collecting idna<4,>=2.5\n", - " Downloading idna-3.4-py3-none-any.whl (61 kB)\n", - " ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 61.5/61.5 KB 15.2 MB/s eta 0:00:00\n", - "Collecting charset-normalizer<3,>=2\n", - " Downloading charset_normalizer-2.1.1-py3-none-any.whl (39 kB)\n", - "Collecting certifi>=2017.4.17\n", - " Downloading certifi-2022.9.24-py3-none-any.whl (161 kB)\n", - " ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 161.1/161.1 KB 23.5 MB/s eta 0:00:00\n", - "Collecting MarkupSafe>=2.1.1\n", - " Downloading MarkupSafe-2.1.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (25 kB)\n", - "Collecting zipp>=0.5\n", - " Downloading zipp-3.10.0-py3-none-any.whl (6.2 kB)\n", - "Collecting pyasn1<0.5.0,>=0.4.6\n", - " Downloading pyasn1-0.4.8-py2.py3-none-any.whl (77 kB)\n", - " ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 77.1/77.1 KB 20.9 MB/s eta 0:00:00\n", - "Collecting oauthlib>=3.0.0\n", - " Downloading oauthlib-3.2.2-py3-none-any.whl (151 kB)\n", - " ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 151.7/151.7 KB 37.4 MB/s eta 0:00:00\n", - "Installing collected packages: tensorboard-plugin-wit, pytz, pyasn1, libclang, keras, flatbuffers, zipp, wrapt, urllib3, typing-extensions, threadpoolctl, termcolor, tensorflow-io-gcs-filesystem, tensorflow-estimator, tensorboard-data-server, six, rsa, pyparsing, pyasn1-modules, protobuf, Pillow, oauthlib, numpy, MarkupSafe, joblib, jmespath, idna, gast, cycler, charset-normalizer, certifi, cachetools, absl-py, werkzeug, scipy, requests, python-dateutil, packaging, opt-einsum, kiwisolver, keras-preprocessing, importlib-metadata, h5py, grpcio, google-pasta, google-auth, astunparse, scikit-learn, requests-oauthlib, pandas, matplotlib, markdown, botocore, seaborn, s3transfer, google-auth-oauthlib, tensorboard, boto3, tensorflow, sagemaker-experiments\n", - "Successfully installed MarkupSafe-2.1.1 Pillow-9.3.0 absl-py-1.3.0 astunparse-1.6.3 boto3-1.18.4 botocore-1.21.65 cachetools-5.2.0 certifi-2022.9.24 charset-normalizer-2.1.1 cycler-0.11.0 flatbuffers-22.10.26 gast-0.4.0 google-auth-2.14.0 google-auth-oauthlib-0.4.6 google-pasta-0.2.0 grpcio-1.50.0 h5py-3.7.0 idna-3.4 importlib-metadata-5.0.0 jmespath-0.10.0 joblib-1.2.0 keras-2.10.0 keras-preprocessing-1.1.2 kiwisolver-1.4.4 libclang-14.0.6 markdown-3.4.1 matplotlib-3.4.2 numpy-1.21.6 oauthlib-3.2.2 opt-einsum-3.3.0 packaging-21.3 pandas-1.3.5 protobuf-3.19.6 pyasn1-0.4.8 pyasn1-modules-0.2.8 pyparsing-3.0.9 python-dateutil-2.8.2 pytz-2022.6 requests-2.28.1 requests-oauthlib-1.3.1 rsa-4.9 s3transfer-0.5.2 sagemaker-experiments-0.1.39 scikit-learn-1.0.2 scipy-1.7.3 seaborn-0.12.1 six-1.16.0 tensorboard-2.10.1 tensorboard-data-server-0.6.1 tensorboard-plugin-wit-1.8.1 tensorflow-2.10.0 tensorflow-estimator-2.10.0 tensorflow-io-gcs-filesystem-0.27.0 termcolor-2.1.0 threadpoolctl-3.1.0 typing-extensions-4.4.0 urllib3-1.26.12 werkzeug-2.2.2 wrapt-1.14.1 zipp-3.10.0\n", - "\u001b[91mWARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv\n", - "\u001b[0m\u001b[91mWARNING: You are using pip version 22.0.4; however, version 22.3 is available.\n", - "You should consider upgrading via the '/usr/local/bin/python -m pip install --upgrade pip' command.\n", - "\u001b[0mRemoving intermediate container 3146973c7f6e\n", - " ---> 40ae2fc20ab9\n", - "Step 4/6 : ENV PYTHONUNBUFFERED=TRUE\n", - " ---> Running in ab72ba6d0eeb\n", - "Removing intermediate container ab72ba6d0eeb\n", - " ---> 9f24b2695929\n", - "Step 5/6 : ENV TF_CPP_MIN_LOG_LEVEL=\"2\"\n", - " ---> Running in 17a270d01588\n", - "Removing intermediate container 17a270d01588\n", - " ---> d7803e0f1cca\n", - "Step 6/6 : ENTRYPOINT [\"python3\"]\n", - " ---> Running in 7dd9be753cea\n", - "Removing intermediate container 7dd9be753cea\n", - " ---> 259bece173fe\n", - "Successfully built 259bece173fe\n", - "Successfully tagged sagemaker-tf-container:2.1\n", - "\n", - "[Container] 2022/11/01 11:22:48 Running command docker tag $IMAGE_REPO_NAME:$IMAGE_TAG $AWS_ACCOUNT_ID.dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.com/$IMAGE_REPO_NAME:$IMAGE_TAG\n", - "\n", - "[Container] 2022/11/01 11:22:48 Phase complete: BUILD State: SUCCEEDED\n", - "[Container] 2022/11/01 11:22:48 Phase context status code: Message:\n", - "[Container] 2022/11/01 11:22:48 Entering phase POST_BUILD\n", - "[Container] 2022/11/01 11:22:48 Running command echo Build completed on `date`\n", - "Build completed on Tue Nov 1 11:22:48 UTC 2022\n", - "\n", - "[Container] 2022/11/01 11:22:48 Running command echo Pushing the Docker image...\n", - "Pushing the Docker image...\n", - "\n", - "[Container] 2022/11/01 11:22:48 Running command docker push $AWS_ACCOUNT_ID.dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.com/$IMAGE_REPO_NAME:$IMAGE_TAG\n", - "The push refers to repository [628084464172.dkr.ecr.us-east-1.amazonaws.com/sagemaker-tf-container]\n", - "a73516c5b264: Preparing\n", - "03ec17a9150d: Preparing\n", - "0ec8f78a199d: Preparing\n", - "d612c04719be: Preparing\n", - "12a48b761eaf: Preparing\n", - "6b183c62e3d7: Preparing\n", - "882fd36bfd35: Preparing\n", - "d1dec9917839: Preparing\n", - "d38adf39e1dd: Preparing\n", - "4ed121b04368: Preparing\n", - "d9d07d703dd5: Preparing\n", - "d1dec9917839: Waiting\n", - "d38adf39e1dd: Waiting\n", - "4ed121b04368: Waiting\n", - "d9d07d703dd5: Waiting\n", - "6b183c62e3d7: Waiting\n", - "882fd36bfd35: Waiting\n", - "0ec8f78a199d: Layer already exists\n", - "12a48b761eaf: Layer already exists\n", - "d612c04719be: Layer already exists\n", - "882fd36bfd35: Layer already exists\n", - "d1dec9917839: Layer already exists\n", - "6b183c62e3d7: Layer already exists\n", - "d38adf39e1dd: Layer already exists\n", - "d9d07d703dd5: Layer already exists\n", - "4ed121b04368: Layer already exists\n", - "03ec17a9150d: Pushed\n", - "a73516c5b264: Pushed\n", - "2.1: digest: sha256:973e2a23a1e6bc2911444f3f70051384353c8cd2b8d57d27d1bfb4cf8b968f14 size: 2640\n", - "\n", - "[Container] 2022/11/01 11:24:34 Phase complete: POST_BUILD State: SUCCEEDED\n", - "[Container] 2022/11/01 11:24:34 Phase context status code: Message:\n", - "\n", - "Image URI: 628084464172.dkr.ecr.us-east-1.amazonaws.com/sagemaker-tf-container:2.1\n" - ] - } - ], + "outputs": [], "source": [ "container_name = \"sagemaker-tf-container\"\n", "container_version = \"2.0\"\n", @@ -704,7 +248,7 @@ }, { "cell_type": "code", - "execution_count": 61, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -733,120 +277,9 @@ }, { "cell_type": "code", - "execution_count": 62, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "\n", - "Job Name: postprocessing-model-evaluation-2022-11-01-12-22-48-558\n", - "Inputs: [{'InputName': 'input-1', 'AppManaged': False, 'S3Input': {'S3Uri': 's3://sagemaker-us-east-1-628084464172/preprocess/outputs/1667290054/test/', 'LocalPath': '/opt/ml/processing/input/test', 'S3DataType': 'S3Prefix', 'S3InputMode': 'File', 'S3DataDistributionType': 'FullyReplicated', 'S3CompressionType': 'None'}}, {'InputName': 'input-2', 'AppManaged': False, 'S3Input': {'S3Uri': 's3://sagemaker-us-east-1-628084464172/preprocess/outputs/1667290054/manifest', 'LocalPath': '/opt/ml/processing/input/manifest', 'S3DataType': 'S3Prefix', 'S3InputMode': 'File', 'S3DataDistributionType': 'FullyReplicated', 'S3CompressionType': 'None'}}, {'InputName': 'input-3', 'AppManaged': False, 'S3Input': {'S3Uri': 's3://sagemaker-us-east-1-628084464172/postprocessing-model-evaluation/postprocessing-model-evaluation-2022-11-01-09-17-05-235/output', 'LocalPath': '/opt/ml/processing/model', 'S3DataType': 'S3Prefix', 'S3InputMode': 'File', 'S3DataDistributionType': 'FullyReplicated', 'S3CompressionType': 'None'}}, {'InputName': 'code', 'AppManaged': False, 'S3Input': {'S3Uri': 's3://sagemaker-us-east-1-628084464172/postprocessing-model-evaluation-2022-11-01-12-22-48-558/input/code/evaluation.py', 'LocalPath': '/opt/ml/processing/input/code', 'S3DataType': 'S3Prefix', 'S3InputMode': 'File', 'S3DataDistributionType': 'FullyReplicated', 'S3CompressionType': 'None'}}]\n", - "Outputs: [{'OutputName': 'evaluation', 'AppManaged': False, 'S3Output': {'S3Uri': 's3://sagemaker-us-east-1-628084464172/postprocessing-model-evaluation/outputs/evaluation', 'LocalPath': '/opt/ml/processing/evaluation', 'S3UploadMode': 'EndOfJob'}}]\n", - "............................\u001b[34m2022-11-01 12:27:19.846429: E tensorflow/stream_executor/cuda/cuda_blas.cc:2981] Unable to register cuBLAS factory: Attempting to register factory for plugin cuBLAS when one has already been registered\u001b[0m\n", - "\u001b[34mWARNING:tensorflow:SavedModel saved prior to TF 2.5 detected when loading Keras model. Please ensure that you are saving the model with model.save() or tf.keras.models.save_model(), *NOT* tf.saved_model.save(). To confirm, there should be a file named \"keras_metadata.pb\" in the SavedModel directory.\u001b[0m\n", - "\u001b[34mSavedModel saved prior to TF 2.5 detected when loading Keras model. Please ensure that you are saving the model with model.save() or tf.keras.models.save_model(), *NOT* tf.saved_model.save(). To confirm, there should be a file named \"keras_metadata.pb\" in the SavedModel directory.\u001b[0m\n", - "\u001b[34m#0151/1 [==============================] - ETA: 0s#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#0151/1 [==============================] - 1s 791ms/step\u001b[0m\n", - "\u001b[34m#0151/1 [==============================] - ETA: 0s#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#0151/1 [==============================] - 0s 64ms/step\u001b[0m\n", - "\u001b[34m#0151/1 [==============================] - ETA: 0s#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#0151/1 [==============================] - 0s 61ms/step\u001b[0m\n", - "\u001b[34m#0151/1 [==============================] - ETA: 0s#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#0151/1 [==============================] - 0s 61ms/step\u001b[0m\n", - "\u001b[34m#0151/1 [==============================] - ETA: 0s#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#0151/1 [==============================] - 0s 62ms/step\u001b[0m\n", - "\u001b[34m#0151/1 [==============================] - ETA: 0s#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#0151/1 [==============================] - 0s 60ms/step\u001b[0m\n", - "\u001b[34m#0151/1 [==============================] - ETA: 0s#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#0151/1 [==============================] - 0s 61ms/step\u001b[0m\n", - "\u001b[34m#0151/1 [==============================] - ETA: 0s#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#0151/1 [==============================] - 0s 59ms/step\u001b[0m\n", - "\u001b[34m#0151/1 [==============================] - ETA: 0s#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#0151/1 [==============================] - 0s 59ms/step\u001b[0m\n", - "\u001b[34m#0151/1 [==============================] - ETA: 0s#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#0151/1 [==============================] - 0s 60ms/step\u001b[0m\n", - "\u001b[34m#0151/1 [==============================] - ETA: 0s#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#0151/1 [==============================] - 0s 58ms/step\u001b[0m\n", - "\u001b[34m#0151/1 [==============================] - ETA: 0s#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#0151/1 [==============================] - 0s 63ms/step\u001b[0m\n", - "\u001b[34m#0151/1 [==============================] - ETA: 0s#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#0151/1 [==============================] - 0s 59ms/step\u001b[0m\n", - "\u001b[34m#0151/1 [==============================] - ETA: 0s#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#0151/1 [==============================] - 0s 62ms/step\u001b[0m\n", - "\u001b[34m#0151/1 [==============================] - ETA: 0s#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#0151/1 [==============================] - 0s 60ms/step\u001b[0m\n", - "\u001b[34m#0151/1 [==============================] - ETA: 0s#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#0151/1 [==============================] - 0s 62ms/step\u001b[0m\n", - "\u001b[34m#0151/1 [==============================] - ETA: 0s#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#0151/1 [==============================] - 0s 59ms/step\u001b[0m\n", - "\u001b[34m#0151/1 [==============================] - ETA: 0s#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#0151/1 [==============================] - 0s 63ms/step\u001b[0m\n", - "\u001b[34m#0151/1 [==============================] - ETA: 0s#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#0151/1 [==============================] - 0s 63ms/step\u001b[0m\n", - "\u001b[34m#0151/1 [==============================] - ETA: 0s#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#0151/1 [==============================] - 0s 59ms/step\u001b[0m\n", - "\u001b[34m#0151/1 [==============================] - ETA: 0s#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#0151/1 [==============================] - 0s 61ms/step\u001b[0m\n", - "\u001b[34m#0151/1 [==============================] - ETA: 0s#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#0151/1 [==============================] - 0s 58ms/step\u001b[0m\n", - "\u001b[34m#0151/1 [==============================] - ETA: 0s#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#0151/1 [==============================] - 0s 61ms/step\u001b[0m\n", - "\u001b[34m#0151/1 [==============================] - ETA: 0s#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#0151/1 [==============================] - 0s 61ms/step\u001b[0m\n", - "\u001b[34m#0151/1 [==============================] - ETA: 0s#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#0151/1 [==============================] - 0s 60ms/step\u001b[0m\n", - "\u001b[34m#0151/1 [==============================] - ETA: 0s#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#0151/1 [==============================] - 0s 58ms/step\u001b[0m\n", - "\u001b[34m#0151/1 [==============================] - ETA: 0s#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#0151/1 [==============================] - 0s 59ms/step\u001b[0m\n", - "\u001b[34m#0151/1 [==============================] - ETA: 0s#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#0151/1 [==============================] - 0s 63ms/step\u001b[0m\n", - "\u001b[34m#0151/1 [==============================] - ETA: 0s#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#0151/1 [==============================] - 0s 61ms/step\u001b[0m\n", - "\u001b[34m#0151/1 [==============================] - ETA: 0s#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#0151/1 [==============================] - 0s 59ms/step\u001b[0m\n", - "\u001b[34m#0151/1 [==============================] - ETA: 0s#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#0151/1 [==============================] - 0s 58ms/step\u001b[0m\n", - "\u001b[34m#0151/1 [==============================] - ETA: 0s#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#0151/1 [==============================] - 0s 58ms/step\u001b[0m\n", - "\u001b[34m#0151/1 [==============================] - ETA: 0s#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#0151/1 [==============================] - 0s 61ms/step\u001b[0m\n", - "\u001b[34m#0151/1 [==============================] - ETA: 0s#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#0151/1 [==============================] - 0s 58ms/step\u001b[0m\n", - "\u001b[34m#0151/1 [==============================] - ETA: 0s#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#0151/1 [==============================] - 0s 61ms/step\u001b[0m\n", - "\u001b[34m#0151/1 [==============================] - ETA: 0s#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#0151/1 [==============================] - 0s 60ms/step\u001b[0m\n", - "\u001b[34m#0151/1 [==============================] - ETA: 0s#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#0151/1 [==============================] - 0s 62ms/step\u001b[0m\n", - "\u001b[34m#0151/1 [==============================] - ETA: 0s#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#0151/1 [==============================] - 0s 63ms/step\u001b[0m\n", - "\u001b[34m#0151/1 [==============================] - ETA: 0s#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#0151/1 [==============================] - 0s 61ms/step\u001b[0m\n", - "\u001b[34m#0151/1 [==============================] - ETA: 0s#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#0151/1 [==============================] - 0s 58ms/step\u001b[0m\n", - "\u001b[34m#0151/1 [==============================] - ETA: 0s#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#0151/1 [==============================] - 0s 59ms/step\u001b[0m\n", - "\u001b[34m#0151/1 [==============================] - ETA: 0s#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#0151/1 [==============================] - 0s 58ms/step\u001b[0m\n", - "\u001b[34m#0151/1 [==============================] - ETA: 0s#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#0151/1 [==============================] - 0s 62ms/step\u001b[0m\n", - "\u001b[34m#0151/1 [==============================] - ETA: 0s#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#0151/1 [==============================] - 0s 61ms/step\u001b[0m\n", - "\u001b[34m#0151/1 [==============================] - ETA: 0s#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#0151/1 [==============================] - 0s 58ms/step\u001b[0m\n", - "\u001b[34m#0151/1 [==============================] - ETA: 0s#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#0151/1 [==============================] - 0s 59ms/step\u001b[0m\n", - "\u001b[34m#0151/1 [==============================] - ETA: 0s#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#0151/1 [==============================] - 0s 64ms/step\u001b[0m\n", - "\u001b[34m#0151/1 [==============================] - ETA: 0s#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#0151/1 [==============================] - 0s 62ms/step\u001b[0m\n", - "\u001b[34m#0151/1 [==============================] - ETA: 0s#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#0151/1 [==============================] - 0s 58ms/step\u001b[0m\n", - "\u001b[34m#0151/1 [==============================] - ETA: 0s#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#0151/1 [==============================] - 0s 58ms/step\u001b[0m\n", - "\u001b[34m#0151/1 [==============================] - ETA: 0s#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#0151/1 [==============================] - 0s 58ms/step\u001b[0m\n", - "\u001b[34m#0151/1 [==============================] - ETA: 0s#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#0151/1 [==============================] - 0s 58ms/step\u001b[0m\n", - "\u001b[34m#0151/1 [==============================] - ETA: 0s#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#0151/1 [==============================] - 0s 58ms/step\u001b[0m\n", - "\u001b[34m#0151/1 [==============================] - ETA: 0s#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#0151/1 [==============================] - 0s 60ms/step\u001b[0m\n", - "\u001b[34m#0151/1 [==============================] - ETA: 0s#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#0151/1 [==============================] - 0s 59ms/step\u001b[0m\n", - "\u001b[34m#0151/1 [==============================] - ETA: 0s#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#0151/1 [==============================] - 0s 61ms/step\u001b[0m\n", - "\u001b[34m#0151/1 [==============================] - ETA: 0s#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#0151/1 [==============================] - 0s 59ms/step\u001b[0m\n", - "\u001b[34m#0151/1 [==============================] - ETA: 0s#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#0151/1 [==============================] - 0s 58ms/step\u001b[0m\n", - "\u001b[34m#0151/1 [==============================] - ETA: 0s#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#0151/1 [==============================] - 0s 58ms/step\u001b[0m\n", - "\u001b[34m#0151/1 [==============================] - ETA: 0s#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#0151/1 [==============================] - 0s 61ms/step\u001b[0m\n", - "\u001b[34m#0151/1 [==============================] - ETA: 0s#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#0151/1 [==============================] - 0s 59ms/step\u001b[0m\n", - "\u001b[34m#0151/1 [==============================] - ETA: 0s#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#0151/1 [==============================] - 0s 64ms/step\u001b[0m\n", - "\u001b[34m#0151/1 [==============================] - ETA: 0s#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#0151/1 [==============================] - 0s 58ms/step\u001b[0m\n", - "\u001b[34m#0151/1 [==============================] - ETA: 0s#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#0151/1 [==============================] - 0s 59ms/step\u001b[0m\n", - "\u001b[34m#0151/1 [==============================] - ETA: 0s#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#0151/1 [==============================] - 0s 61ms/step\u001b[0m\n", - "\u001b[34m#0151/1 [==============================] - ETA: 0s#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#0151/1 [==============================] - 0s 61ms/step\u001b[0m\n", - "\u001b[34m#0151/1 [==============================] - ETA: 0s#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#0151/1 [==============================] - 0s 63ms/step\u001b[0m\n", - "\u001b[34m#0151/1 [==============================] - ETA: 0s#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#0151/1 [==============================] - 0s 60ms/step\u001b[0m\n", - "\u001b[34m#0151/1 [==============================] - ETA: 0s#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#0151/1 [==============================] - 0s 58ms/step\u001b[0m\n", - "\u001b[34m#0151/1 [==============================] - ETA: 0s#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#0151/1 [==============================] - 0s 58ms/step\u001b[0m\n", - "\u001b[34m#0151/1 [==============================] - ETA: 0s#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#0151/1 [==============================] - 0s 60ms/step\u001b[0m\n", - "\u001b[34m#0151/1 [==============================] - ETA: 0s#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#0151/1 [==============================] - 0s 62ms/step\u001b[0m\n", - "\u001b[34m#0151/1 [==============================] - ETA: 0s#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#0151/1 [==============================] - 0s 58ms/step\u001b[0m\n", - "\u001b[34m#0151/1 [==============================] - ETA: 0s#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#0151/1 [==============================] - 0s 61ms/step\u001b[0m\n", - "\u001b[34m#0151/1 [==============================] - ETA: 0s#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#0151/1 [==============================] - 0s 58ms/step\u001b[0m\n", - "\u001b[34m#0151/1 [==============================] - ETA: 0s#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#0151/1 [==============================] - 0s 61ms/step\u001b[0m\n", - "\u001b[34m#0151/1 [==============================] - ETA: 0s#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#0151/1 [==============================] - 0s 63ms/step\u001b[0m\n", - "\u001b[34m#0151/1 [==============================] - ETA: 0s#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#0151/1 [==============================] - 0s 58ms/step\u001b[0m\n", - "\u001b[34m#0151/1 [==============================] - ETA: 0s#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#0151/1 [==============================] - 0s 58ms/step\u001b[0m\n", - "\u001b[34m#0151/1 [==============================] - ETA: 0s#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#0151/1 [==============================] - 0s 58ms/step\u001b[0m\n", - "\u001b[34m#0151/1 [==============================] - ETA: 0s#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#0151/1 [==============================] - 0s 58ms/step\u001b[0m\n", - "\u001b[34m#0151/1 [==============================] - ETA: 0s#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#0151/1 [==============================] - 0s 61ms/step\u001b[0m\n", - "\u001b[34m#0151/1 [==============================] - ETA: 0s#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#0151/1 [==============================] - 0s 58ms/step\u001b[0m\n", - "\u001b[34m#0151/1 [==============================] - ETA: 0s#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#0151/1 [==============================] - 0s 62ms/step\u001b[0m\n", - "\u001b[34m#0151/1 [==============================] - ETA: 0s#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#0151/1 [==============================] - 0s 60ms/step\u001b[0m\n", - "\u001b[34m#0151/1 [==============================] - ETA: 0s#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#0151/1 [==============================] - 0s 61ms/step\u001b[0m\n", - "\u001b[34m#0151/1 [==============================] - ETA: 0s#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#0151/1 [==============================] - 0s 60ms/step\u001b[0m\n", - "\u001b[34m#0151/1 [==============================] - ETA: 0s#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#0151/1 [==============================] - 0s 59ms/step\u001b[0m\n", - "\u001b[34m#0151/1 [==============================] - ETA: 0s#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#0151/1 [==============================] - 0s 58ms/step\u001b[0m\n", - "\u001b[34m#0151/1 [==============================] - ETA: 0s#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#0151/1 [==============================] - 0s 60ms/step\u001b[0m\n", - "\u001b[34m#0151/1 [==============================] - ETA: 0s#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#0151/1 [==============================] - 0s 62ms/step\u001b[0m\n", - "\u001b[34m#0151/1 [==============================] - ETA: 0s#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#0151/1 [==============================] - 0s 60ms/step\u001b[0m\n", - "\u001b[34m#0151/1 [==============================] - ETA: 0s#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#0151/1 [==============================] - 0s 58ms/step\u001b[0m\n", - "\u001b[34m#0151/1 [==============================] - ETA: 0s#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#0151/1 [==============================] - 0s 58ms/step\u001b[0m\n", - "\u001b[34m#0151/1 [==============================] - ETA: 0s#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#0151/1 [==============================] - 0s 59ms/step\u001b[0m\n", - "\u001b[34m#0151/1 [==============================] - ETA: 0s#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#010#0151/1 [==============================] - 0s 61ms/step\u001b[0m\n", - "\n" - ] - } - ], + "outputs": [], "source": [ "script_processor.run(\n", " code='evaluation.py',\n", @@ -876,84 +309,9 @@ }, { "cell_type": "code", - "execution_count": 63, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'accuracy': {'standard_deviation': 'NaN', 'value': 0.9895833333333334},\n", - " 'confusion_matrix': {'013.Bobolink': {'013.Bobolink': 11,\n", - " '017.Cardinal': 0,\n", - " '035.Purple_Finch': 1,\n", - " '036.Northern_Flicker': 0,\n", - " '047.American_Goldfinch': 0,\n", - " '068.Ruby_throated_Hummingbird': 0,\n", - " '073.Blue_Jay': 0,\n", - " '087.Mallard': 0},\n", - " '017.Cardinal': {'013.Bobolink': 0,\n", - " '017.Cardinal': 12,\n", - " '035.Purple_Finch': 0,\n", - " '036.Northern_Flicker': 0,\n", - " '047.American_Goldfinch': 0,\n", - " '068.Ruby_throated_Hummingbird': 0,\n", - " '073.Blue_Jay': 0,\n", - " '087.Mallard': 0},\n", - " '035.Purple_Finch': {'013.Bobolink': 0,\n", - " '017.Cardinal': 0,\n", - " '035.Purple_Finch': 12,\n", - " '036.Northern_Flicker': 0,\n", - " '047.American_Goldfinch': 0,\n", - " '068.Ruby_throated_Hummingbird': 0,\n", - " '073.Blue_Jay': 0,\n", - " '087.Mallard': 0},\n", - " '036.Northern_Flicker': {'013.Bobolink': 0,\n", - " '017.Cardinal': 0,\n", - " '035.Purple_Finch': 0,\n", - " '036.Northern_Flicker': 12,\n", - " '047.American_Goldfinch': 0,\n", - " '068.Ruby_throated_Hummingbird': 0,\n", - " '073.Blue_Jay': 0,\n", - " '087.Mallard': 0},\n", - " '047.American_Goldfinch': {'013.Bobolink': 0,\n", - " '017.Cardinal': 0,\n", - " '035.Purple_Finch': 0,\n", - " '036.Northern_Flicker': 0,\n", - " '047.American_Goldfinch': 12,\n", - " '068.Ruby_throated_Hummingbird': 0,\n", - " '073.Blue_Jay': 0,\n", - " '087.Mallard': 0},\n", - " '068.Ruby_throated_Hummingbird': {'013.Bobolink': 0,\n", - " '017.Cardinal': 0,\n", - " '035.Purple_Finch': 0,\n", - " '036.Northern_Flicker': 0,\n", - " '047.American_Goldfinch': 0,\n", - " '068.Ruby_throated_Hummingbird': 12,\n", - " '073.Blue_Jay': 0,\n", - " '087.Mallard': 0},\n", - " '073.Blue_Jay': {'013.Bobolink': 0,\n", - " '017.Cardinal': 0,\n", - " '035.Purple_Finch': 0,\n", - " '036.Northern_Flicker': 0,\n", - " '047.American_Goldfinch': 0,\n", - " '068.Ruby_throated_Hummingbird': 0,\n", - " '073.Blue_Jay': 12,\n", - " '087.Mallard': 0},\n", - " '087.Mallard': {'013.Bobolink': 0,\n", - " '017.Cardinal': 0,\n", - " '035.Purple_Finch': 0,\n", - " '036.Northern_Flicker': 0,\n", - " '047.American_Goldfinch': 0,\n", - " '068.Ruby_throated_Hummingbird': 0,\n", - " '073.Blue_Jay': 0,\n", - " '087.Mallard': 12}},\n", - " 'f1': {'standard_deviation': 'NaN', 'value': 0.9895833333333334},\n", - " 'precision': {'standard_deviation': 'NaN', 'value': 0.9895833333333334},\n", - " 'recall': {'standard_deviation': 'NaN', 'value': 0.9895833333333334}}\n" - ] - } - ], + "outputs": [], "source": [ "import pprint as pp\n", "s3 = boto3.resource('s3')\n", @@ -974,42 +332,20 @@ }, { "cell_type": "code", - "execution_count": 64, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "download: s3://sagemaker-us-east-1-628084464172/postprocessing-model-evaluation/outputs/evaluation/confusion_matrix.png to ./confusion_matrix.png\n" - ] - } - ], + "outputs": [], "source": [ "cf_matrix_file = f's3://{bucket}/{prefix}/outputs/evaluation/confusion_matrix.png'\n", - "!aws s3 cp $cf_matrix_file_path ." + "!aws s3 cp $cf_matrix_file ." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ - "![confusion_matrix.png](confusion_matrix.png)" + "![confusion_matrix.png](./confusion_matrix.png)" ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] } ], "metadata": {