mansicer / baselax

Baselax (Baselines + JAX) provides stable-baselines-style implementations of reinforcement learning (RL) algorithms with Google JAX framework.
https://baselax.readthedocs.io
Apache License 2.0
4 stars 1 forks source link

Feature: YAML config support #1

Closed mansicer closed 2 years ago

mansicer commented 2 years ago

This PR proposes to add the yaml-style config to replace the original flags config management. The benefits of using yaml-style configs can be:

The configs are placed in the baselax/configs subdirectory with the following structure:

- configs
    - default.yaml
    - dqn.yaml
    - ppo.yaml
    - ...
    - config.py
    - __init__.py

The config reader will firstly read the default config and then the specified alg config. The module config.py will provide such functionalities.

mansicer commented 2 years ago

File-defined configs v.s. parameter-defined configs

File-defined configs:

Parameter-defined configs:

It will be better for baselax to adopt file-defined configs. However, it will be beneficial to support some features of parameter-defined configs through runtime checking.

mansicer commented 2 years ago

This feature is deprecated.

According to the implementation of stable-baseline3, tianshou, and other RL frameworks, it seems to be less beneficial to introduce file-defined configs rather than parameter-defined configs. Currently baselax will keep on a parameter-defined config to maintain better documentation and calling functionalities.