aws-solutions-library-samples / guidance-for-training-an-aws-deepracer-model-using-amazon-sagemaker

DeepRacer workshop content. This Guidance demonstrates how software developers can use an Amazon SageMaker Notebook instance to directly train and evaluate AWS DeepRacer models with full control
https://aws.amazon.com/solutions/guidance/training-an-aws-deepracer-model-using-amazon-sagemaker/
MIT No Attribution
1.24k stars 714 forks source link

KeyError: 'outputLocation' when trying to get all the info #49

Closed raycblai closed 1 year ago

raycblai commented 4 years ago

At the following codes within the DeepRacer log analysis, the job_desc from the json outcome of robomaker.escribe_simulation_job did not have the key "outputLocation" (KeyError: 'outputLocation'). Therefore, we could not locate the s3_bucket and s3_prefix for the simtrace log and retrieve the corresponding csv file. Below please find the codes as well as the screenshot of the error.

Get all the infro

job_desc = robomaker.describe_simulation_job(job=robomaker_job_arn)

is_training = job_desc['simulationApplications'][0]['launchConfig']['launchFile'] == "distributed_training.launch" s3_bucket = job_desc['outputLocation']['s3Bucket'] s3_prefix = job_desc['outputLocation']['s3Prefix'] job_type = "training" if is_training else "evaluation" simtrace_path = "iteration-data/{}/".format(job_type)

Downlaod all the simtrace iteration data

!aws s3 sync s3://{s3_bucket}/{s3_prefix}/{simtrace_path} ./tmp --exclude "" --include "-{job_type}-simtrace.csv"

Screenshot 2020-07-03 at 5 26 23 PM