Namespace

Create Namespace

minari.namespace.create_namespace(namespace: str, description: str | None = None, **kwargs) None[source]

Create a local namespace.

Namespaces are a directory-like structure that can contain multiple datasets, or other namespaces. Namespaces are prepended onto a dataset_id with a forward slash. For example a dataset with id cartpole/test-v0 resides in the cartpole namespace. Namespaces can be nested.

Note: The namespace API is an experimental feature and may change in future releases.

Parameters:
  • namespace (str) – identifier for namespace created/updated.

  • description (str | None) – string metadata describing the namespace. Defaults to None.

  • **kwargs – any other metadata in addition to the description.

Update Namespace

Get Local Namespace Metadata

minari.namespace.get_namespace_metadata(namespace: str) Dict[str, Any][source]

Load local namespace metadata.

Note: The namespace API is an experimental feature and may change in future releases.

Parameters:

namespace (str) – identifier for local namespace.

Returns:

Dict[str, Any] – metadata dict.

Download Namespace Metadata

minari.namespace.download_namespace_metadata(namespace: str, overwrite: bool = False) None[source]

Download remote namespace to local database.

Note: The namespace API is an experimental feature and may change in future releases.

Parameters:
  • namespace (str) – identifier for the remote namespace.

  • overwrite (bool) – whether to overwrite existing local metadata. Defaults to False.

Upload Namespace

minari.namespace.upload_namespace(namespace: str, key_path: str) None[source]

Upload a local namespace to the remote server.

If you would like to upload a namespace please first get in touch with the Farama team at contact@farama.org.

Note: The namespace API is an experimental feature and may change in future releases.

Parameters:
  • namespace (str) – identifier for the local namespace.

  • key_path (str) – path to the credentials file.

List Namespaces

minari.namespace.list_local_namespaces() List[str][source]

Get the names of the namespaces in the local database.

Note: The namespace API is an experimental feature and may change in future releases.

Returns:

List[str] – names of all local namespaces.

minari.namespace.list_remote_namespaces() List[str][source]

Get the names of the namespaces in the remote server.

Note: The namespace API is an experimental feature and may change in future releases.

Returns:

List[str] – names of all remote namespaces.

Delete Namespace

minari.namespace.delete_namespace(namespace: str) None[source]

Delete local namespace. Only empty namespaces can be deleted.

Note: The namespace API is an experimental feature and may change in future releases.

Parameters:

namespace (str) – identifier for local namespace.