[Python] How to set up a Conda environment for using Gym-based CityLearn (static buildings)...

Discussão em 'Python' iniciado por Stack, Maio 30, 2025.

  1. Stack

    Stack Membro Participativo

    I’m trying to build a Conda environment that supports CityLearn (v1.4.4) and Stable-Baselines3, both of which are based on the Gym API. My goal is to train reinforcement learning agents (e.g., PPO, SAC) from SB3 in a Gym-compatible static building setup in CityLearn.

    However, I’m not sure about the exact package versions required to avoid compatibility issues, especially between:

    citylearn

    stable-baselines3

    gym

    numpy, torch, etc.

    My Use Case: Use CityLearnEnv from CityLearn v1.4.4 (Gym-compatible) as the environment.

    Apply model-free RL algorithms (like PPO or SAC) from Stable-Baselines3.

    Focus on static building energy optimization (cost and battery control).

    Use a Conda environment to manage dependencies cleanly.

    My Questions: What is the correct way to set up a Conda environment for this use case?

    What versions of gym, stable-baselines3, torch, etc., are compatible with citylearn==1.4.4?

    Are there any known issues or tips for running Stable-Baselines3 in CityLearn (e.g., observation shape mismatch, multi-agent support)?

    Do I need to apply any wrappers around the CityLearn environment to make it fully compatible with SB3’s training interface?

    System Info: CityLearn version: 1.4.4

    Platform: Conda environment (Windows/Linux)

    Python version: (please specify yours)

    Preferred SB3 algorithms: PPO, SAC, DDPG

    Goal: Cost and battery optimization in static building environments using model-free RL.

    Any help with the correct Conda environment setup or example environment.yml file would be greatly appreciated!

    Continue reading...

Compartilhe esta Página