Skip to content

Commit 3ff3e16

Browse files
Standardize Timestamps to Fixed Time Zone in TKML Runs (#257)
* Fix timezones when creating timestamps * Lint
1 parent 5df850d commit 3ff3e16

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

setup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
"GitPython>=3.1.40",
4646
"psutil",
4747
"wmi",
48+
"pytz",
4849
# Conditional dependencies for ONNXRuntime backends
4950
"onnxruntime >=1.10.1;platform_system=='Linux' and extra != 'llm-oga-cuda'",
5051
"onnxruntime-directml >=1.19.0;platform_system=='Windows' and extra != 'llm-oga-cuda'",

src/turnkeyml/sequence/sequence.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import copy
55
from datetime import datetime
66
from typing import List, Dict, Optional
7+
import pytz
78
import turnkeyml.common.printing as printing
89
import turnkeyml.common.exceptions as exp
910
import turnkeyml.common.build as build
@@ -128,9 +129,10 @@ def launch(
128129
state.save_stat(fs.Keys.BUILD_STATUS, build.FunctionStatus.INCOMPLETE)
129130

130131
# Save a timestamp so that we know the order of builds within a cache
132+
pacific_tz = pytz.timezone("America/Los_Angeles")
131133
state.save_stat(
132134
fs.Keys.TIMESTAMP,
133-
datetime.now(),
135+
datetime.now(pacific_tz),
134136
)
135137

136138
# Save the system information used for this build

src/turnkeyml/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "4.0.9"
1+
__version__ = "4.0.10"

0 commit comments

Comments
 (0)