man python stinks...
This commit is contained in:
@@ -163,7 +163,7 @@ def training_entry():
|
|||||||
with lzma.open(TRAINING_LOG_PATH, mode='wt') as tlog:
|
with lzma.open(TRAINING_LOG_PATH, mode='wt') as tlog:
|
||||||
# training loop
|
# training loop
|
||||||
training_start_time = datetime.datetime.now()
|
training_start_time = datetime.datetime.now()
|
||||||
last_ack = datetime.datetime.now(datetime.timezone.utc)
|
last_ack = datetime.datetime.now()
|
||||||
|
|
||||||
for step in range(TRAIN_STEPS):
|
for step in range(TRAIN_STEPS):
|
||||||
a, b, y = sample_batch(TRAIN_BATCHSZ)
|
a, b, y = sample_batch(TRAIN_BATCHSZ)
|
||||||
@@ -184,7 +184,7 @@ def training_entry():
|
|||||||
# also print to normal text log occasionally to show some activity.
|
# also print to normal text log occasionally to show some activity.
|
||||||
# every 10 steps check if its been longer than 5 seconds since we've updated the user
|
# every 10 steps check if its been longer than 5 seconds since we've updated the user
|
||||||
if step % 10 == 0:
|
if step % 10 == 0:
|
||||||
if (datetime.datetime.now(datetime.timezone.utc) - last_ack).total_seconds() > 5:
|
if (datetime.datetime.now() - last_ack).total_seconds() > 5:
|
||||||
log.info(f"still training... step={step} of {TRAIN_STEPS}")
|
log.info(f"still training... step={step} of {TRAIN_STEPS}")
|
||||||
last_ack = datetime.datetime.now()
|
last_ack = datetime.datetime.now()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user