Skip to main content

dreamscale.connect

Starts a cloud session and returns a policy. Use it as a context manager, or call policy.close() when done. await dreamscale.aconnect(...) takes the same arguments and returns an async policy.

Policy

run callbacks

  • observe(context) returns an observation.
  • act(action, context) sends one action to the robot. Return True to stop.
Pass hooks=dreamscale.RunHooks(on_timing=..., on_buffer=..., on_summary=...) for timing and buffer events.

Results

ActionChunkResult from predict(): RunResult from run():

Observation helpers

All arguments are keyword-only. Units and ordering are on Models.

Errors

All SDK errors subclass dreamscale.errors.DreamscaleError. Each has error.info.problem, cause, and fix, and error.render() formats them. CapacityError means no GPU is available for this model and region right now: