Jump to content

Connect SuperML | Leeroopedia MCP: Equip your AI agents with best practices, code verification, and debugging knowledge. Powered by Leeroo — building Organizational Superintelligence. Contact us at founders@leeroo.com.

Implementation:Google deepmind Dm control Manipulation Registry

From Leeroopedia
Metadata
Knowledge Sources dm_control
Domains Reinforcement Learning, Robotics Simulation, Environment Management
Last Updated 2026-02-15 00:00 GMT

Overview

Concrete tool for discovering available manipulation task environments through the global tag-based registry in dm_control.

Description

The manipulation registry is a thin facade over a TaggedTasks container from dm_control.utils.containers. It exposes module-level functions that delegate to a single private _ALL_CONSTRUCTORS instance. Task modules (such as reach, lift, place, and bricks) register their factory functions using the @registry.add(*tags) decorator at import time. The decorator stores the decorated function under its __name__ and associates it with the supplied tag strings (e.g. 'features', 'vision', 'easy').

After all task modules have been imported, done_importing_tasks() is called to flip allow_overriding_keys to True, which permits safe hot-reloading of task modules in interactive sessions (e.g. IPython with the autoreload extension).

The registry provides three discovery functions:

  • get_all_names() -- returns a KeysView of all registered environment names.
  • get_tags() -- returns a list of all tag strings that have been applied to at least one task.
  • get_names_by_tag(tag) -- returns a dict of {name: factory} for all tasks carrying the specified tag.

An additional get_constructor(name) function retrieves the factory callable for a given environment name, used internally by the load() entry point.

Usage

Developers use the registry to enumerate tasks before loading them. For example, a benchmarking script may iterate over all features tasks, or a GUI explorer may present the full list of names in a selection prompt.

Code Reference

Attribute Value
Source Location dm_control/manipulation/shared/registry.py, lines 17--37
Signatures get_all_names() -> KeysView
get_tags() -> list
get_names_by_tag(tag: str) -> dict
get_constructor(name: str) -> Callable
done_importing_tasks() -> None
Import from dm_control.manipulation.shared import registry

I/O Contract

Inputs

Function Parameter Type Description
get_names_by_tag tag str A tag string such as 'features', 'vision', or 'easy'.
get_constructor name str The registered environment name, e.g. 'reach_site_features'.

Outputs

Function Return Type Description
get_all_names() KeysView[str] All registered environment names in insertion order.
get_tags() list[str] All tag strings present in the registry.
get_names_by_tag(tag) dict[str, Callable] Mapping from environment names to their factory functions for the given tag.
get_constructor(name) Callable[[], composer.Task] The zero-argument factory function for the named environment.

Usage Examples

from dm_control.manipulation.shared import registry
from dm_control import manipulation

# After importing the manipulation package, the registry is populated.
# List every available environment name.
all_names = list(registry.get_all_names())
print(all_names)
# e.g. ['reach_duplo_features', 'reach_duplo_vision', 'reach_site_features', ...]

# List all tags.
tags = registry.get_tags()
print(tags)
# e.g. ['features', 'easy', 'vision']

# Get only the tasks tagged as 'vision'.
vision_tasks = registry.get_names_by_tag('vision')
print(list(vision_tasks.keys()))
# e.g. ['reach_duplo_vision', 'reach_site_vision', 'lift_brick_vision', ...]

# Retrieve a single constructor and call it to build a task.
constructor = registry.get_constructor('reach_site_features')
task = constructor()  # Returns a composer.Task instance

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment