Skip to content

How to pass hyperparameters and configs

Dipendra Misra edited this page Apr 21, 2023 · 2 revisions

We use a simple but useful method for setting hyperparameters and environment configuration values for an experiment. We distinguish between these two values.

  1. Environment configuration: All values that define an environment. E.g., number of actions, horizon, etc.

  2. Hyperparameter constants: All hyperparameter constants that define a model or learning algorithm. E.g., learning rate, batch size, etc.

These are typically defined in data/<environment>/config.json and data/<environment-name>/constant.json.

We follow a three-level hierarchy in defining these values:

  1. (Lowest Priority) These are default config and constant values in data/base_config.json and data/base_constant.json

  2. (Medium Priority) These are environment-specific config and constant values in data/. These overwrite the default values.

  3. (Highest Priority) These are command line values that overwrite even the environment-specific values.

How do I set these values?

The most basic hyperparameters that are in general good values can be put in base_constants.json. E.g., a learning rate of 0.001 and a dropout value of 0.5 are generally considered good. If you find hyperparameters that tend to work better for a specific environment, you can put them in the environment folder (you may have to create one if it doesn't exist). Finally, you can

Clone this wiki locally