Skip to content

Commit 71770b9

Browse files
added timestamp while writing models (#203)
1 parent 87262c6 commit 71770b9

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tiledb/ml/models/_base.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import os
55
import pickle
66
import platform
7+
import time
78
from abc import ABC, abstractmethod
89
from typing import (
910
Any,
@@ -164,7 +165,10 @@ def _write_array(
164165
"Please avoid using file property key names as metadata keys!"
165166
)
166167

167-
with tiledb.open(self.uri, "w", ctx=self.ctx) as model_array:
168+
timestamp = round(time.time() * 1000)
169+
with tiledb.open(
170+
self.uri, "w", timestamp=timestamp, ctx=self.ctx
171+
) as model_array:
168172
one_d_buffers = {}
169173
max_len = 0
170174
for key, value in model_params.items():

0 commit comments

Comments
 (0)