Skip to content

DreamConfigError

class DreamConfigError(DreamError, ValueError)

Importable as dream.DreamConfigError.

Something the caller passed or configured is wrong; the message says what, and the same call fails again.

The causes a customer meets:

  • no API key: pass api_key, or set DREAM_API_KEY in the environment or in ~/.dreamlabs/credentials;
  • an API key holding a character an HTTP header cannot carry (a line break, a typographic quote): copy the key again;
  • a URL that is not http(s)://<host>[:<port>] (in the credentials, or passed to DreamClient), a host name that is not valid (a space, an empty label), or a credentials file that cannot be read; the message names the URL or the file;
  • a config key of the wrong type or range, a missing checkpoint, or a key the client does not take (DreamClient.policy());
  • DreamClient.set_observation(), DreamClient.get_action() or another inference call before DreamClient.policy();
  • an embodiment config that is not valid (the message names the key or part);
  • a dataset path that is not a directory or cannot be listed, or a request value JSON cannot carry (a numpy number as a fine-tuning knob: pass a Python int or float);
  • the dataset dependencies missing; the message says how to install the library with them.

The model refusing a request as malformed (DA-4000) is DreamBadRequest, a subclass.

Raised by

Subclasses: DreamBadRequest