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 a512577 commit e031c76
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions lagom/logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ class Logger(logging.Logger):
level, for example we want to log the policy loss with goal number 34 and internal training iteration
20, the key can be 'goal_34:train:iter_20:policy_loss'.
Example::
Example:
* Default::
>> logger = Logger(name='logger')
>> logger.log('iteration', 1)
Expand All @@ -49,21 +51,25 @@ class Logger(logging.Logger):
Iteration: [1, 2, 3]
Training Loss: [0.12, 0.11, 0.09]
* With indentation::
>> logger.dump(keys=None, index=None, indent=1)
Iteration: [1, 2, 3]
Training Loss: [0.12, 0.11, 0.09]
* With specified keys::
>> logger.dump(keys=['iteration'], index=None, indent=0)
Iteration: [1, 2, 3]
* With specified single index::
>> logger.dump(keys=None, index=0, indent=0)
Iteration: 1
Training Loss: 0.12
* With specified list of indices::
>> logger.dump(keys=None, index=[0, 2], indent=0)
Iteration: [1, 3]
Training Loss: [0.12, 0.09]
Expand Down

0 comments on commit e031c76

Please sign in to comment.