ferruzzi commented on code in PR #23628:
URL: https://github.com/apache/airflow/pull/23628#discussion_r894903355


##########
airflow/providers/amazon/aws/operators/sagemaker.py:
##########
@@ -188,7 +193,7 @@ def execute(self, context: 'Context') -> dict:
         )
         if response['ResponseMetadata']['HTTPStatusCode'] != 200:
             raise AirflowException(f'Sagemaker Processing Job creation failed: 
{response}')
-        return {'Processing': 
self.hook.describe_processing_job(self.config['ProcessingJobName'])}
+        return {'Processing': 
serialize(self.hook.describe_processing_job(self.config['ProcessingJobName']))}

Review Comment:
   Thanks for the bump :stuck_out_tongue:   For some reason this got stuck as a 
comment on a pending review instead of a reply.  Strange.  Sorry.
   
   ```
   {
        'ProcessingInputs': [
                {
                        'InputName': 'input', 
                        'AppManaged': False, 
                        'S3Input': {
                                'S3Uri': 
's3://bucket/project/preprocessing/input.csv', 
                                'LocalPath': '/opt/ml/processing/input', 
                                'S3DataType': 'S3Prefix', 
                                'S3InputMode': 'File', 
                                'S3DataDistributionType': 'FullyReplicated', 
                                'S3CompressionType': 'None'
                        }
                }
        ], 
        'ProcessingOutputConfig': {
                'Outputs': [
                        {
                                'OutputName': 'output', 
                                'S3Output': {
                                        'S3Uri': 
's3://bucket/project/processed-input-data', 
                                        'LocalPath': 
'/opt/ml/processing/output', 
                                        'S3UploadMode': 'EndOfJob'
                                },
                                'AppManaged': False
                        }
                ]
        }, 
        'ProcessingJobName': 'project-processing', 
        'ProcessingResources': {
                'ClusterConfig': {
                        'InstanceCount': 1, 
                        'InstanceType': 'ml.m5.large', 
                        'VolumeSizeInGB': 1
                }
        }, 
        'StoppingCondition': {
                'MaxRuntimeInSeconds': 300
        }, 
        'AppSpecification': {
                'ImageUri': 
'123456789012.dkr.ecr.re-gio-n.amazonaws.com/process_data'}, 
                'RoleArn': 
'arn:aws:iam::123456789012:role/service-role/SageMaker-Role', 
                'ProcessingJobArn': 
'arn:aws:sagemaker:re-gio-n:123456789012:processing-job/project-processing', 
                'ProcessingJobStatus': 'Completed', 
                'ProcessingEndTime': datetime.datetime(2022, 6, 7, 14, 1, 25, 
200000, tzinfo=tzlocal()), 
                'ProcessingStartTime': datetime.datetime(2022, 6, 7, 14, 1, 6, 
34000, tzinfo=tzlocal()), 
                'LastModifiedTime': datetime.datetime(2022, 6, 7, 14, 1, 25, 
443000, tzinfo=tzlocal()), 
                'CreationTime': datetime.datetime(2022, 6, 7, 13, 57, 29, 
487000, tzinfo=tzlocal()), 
                'ResponseMetadata': {
                        'RequestId': 'fy2r5b9e-552a-3759-7b2a-d15ef4f32dj3', 
                        'HTTPStatusCode': 200, 
                        'HTTPHeaders': {
                                'x-amzn-requestid': 
'fy2r5b9e-552a-3759-7b2a-d15ef4f32dj3', 
                                'content-type': 'application/x-amz-json-1.1', 
                                'content-length': '1244', 
                                'date': 'Tue, 07 Jun 2022 14:01:30 GMT'
                        }, 
                'RetryAttempts': 0
        }
   }
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to