Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The proxy should not be copied into each environment instance #288

Closed
alexhernandezgarcia opened this issue Feb 19, 2024 · 2 comments
Closed
Assignees
Labels
help wanted Extra attention is needed

Comments

@alexhernandezgarcia
Copy link
Owner

alexhernandezgarcia commented Feb 19, 2024

Currently, the proxy is set as an attribute of the environments and the base environment implements the methods proxy2reward() and reward2proxy() that determine the conversion between proxy outputs and reward. The environment also implements the methods reward() and reward_batch(), which call the proxy and the conversion methods. This is probably not ideal for various reasons.

I do not see any longer a good reason to keep the proxy and these methods within the environment. It seems possible and a good idea to completely detach the environment and the proxy. Some proxies need information from the environment, which is currently set via the call to Env.setup_proxy(), which calls the proxy's setup() method. But this could just be done elsewhere.

Now, in terms of alternatives, I am not completely settled on what the best option would be. In particular, where should the methods that convert between proxy and reward go?

  • In the (base) proxy?
  • In the GFlowNet agent?
@alexhernandezgarcia alexhernandezgarcia self-assigned this Feb 19, 2024
@alexhernandezgarcia alexhernandezgarcia added the help wanted Extra attention is needed label Mar 19, 2024
@alexhernandezgarcia alexhernandezgarcia pinned this issue Mar 19, 2024
@alexhernandezgarcia
Copy link
Owner Author

It seems that it would be better to have the methods in the base proxy class, so as to make it easier for non-GFN baselines to re-use the GFlowNet code.

@alexhernandezgarcia
Copy link
Owner Author

Done in PR #299

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant