Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
zuoxingdong committed Sep 4, 2018
1 parent 2181bfa commit a512577
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions lagom/logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ class Logger(logging.Logger):
.. note::
It uses pickle to serialize the data. Empirically, pickle is 2x faster than ``numpy.save``
and other alternatives like yaml is too slow and JSON does not support numpy array.
It uses pickle to serialize the data. Empirically, ``pickle`` is 2x faster than ``numpy.save``
and other alternatives like ``yaml`` is too slow and ``JSON`` does not support numpy array.
.. warning::
Expand Down Expand Up @@ -48,14 +48,22 @@ class Logger(logging.Logger):
>> logger.dump()
Iteration: [1, 2, 3]
Training Loss: [0.12, 0.11, 0.09]
>> logger.dump(keys=None, index=None, indent=1)
Iteration: [1, 2, 3]
Training Loss: [0.12, 0.11, 0.09]
>> logger.dump(keys=['iteration'], index=None, indent=0)
Iteration: [1, 2, 3]
>> logger.dump(keys=None, index=0, indent=0)
Iteration: 1
Training Loss: 0.12
>> logger.dump(keys=None, index=[0, 2], indent=0)
Iteration: [1, 3]
Training Loss: [0.12, 0.09]
Expand Down

0 comments on commit a512577

Please sign in to comment.