Here are the steps to create a new model.
- Create your
CustomModelandCustomModelConfigfollowing the example inmodels/custommodel.py. These will be the model code and an associated dataclass to validate loaded configs. - Create a
custommodel.yamlwith the configuration parameters you defined in your script. Make sure it has anameentry equal tocustommodelto let hydra know which python dataclass it is associated to. You can seeconf/model/layers/custommodel.yamlfor an example. - Place your model script in
benchmarl/modelsand 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=...