Skip to content

Add wrappers to cast observations - #160

Merged
toslunar merged 10 commits into
chainer:masterfrom
muupan:cast-obs
Sep 4, 2018
Merged

Add wrappers to cast observations#160
toslunar merged 10 commits into
chainer:masterfrom
muupan:cast-obs

Conversation

@muupan

@muupan muupan commented Nov 7, 2017

Copy link
Copy Markdown
Member

This PR adds two env wappers that inherit gym.Wrapper: CastObservation, CastObservationToFloat32.

I think using these wrappers instead of passing phi makes code easier to read, so the examples are also updated accordingly.

Related to #79 and #132

@muupan
muupan requested a review from toslunar September 3, 2018 04:39
class TestCastObservationToFloat32(unittest.TestCase):

def test_cast_observation(self):
env = chainerrl.wrappers.CastObservation(

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test chainerrl.wrappers.CastObservationToFloat32

Comment thread chainerrl/wrappers/cast_observation.py
@muupan

muupan commented Sep 3, 2018

Copy link
Copy Markdown
Member Author

Thank you for the review! I resolved all the points.

@muupan muupan mentioned this pull request Sep 3, 2018

@toslunar toslunar left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@toslunar
toslunar merged commit 07b1279 into chainer:master Sep 4, 2018
@toslunar toslunar added this to the v0.5 milestone Sep 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants