Skip to content

Instantly share code, notes, and snippets.

@DalyaG
Last active April 22, 2020 07:05
Show Gist options
  • Save DalyaG/92fd91c042147c3f05cc69fb9e981bd9 to your computer and use it in GitHub Desktop.
Save DalyaG/92fd91c042147c3f05cc69fb9e981bd9 to your computer and use it in GitHub Desktop.
using runtime logger class
from time import time
import RuntimeLogger
class MyFancyAlgorithm:
def __init__(self, log_dir: str):
self.runtime_logger = RuntimeLogger(log_dir)
def run(self):
self.runtime_logger.start()
task_start_time = time()
run_first_task()
self.runtime_logger.log_task_end('first_task', task_start_time)
...
self.runtime_logger.log_experiment_end()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment