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

Method read

dm_control/composer/observation/obs_buffer.py:162–171  ·  view source on GitHub ↗

Reads the content of the buffer at the given timestamp.

(self, current_time)

Source from the content-addressed store, hash-verified

160 'got {!r}'.format(delay))
161
162 def read(self, current_time):
163 """Reads the content of the buffer at the given timestamp."""
164 self._update_arrived_deque(current_time)
165 if self._has_buffer_dim:
166 out = np.empty(self._buffered_shape, dtype=self._dtype)
167 for i, obs in enumerate(self._arrived_deque):
168 out[i] = obs.value
169 else:
170 out = self._arrived_deque[0].value.copy()
171 return out
172
173 def drop_unobserved_upcoming_items(self, observation_schedule, read_interval):
174 """Plans an optimal observation schedule for an upcoming control period.

Callers 15

testOutOfOrderArrivalMethod · 0.95
aggregate_dictMethod · 0.80
GetResourceFunction · 0.80
testParseFromStringMethod · 0.80
testGetAssetFromFileMethod · 0.80
testGetAssetsFromDictMethod · 0.80
testAssetsCanBeCopiedMethod · 0.80
test_export_modelMethod · 0.80
test_full_debug_dumpMethod · 0.80
from_zipFunction · 0.80
testFileFromPathMethod · 0.80

Calls 2

_update_arrived_dequeMethod · 0.95
copyMethod · 0.45

Tested by 12

testOutOfOrderArrivalMethod · 0.76
testParseFromStringMethod · 0.64
testGetAssetFromFileMethod · 0.64
testGetAssetsFromDictMethod · 0.64
testAssetsCanBeCopiedMethod · 0.64
test_export_modelMethod · 0.64
test_full_debug_dumpMethod · 0.64
testFileFromPathMethod · 0.64
test_export_modelMethod · 0.64
_parse_line_refsFunction · 0.64
testLoadXMLMethod · 0.64