MCPcopy Create free account
hub / github.com/google-deepmind/dm_control / launch

Function launch

dm_control/viewer/__init__.py:22–40  ·  view source on GitHub ↗

Launches an environment viewer. Args: environment_loader: An environment loader (a callable that returns an instance of dm_control.rl.control.Environment), an instance of dm_control.rl.control.Environment. policy: An optional callable corresponding to a policy to execute withi

(environment_loader, policy=None, title='Explorer', width=1024,
           height=768)

Source from the content-addressed store, hash-verified

20
21
22def launch(environment_loader, policy=None, title='Explorer', width=1024,
23 height=768):
24 """Launches an environment viewer.
25
26 Args:
27 environment_loader: An environment loader (a callable that returns an
28 instance of dm_control.rl.control.Environment), an instance of
29 dm_control.rl.control.Environment.
30 policy: An optional callable corresponding to a policy to execute within the
31 environment. It should accept a `TimeStep` and return a numpy array of
32 actions conforming to the output of `environment.action_spec()`.
33 title: Application title to be displayed in the title bar.
34 width: Window width, in pixels.
35 height: Window height, in pixels.
36 Raises:
37 ValueError: When 'environment_loader' argument is set to None.
38 """
39 app = application.Application(title=title, width=width, height=height)
40 app.launch(environment_loader=environment_loader, policy=policy)

Callers

nothing calls this directly

Calls 1

launchMethod · 0.95

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…