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

Method observation_spec

dm_control/rl/control.py:359–371  ·  view source on GitHub ↗

Optional method that returns the observation spec. If not implemented, the Environment infers the spec from the observation. Args: physics: Instance of `Physics`. Returns: A dict mapping observation name to `ArraySpec` containing observation shape and dtype.

(self, physics)

Source from the content-addressed store, hash-verified

357 """If the episode should end, returns a final discount, otherwise None."""
358
359 def observation_spec(self, physics):
360 """Optional method that returns the observation spec.
361
362 If not implemented, the Environment infers the spec from the observation.
363
364 Args:
365 physics: Instance of `Physics`.
366
367 Returns:
368 A dict mapping observation name to `ArraySpec` containing observation
369 shape and dtype.
370 """
371 raise NotImplementedError()
372
373
374def flatten_observation(observation, output_key=FLAT_OBSERVATION_KEY):

Callers 6

test_task_runsMethod · 0.45
observation_specMethod · 0.45
test_observation_specMethod · 0.45
test_env_runsMethod · 0.45
test_step_environmentMethod · 0.45
test_num_playersMethod · 0.45

Calls

no outgoing calls

Tested by 5

test_task_runsMethod · 0.36
test_observation_specMethod · 0.36
test_env_runsMethod · 0.36
test_step_environmentMethod · 0.36
test_num_playersMethod · 0.36