Skip to content

Commit

Permalink
added timestamp while writing models (#203)
Browse files Browse the repository at this point in the history
  • Loading branch information
georgeSkoumas authored Feb 17, 2023
1 parent 87262c6 commit 71770b9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tiledb/ml/models/_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import os
import pickle
import platform
import time
from abc import ABC, abstractmethod
from typing import (
Any,
Expand Down Expand Up @@ -164,7 +165,10 @@ def _write_array(
"Please avoid using file property key names as metadata keys!"
)

with tiledb.open(self.uri, "w", ctx=self.ctx) as model_array:
timestamp = round(time.time() * 1000)
with tiledb.open(
self.uri, "w", timestamp=timestamp, ctx=self.ctx
) as model_array:
one_d_buffers = {}
max_len = 0
for key, value in model_params.items():
Expand Down

0 comments on commit 71770b9

Please sign in to comment.