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

Refactoring ideas regarding the preprocessor #194

Open
hyeok9855 opened this issue Oct 11, 2024 · 2 comments
Open

Refactoring ideas regarding the preprocessor #194

hyeok9855 opened this issue Oct 11, 2024 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@hyeok9855
Copy link
Collaborator

After reviewing the codes, I brought two possible refactoring ideas.

  1. Move the parameter preprocessor in GFNModule to Sampler. This could separate env from GFNModule (since the preprocessor is defined in env) and pass the preprocessed states to the GFNModule. One drawback is that the input of GFNModule would not be State anymore.

  2. There are two preprocessor files: src/gfn/preprocessors.py and src/gfn/gym/helpers/preprocessors.py. If this is not intended, it would be better to merge them into one file.

These are naive suggestions, so please feel free to comment, and let's discuss!

@hyeok9855 hyeok9855 self-assigned this Oct 11, 2024
@hyeok9855 hyeok9855 added the enhancement New feature or request label Oct 11, 2024
@josephdviviano
Copy link
Collaborator

josephdviviano commented Oct 11, 2024

Thanks for your ideas!

  1. For 1 - I'm not sure where the states would be passed? I think we could also explore integrating the sampler completely within the GFNModule although I'm worried this might be a footgun down the line if some method requires that modularity. @saleml thoughts?
  2. I don't love src/gfn/gym/helpers in general. I feel like the "helpers" should either be integrated into the main library or the individual gym files, and the whole folder should be removed.

@hyeok9855
Copy link
Collaborator Author

hyeok9855 commented Oct 18, 2024

I think we could also explore integrating the sampler completely within the GFNModule

Yes! Let's discuss this in #195 about it :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants