From 07f64698131cb198f60aaab6ebcb527e88e0dee6 Mon Sep 17 00:00:00 2001 From: kostialjn Date: Thu, 12 Feb 2026 11:58:06 +0100 Subject: [PATCH] feat: Make env using custom config file path in kwargs --- grid2op/MakeEnv/MakeFromPath.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/grid2op/MakeEnv/MakeFromPath.py b/grid2op/MakeEnv/MakeFromPath.py index 220ae714..44d457bb 100644 --- a/grid2op/MakeEnv/MakeFromPath.py +++ b/grid2op/MakeEnv/MakeFromPath.py @@ -339,7 +339,10 @@ def make_from_dataset_path( _check_kwargs(kwargs) # Compute and find config file - config_path_abs = os.path.abspath(os.path.join(dataset_path_abs, NAME_CONFIG_FILE)) + if "_config_path" in kwargs: + config_path_abs = os.path.abspath(kwargs["_config_path"]) + else: + config_path_abs = os.path.abspath(os.path.join(dataset_path_abs, NAME_CONFIG_FILE)) _check_path(config_path_abs, "Dataset environment configuration") # Read config file