def _find_latest_dir(s3_bucket, dir_path):
    """
    Finds the latest model directory by using the directory name. Since
    saved models use timestamp as the folder name, takes the maximum timestamp
    value as the latest directory
    """
    obj_list = []
    for obj_summary in s3_bucket.objects.filter(Prefix=dir_path):
        # get the version number for each file
        obj_list.append(int(obj_summary.key.lstrip(dir_path).split('/')[0]))
    latest_dir = str(max(obj_list)) + '/'
    return latest_dir