Missed TensorFlow Dev Summit? Check out the video playlist. Watch recordings

tfx.components.infra_validator.model_server_clients.tensorflow_serving_client.TensorFlowServingClient

View source on GitHub

A model server client for TensorFlow Serving.

Inherits From: BaseModelServerClient

tfx.components.infra_validator.model_server_clients.tensorflow_serving_client.TensorFlowServingClient(
    endpoint, model_name
)

It uses gRPC client to talk to TensorFlow Serving server.

Methods

SendRequests

View source

SendRequests(
    requests
)

Send requests to the model server.

Args:

  • requests: A list of request protos.

Raises:

  • ValidationFailed: If error occurred while sending requests.

WaitUntilModelLoaded

View source

WaitUntilModelLoaded(
    deadline, polling_interval_sec
)

Wait until model is loaded and available.

Args:

  • deadline: A deadline time in UTC timestamp (in seconds).
  • polling_interval_sec: GetServingStatus() polling interval.

Raises:

  • DeadlineExceeded: When deadline exceeded before model is ready.
  • ValidationFailed: If validation failed explicitly.