Skip to content

Instantly share code, notes, and snippets.

@myazdani
Created November 5, 2019 12:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save myazdani/9c349a1c0ec11bbea46e66b30eee33f2 to your computer and use it in GitHub Desktop.
Save myazdani/9c349a1c0ec11bbea46e66b30eee33f2 to your computer and use it in GitHub Desktop.
Creating a unique name for a logging based on current time stamp.
from datetime import datetime
now = datetime.utcnow().strftime("%Y%m%d%H%M%S")
root_logdir = "tf_logs"
logdir = "{}/run-{}/".format(root_logdir, now)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment