File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change 1010import json
1111import logging
1212import os
13+ import time
1314from abc import ABC , abstractmethod
1415from dataclasses import dataclass
15- from datetime import datetime
1616from enum import Enum
1717from typing import Any , Dict , List
1818
19- import pytz
20-
2119from forge .observability .utils import get_proc_name_with_rank
2220
2321from forge .util .logging import get_logger , log_once
@@ -91,7 +89,7 @@ def accumulator_class(self):
9189class Metric :
9290 """Container for metric data including key, value, reduction type, and timestamp.
9391
94- Timestamp is automatically set to current UTC time if not provided.
92+ Timestamp is automatically set to current time if not provided.
9593 """
9694
9795 key : str
@@ -101,8 +99,7 @@ class Metric:
10199
102100 def __post_init__ (self ):
103101 if self .timestamp is None :
104- # Always record in UTC timezone
105- self .timestamp = datetime .now (pytz .UTC ).timestamp ()
102+ self .timestamp = time .time ()
106103
107104
108105def record_metric (key : str , value : Any , reduction : Reduce = Reduce .MEAN ) -> None :
You can’t perform that action at this time.
0 commit comments