Skip to content

Commit

Permalink
Include dict comprehension (facebookresearch#168)
Browse files Browse the repository at this point in the history
  • Loading branch information
boneyag authored Oct 6, 2022
1 parent 1bb81f5 commit 25cffd5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mbrl/util/logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def dump(self, step: int, prefix: str, save: bool = True, color: str = "yellow")
if len(self._meters) == 0:
return
if save:
data = dict([(key, meter.value()) for key, meter in self._meters.items()])
data = {key: meter.value() for key, meter in self._meters.items()}
data["step"] = step
self._dump_to_csv(data)
self._dump_to_console(data, prefix, color)
Expand Down

0 comments on commit 25cffd5

Please sign in to comment.