Skip to content

Commit 1f8629d

Browse files
sbohezcopybara-github
authored andcommitted
Add Identity variation class that simply returns current value.
PiperOrigin-RevId: 426888877 Change-Id: I25865a8629c4d750b1ba52331b87a92f4cbb6b9f
1 parent 1b8562c commit 1f8629d

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

dm_control/composer/variation/deterministic.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,3 +46,9 @@ def __call__(self, initial_value=None, current_value=None, random_state=None):
4646
except StopIteration:
4747
self._iterator = iter(self._values)
4848
return next(self._iterator)
49+
50+
51+
class Identity(base.Variation):
52+
53+
def __call__(self, initial_value=None, current_value=None, random_state=None):
54+
return current_value

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ def is_excluded(s):
192192

193193
setup(
194194
name='dm_control',
195-
version='0.0.425478996',
195+
version='0.0.426888877',
196196
description='Continuous control environments and MuJoCo Python bindings.',
197197
author='DeepMind',
198198
license='Apache License, Version 2.0',

0 commit comments

Comments
 (0)