Skip to content

Commit 368c7a7

Browse files
committed
Support specifying step explicitly
1 parent 9438060 commit 368c7a7

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

simvue/client.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ def log_event(self, message, timestamp=None):
401401

402402
return True
403403

404-
def log_metrics(self, metrics, time=None, timestamp=None):
404+
def log_metrics(self, metrics, step=None, time=None, timestamp=None):
405405
"""
406406
Write metrics
407407
"""
@@ -434,7 +434,11 @@ def log_metrics(self, metrics, time=None, timestamp=None):
434434
else:
435435
self._error('Invalid timestamp format')
436436
return False
437-
data['step'] = self._step
437+
438+
if step is None:
439+
data['step'] = self._step
440+
else:
441+
data['step'] = step
438442

439443
self._step += 1
440444

0 commit comments

Comments
 (0)