Now that we know how to wait for all our evaluation to finish, we still need to get the evaluation result and delete the models and datasources we have created. As in the case of the get-evaluation AWS CLI command, the Boto3 get_evaluation method returns a JSON string with the model performance measure, the RMSE in the case of regression. The following script wraps up our trial:
t0 = time.time()# declare the waiter and call the wait method on the evaluationwaiter = client.get_waiter('evaluation_available')print("Waiting on evaluation to finish ")waiter.wait(FilterVariable='Name', EQ=name_id_generation('EVAL', '', trial)['Name'])t = time.time() - t0print("Evaluation has finished after %sm %ss"% (int(t/60), ...