-
Notifications
You must be signed in to change notification settings - Fork 33
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
Preprocessor refactoring #220
Comments
Yes this makes sense to me. The GFNModule would be able to handle raw and
pre-processes states using whatever preprocessor is passed to it.
Joseph Viviano
@josephdviviano <https://twitter.com/josephdviviano>
viviano.ca
…On Sun, Nov 17, 2024 at 10:31 AM Omar Younis ***@***.***> wrote:
I believe preprocessors should not be part of the Env class, and they
should kept separate.
1.
These lines in env examples don't scale well:
https://github.com/GFNOrg/torchgfn/blob/6f132a869902584c06b7f8054e76dda696d78c94/src/gfn/gym/hypergrid.py#L58-L72
2.
It seems they are not used inside the env class, but they are just
passed to GFNModule, which is a better location.
https://github.com/GFNOrg/torchgfn/blob/6f132a869902584c06b7f8054e76dda696d78c94/testing/test_gflownet.py#L40-L46
I believe they should be instantiated by the user and eventually passed to
GFNModule.
—
Reply to this email directly, view it on GitHub
<#220>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA7TL2X27CXAQSGOXTIC5HT2BCZFNAVCNFSM6AAAAABR6BK5QSVHI2DSMVQWIX3LMV43ASLTON2WKOZSGY3DMMBQHAZDENQ>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
By the way, this was the case 2 years ago. In fact, back then, we used to define an This big commit, which is actually more of a code restructure than a mere commit, changed that. I had put the preprocessor in the environment. Given the current structure of the code base, and the fact that |
I believe preprocessors should not be part of the Env class, and they should kept separate.
These lines in env examples don't scale well:
torchgfn/src/gfn/gym/hypergrid.py
Lines 58 to 72 in 6f132a8
It seems they are not used inside the env class, but they are just passed to GFNModule, which is a better location.
torchgfn/testing/test_gflownet.py
Lines 40 to 46 in 6f132a8
I believe they should be instantiated by the user and eventually passed to GFNModule.
The text was updated successfully, but these errors were encountered: