benchmarl.environments.Task
- class Task(value)[source]
Bases:
EnumEnum of tasks in an environment.
Tasks are enums, one enum for each environment. Each enviornment usually contains multiple tasks.
Tasks are used just to enumerate the available tasks, to convert a
Taskinto its corresponding instantiation, you can callTask.get_from_yaml()which will load the task config form yaml into the associatedTaskClass.Each enum member can also be converted to a
TaskClassby callingTask.get_task(), (which by default behaves likeTask.get_from_yaml()) or by callingget_task(config={...}), providing your own config.Each new environment should inherit from
Taskand instantiate its members as:TASK_1 = None
TASK_2 = None
…
Tasks configs are loaded from
benchmarl/conf/task.