Skip to content

Commit

Permalink
Format _train_step_from_last_restored_checkpoint_path as "%s" since i…
Browse files Browse the repository at this point in the history
…t might be None.

Otherwise the logging.info dies with a formatting error.

PiperOrigin-RevId: 559545134
Change-Id: I779384c10a99fbdc0f66a26201f79c48b89a1be7
  • Loading branch information
pwohlhart authored and copybara-github committed Aug 23, 2023
1 parent eca1093 commit b344b20
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tf_agents/policies/py_tf_eager_policy.py
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ def update_from_checkpoint(self, checkpoint_path: Text):
# In case the checkpoint format is not as expected.
self._train_step_from_last_restored_checkpoint_path = None
logging.info(
'Checkpoint path: %s, train step: %d',
'Checkpoint path: %s, train step: %s',
checkpoint_path,
self._train_step_from_last_restored_checkpoint_path,
)
Expand Down

0 comments on commit b344b20

Please sign in to comment.