View source on GitHub |
Sends grpc requests to profiler server to perform on-demand monitoring.
tf.profiler.experimental.client.monitor(
service_addr, duration_ms, level=1
)
The monitoring result is a light weight performance summary of your model execution. This method will block the caller thread until it receives the monitoring result. This method currently supports Cloud TPU only.
Returns | |
---|---|
A string of monitoring output. |
Example usage:
# Continuously send gRPC requests to the Cloud TPU to monitor the model
# execution.
for query in range(0, 100):
print(
tf.profiler.experimental.client.monitor('grpc://10.0.0.2:8466', 1000))