Example #1
0
def _list_registered_models():
    _get_request_message(ListRegisteredModels())
    registered_models_detailed = _get_model_registry_store().list_registered_models()
    response_message = ListRegisteredModels.Response()
    response_message.registered_models_detailed.extend([e.to_proto()
                                                        for e in registered_models_detailed])
    return _wrap_response(response_message)
Example #2
0
def _list_registered_models():
    request_message = _get_request_message(ListRegisteredModels())
    registered_models = _get_model_registry_store().list_registered_models(
        request_message.max_results, request_message.page_token)
    response_message = ListRegisteredModels.Response()
    response_message.registered_models.extend(
        [e.to_proto() for e in registered_models])
    if registered_models.token:
        response_message.next_page_token = registered_models.token
    return _wrap_response(response_message)