malib.utils.metrics module
- class malib.utils.metrics.JointDistMetric(agents: List[str])[source]
Bases:
malib.utils.metrics.Metric- static merge_parsed(agent_result_seq: Sequence[Dict[str, Any]]) Dict[str, Dict[str, float]][source]
Merge multiple evaluated results.
- parse(agent_filter=None) Dict[str, Dict[str, malib.utils.typing.MetricEntry]][source]
Parse episode data, return an agent wise MetricEntry dictionary
- class malib.utils.metrics.Metric(agents: List[str])[source]
Bases:
object- static merge_parsed(agent_result_seq: Sequence[Dict[str, Any]]) Dict[str, Dict[str, float]][source]
Merge multiple evaluated results.
- abstract parse(agent_filter=None) Dict[str, Dict[str, malib.utils.typing.MetricEntry]][source]
Parse episode data and filter with given keys (agent level)
- abstract step(agent_id, policy_id, **kwargs) None[source]
Record sampled data and save to do evaluation.
- property step_mode: str
- class malib.utils.metrics.SimpleMetrics(agents: List[str])[source]
Bases:
malib.utils.metrics.Metric- static merge_parsed(agent_result_seq: Sequence) Dict[str, Dict[str, malib.utils.typing.MetricEntry]][source]
Aggregates a sequence of evaluated results in average, and return an agent dict.
- parse(agent_filter=None) Dict[str, Dict[str, malib.utils.typing.MetricEntry]][source]
Parse episode data and filter with given keys (agent level)