Wrapping up the Python-based workflow

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), ...

Get Effective Amazon Machine Learning now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.