Skip to content

Update for Flux 0.10#42

Open
jstrube wants to merge 3 commits into
FluxML:masterfrom
jstrube:patch-1
Open

Update for Flux 0.10#42
jstrube wants to merge 3 commits into
FluxML:masterfrom
jstrube:patch-1

Conversation

@jstrube

@jstrube jstrube commented Apr 25, 2020

Copy link
Copy Markdown

I've been trying to get the Gym working for the control problems in the model zoo.
These fixes to Gym (together with fixes in the model zoo) allowed me to get this working with the latest version of Flux

Comment thread src/Envs/env_wrapper.jl
return env._env.state
end
end
return _get_obs(env._env)

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.

Any reason to get rid of the catch?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I don't recall exactly what the error message was that caused me to remove it. Maybe Zygote can't differentiate through it?

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.

Ah yes we don't support try blocks in zygote yet.

But this would seem to break Gym's assumptions about what to do in case of an error here. I'm happy to have a wrapper method that would dispatch accordingly to get rid of try block

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We could have a _get_obs which by default returns env._env.state

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.

Can we have that dispatched correctly and have this merged then?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I don't understand enough about this to implement "correct dispatch", but I think you can edit the pull request.

Comment thread src/Envs/env_wrapper.jl

trainable(env::EnvWrapper) = env.train
game_over(env::EnvWrapper) = env.done No newline at end of file
game_over(env::EnvWrapper) = env.done

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.

Formatting error

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Oh, funny. I didn't realize I had touched that line. I had used the web editor. If this is a problem, I think you have permission to fix this inline.

@DhairyaLGandhi

Copy link
Copy Markdown
Member

cc @tejank10

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants