Skip to content

Commit

Permalink
Standardize Timestamps to Fixed Time Zone in TKML Runs (#257)
Browse files Browse the repository at this point in the history
* Fix timezones when creating timestamps

* Lint
  • Loading branch information
danielholanda authored Jan 6, 2025
1 parent 5df850d commit 3ff3e16
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
"GitPython>=3.1.40",
"psutil",
"wmi",
"pytz",
# Conditional dependencies for ONNXRuntime backends
"onnxruntime >=1.10.1;platform_system=='Linux' and extra != 'llm-oga-cuda'",
"onnxruntime-directml >=1.19.0;platform_system=='Windows' and extra != 'llm-oga-cuda'",
Expand Down
4 changes: 3 additions & 1 deletion src/turnkeyml/sequence/sequence.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import copy
from datetime import datetime
from typing import List, Dict, Optional
import pytz
import turnkeyml.common.printing as printing
import turnkeyml.common.exceptions as exp
import turnkeyml.common.build as build
Expand Down Expand Up @@ -128,9 +129,10 @@ def launch(
state.save_stat(fs.Keys.BUILD_STATUS, build.FunctionStatus.INCOMPLETE)

# Save a timestamp so that we know the order of builds within a cache
pacific_tz = pytz.timezone("America/Los_Angeles")
state.save_stat(
fs.Keys.TIMESTAMP,
datetime.now(),
datetime.now(pacific_tz),
)

# Save the system information used for this build
Expand Down
2 changes: 1 addition & 1 deletion src/turnkeyml/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "4.0.9"
__version__ = "4.0.10"

0 comments on commit 3ff3e16

Please sign in to comment.