Skip to content

Instantly share code, notes, and snippets.

@k4ntz
Created July 13, 2021 08:44
Show Gist options
  • Save k4ntz/285896a4b94ea12d6b19704edfacc980 to your computer and use it in GitHub Desktop.
Save k4ntz/285896a4b94ea12d6b19704edfacc980 to your computer and use it in GitHub Desktop.
How to use the rtpt module
from rtpt import RTPT
import random
import time
# Create RTPT object
rtpt = RTPT(name_initials='QD', experiment_name='TestingRTPT', max_iterations=10)
# Start the RTPT tracking
rtpt.start()
# Loop over all iterations
for epoch in range(10):
time.sleep(4)
# Perform a single experiment iteration
loss = random.random()
# Update the RTPT (subtitle is optional)
rtpt.step(subtitle=f"loss={loss:2.2f}")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment