Skip to content

RoundTrip

class RoundTrip

Importable as dream.RoundTrip.

One get_action(): what the model was sent and what came back; DreamClient.on_round_trip() hands it over.

Attributes

Read-only: the record is frozen.

  • sent_s (float): When the request went out, seconds since the epoch (time.time()).
  • frames (dict[str, list[str]]): Per frame key (video.<role>), the base64 JPEGs sent, oldest first: the frames the model saw.
  • observation (dict[str, Any]): Every other key sent: the state and the prompt, as set_observation() was given them.
  • action (dict[str, Any] | None): The dict get_action() returned; None when it raised.
  • timing (dict[str, Any] | None): DreamClient.last_timing after the call; None when nothing reached the network, or when a reply given to add() carries none (a refusal).
  • error (DreamError | None): What get_action() raised, a DreamError (a refusal is a DreamServerError, with code and reason); None when it returned.
  • trained (list[str]): Where the episode’s frames or prompt differ from what the fine-tune was trained on, one line each (trained_inputs); empty when they match, for a model that is not one of your fine-tunes, and for add().