Skip to content

Load environment with custom config.py file not in root directory #738

@kostialjn

Description

@kostialjn

Is your feature request related to a problem? Please describe.

I would like to be able to point to a custom config.py file at grid2op.make
For the same grid I have several config.py files and I would like to be able to switch config without having to duplicate my environment folder

Describe the solution you'd like

Ex. This is how i would like it to be done:

import grid2op
env_name = "environment/folder/"
env_conf_1 = grid2op.make(env_name, _config_path="environment/folder/configs/config_1.py")
env_conf_2 = grid2op.make(env_name, _config_path="environment/folder/configs/config_2.py")

Describe alternatives you've considered

Other alternatives :

  • Duplicate entire environment folder
  • Import config files using importlib and load env using grid2op.make(env_name, **config_data)

Both those alternatives seem suboptimal

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions