DreamSlowNetworkWarning
class DreamSlowNetworkWarning(UserWarning)
Importable as dream.DreamSlowNetworkWarning.
A Python warning, not an error: the inference client’s recent round trips are slow, and the robot’s motion may be less smooth.
get_action() issues it when the median of the last five round trips is at or above 1000 ms, with where the time goes: the network, when it is the largest part (with the upload rate when it is known), or the model. The action is returned as usual; the warning is never raised out of get_action(), even when warnings are turned into errors. It is issued once, then not again for five minutes while the round trips stay slow, unless they first recover (their median under 800 ms) and then slow down again. The same line goes to the dream logger, so it is in the client’s log file too. For the figures of each call, read last_timing on the inference client.
Example
import warnings import dream # Turn the warning off for the whole program; the `dream` log still records it. warnings.filterwarnings("ignore", category=dream.DreamSlowNetworkWarning)