-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Config] Hydra config
- Loading branch information
Showing
40 changed files
with
730 additions
and
293 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,9 @@ | ||
### Python template | ||
|
||
# Hydra | ||
outputs/ | ||
multirun/ | ||
|
||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
*.py[cod] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
def load_hydra_schemas(): | ||
from hydra.core.config_store import ConfigStore | ||
|
||
from benchmarl.algorithms import algorithm_config_registry | ||
from benchmarl.environments import _task_class_registry | ||
from benchmarl.experiment import ExperimentConfig | ||
|
||
# Create instance to load hydra schemas | ||
cs = ConfigStore.instance() | ||
# Load experiment schema | ||
cs.store(name="experiment_config", group="experiment", node=ExperimentConfig) | ||
# Load algos schemas | ||
for algo_name, algo_schema in algorithm_config_registry.items(): | ||
cs.store(name=f"{algo_name}_config", group="algorithm", node=algo_schema) | ||
# Load rask schemas | ||
for task_schema_name, task_schema in _task_class_registry.items(): | ||
cs.store(name=task_schema_name, group="task", node=task_schema) | ||
|
||
|
||
load_hydra_schemas() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.