I have a arn: arn:aws:sagemaker:us-east-2:XXXXXXX:automl-job/auto-insurence-test12345
the above is created using the below lambda
import json
import boto3
def lambda_handler(event, context):
# Initialize the SageMaker client
sagemaker_client = boto3.client('sagemaker')
# Define parameters for the AutoPilot job
job_name = 'auto-insurence-test12345' # Change this to your desired job name
target_attribute_name = 'charges' # Change this to your target column name
input_data_config = [{
'DataSource': {
'S3DataSource': {
'S3DataType': 'S3Prefix',
'S3Uri': 's3://automldyd/insurance.csv', # Change to your input data
}
},
'TargetAttributeName': target_attribute_name # Specify the target attribute name
}]
output_data_config = {
'S3OutputPath': 's3://automldyd/', # Change to your output bucket
}
# Create the AutoPilot job
try:
response = sagemaker_client.create_auto_ml_job(
AutoMLJobName=job_name,
InputDataConfig=input_data_config,
OutputDataConfig=output_data_config,
RoleArn='arn:aws:iam::XXXXXXXXXXXXXX:role/AmazonSageMaker-role-dyd', # Change to your IAM role
AutoMLJobConfig={
'CompletionCriteria': {
'MaxCandidates': 5, # Change as needed
'MaxRuntimePerTrainingJobInSeconds': 3600, # Change as needed
},
'Mode': 'AUTO' # Can be 'AUTOMATED' or 'ENSEMBLE'
}
)
return {
'statusCode': 200,
'body': json.dumps({
'message': 'AutoPilot job started successfully',
'AutoMLJobArn': response['AutoMLJobArn']
})
}
except Exception as e:
return {
'statusCode': 500,
'body': json.dumps({
'message': 'Failed to start AutoPilot job',
'error': str(e)
})
}
Now searched sagemaker in aws console and dont know where to see the details of the arn arn:aws:sagemaker:us-east-2:XXXXXXX:automl-job/auto-insurence-test12345
can someone guide me
What I checked is
i can see some processing jobs are created
I can see some s3 bucket of the job name is also created and filled with some folders