Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions torch_xla_py/xla_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,10 @@ def xla_replication_devices(local_devices):

class RateTracker(object):

def __init__(self, smooth_factor=0.8):
self._smooth_factor = smooth_factor
def __init__(self, smooth_factor=None):
self._smooth_factor = xu.getenv_as(
'RATE_TRACKER_SMOOTHING', float,
0.8) if smooth_factor is None else smooth_factor
self._start_time = time.time()
self._partial_time = self._start_time
self._partial_count = 0.0
Expand Down