torchgfn icon indicating copy to clipboard operation
torchgfn copied to clipboard

Move the environments outside of the source code

Open saleml opened this issue 1 year ago • 3 comments

saleml avatar Mar 21 '23 17:03 saleml

I suppose it is still an open question as to whether we actually want to do this near term. We have shared elements between the main library and the environment classes which are fairly entangled at the moment. In particular:

gfn.envs inherits from gfn.containers & gfn.casting. If we remove the envs from the main library, we would need to be sure that we are passing the envs raw tensors, which removes lots of niceties about your current structure (e.g., state and mask handling in the same object).

josephdviviano avatar Apr 05 '23 21:04 josephdviviano

I just meant outside of src. They would still be part of the repo

saleml avatar Apr 06 '23 02:04 saleml

The global dependency tree and structure agreed upon during today's standup would look like this:

  • gfntorch/
    • gfn/
      • states.py
      • actions.py
      • containers/
        • ...
      • ...
    • gfngym/
      • env.py
      • ...

Where States and Actions are the only two primitive classes (i.e. that do not import anything else in the repo), Env requires States and Actions, all containers requiring States and Actions (and possibly Env).

saleml avatar Apr 06 '23 18:04 saleml