alexhernandezgarcia / gflownet

Generative Flow Networks - GFlowNet
https://gflownet.readthedocs.io/en/latest/
Apache License 2.0
161 stars 10 forks source link

Stateless enviroments #334

Open AlexandraVolokhova opened 2 months ago

AlexandraVolokhova commented 2 months ago

There're several methods in the environments which work with states (e.g. state2policy, get_parents) and either take state as an input or use internal state of the enrolment self.state. This was a source of bugs in the past (when an env was supposed to transform input states but is was transforming the internal state or vice versa)

Proposal (by @carriepl ): Alternative approach would be to get rid of the internal state of the environment and require input state for all methods where the state is needed.

alexhernandezgarcia commented 2 months ago

I think I would like to hear more arguments for this change. If we make the environment stateless, then we should also get rid of self.done and pass it to all methods too, and probably self.n_actions, etc. It should be all or nothing, no?

AlexandraVolokhova commented 2 months ago

@carriepl could you elaborate on that? I'm not sure I fully understood your suggestion to be able to address Alex's question

josephdviviano commented 2 months ago

I would second this change

Joseph (Mobile)

On Wed, Jul 10, 2024 at 12:30 Alexandra @.***> wrote:

@carriepl https://github.com/carriepl could you elaborate on that? I'm not sure I fully understood your suggestion to be able to address Alex's question

— Reply to this email directly, view it on GitHub https://github.com/alexhernandezgarcia/gflownet/issues/334#issuecomment-2220972923, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA7TL2UO3C3GNAEBWGTTUPTZLVOQ5AVCNFSM6AAAAABKVE72ZGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMRQHE3TEOJSGM . You are receiving this because you are subscribed to this thread.Message ID: @.***>

alexhernandezgarcia commented 2 months ago

I'm not boldly against it, but it's a huge change that would require changing many methods in all environments and all their units tests. Even if I wanted to have this change done in theory, I don't see myself doing it right now.

josephdviviano commented 2 months ago

Yes it makes sense to deprioritize it relative to the effort involved (unless it’s possible to support both simultaneously)

Joseph (Mobile)

On Wed, Jul 10, 2024 at 13:29 Alex @.***> wrote:

I'm not boldly against it, but it's a huge change that would require changing many methods in all environments and all their units tests. Even if I wanted to have this change done in theory, I don't see myself doing it right now.

— Reply to this email directly, view it on GitHub https://github.com/alexhernandezgarcia/gflownet/issues/334#issuecomment-2221079789, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA7TL2RCIVPY2VULQFYBUEDZLVVQJAVCNFSM6AAAAABKVE72ZGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMRRGA3TSNZYHE . You are receiving this because you commented.Message ID: @.***>