-
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
Possible codebase restructure #221
Comments
I like the overall idea. I'd love to see a tree of the new structure! Where would classes used for the continuous examples belong in this new structure ? |
Good point; box and line directly sublcass Env, and doesn't need special States. We may leave them in I am also wondering if we will introduce new Action types in the future that can be mixed with other State types. This will make the submodules confusing. |
I think it's an interesting idea but we will need to be very careful. The
last restructuring took us a few months and introduced lot of changes.
My hunch is we should hold off on it until torchgfn is more feature
complete, next year. The reason being it will be easier for us to see the
most natural restructuring when we've built everything out.
That might mean the refactoring is a bit more work but it will also be more
likely to be done correctly
Joseph (Mobile)
…On Tue, Nov 19, 2024 at 08:48 Omar Younis ***@***.***> wrote:
Where would classes used for the continuous examples belong in this new
structure ?
Good point; box and line directly sublcass Env, and doesn't need special
States. We may leave them in gnf.core or create a gfn.continuous
I am also wondering if we will introduce new Action types in the future
that can be mixed with other State types. This will make the submodules
confusing.
—
Reply to this email directly, view it on GitHub
<#221 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA7TL2UHNQVIWNJJLVGUP2D2BM6RBAVCNFSM6AAAAABSCAZ3IWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIOBVG43TAOJRHA>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
I propose here an alternative codebase organization, with:
gfn.core
: implementing the interfaces of States, Action, GFlowNet base file, base Env class, Trajectories, Transitions, and ReplayBuffer.gfn.discrete
: depends ongfn.code
interfaces, and implements the DiscreteStates, DiscreteEnv and everything that is specifically to Discrete, like FMGFlowNet.gfn.graph
Similarly to before, everything that is related to Graph.Motivation:
Currently, we are mixing different state-type implementations in the same file creating unnecessary dependencies and reducing modularity. Same for environments.
For example, for Graph, I need torch_geometric, but a user may want to use the library only for discrete env and not install torch_geometric.
Dividing in submodules increases modularity and makes it easier to scale the codebase to different use cases
The text was updated successfully, but these errors were encountered: