rdnfn / beobench

A toolkit providing easy and unified access to building control environments for reinforcement learning (RL).
https://beobench.readthedocs.io
MIT License
37 stars 4 forks source link

How to separate agent code into multiple submodules? #101

Closed superkaiba closed 1 year ago

superkaiba commented 1 year ago

Currently beobench by default runs the code contained in the agent.origin file defined in the config.yaml file. I would like to separate my agent code into multiple submodules/files and import those submodules from the main agent.origin file. However when I try to do this I am unable to import those submodules within beobench.

I imagine I have to add something to config.yaml to tell beobench where my submodule files are located, however I looked through the entire documentation and was unable to find anything on how to do this. Can anyone help me with this?

rdnfn commented 1 year ago

Thanks for raising this issue, separating the agent code into multiple submodules is unfortunately currently not supported by Beobench. You might be able to achieve this in a relatively straightforward way by mounting the directory of the submodule in the docker run command called by Beobench and making sure that it is added to the Pythonpath, i.e. changing the list here. Note that this would likely require forking/customising the Beobench package, so may be more involved than desirable.

This unfortunately also not on the roadmap at the moment, thus closing this issue.