Here are the steps to create a new model.
- Create your
CustomModel
andCustomModelConfig
following the example inmodels/custommodel.py
. These will be the model code and an associated dataclass to validate loaded configs. - Create a
custommodel.yaml
with the configuration parameters you defined in your script. Make sure it has aname
entry equal tocustommodel
to let hydra know which python dataclass it is associated to. You can seeconf/model/layers/custommodel.yaml
for an example. - Place your model script in
benchmarl/models
and your config inbenchmarl/conf/model/layers
(or any other place you want to override from) - Add
{"custommodel": CustomModelConfig}
to thebenchmarl.models.model_config_registry
- Load it with
python benchmarl/run.py model=layers/custommodel algorithm=... task=...