Skip to content

Commit fd56311

Browse files
authored
Fix no local TF model accessible with LR enabled (#1668)
1 parent 1689ab6 commit fd56311

File tree

1 file changed

+3
-0
lines changed
  • pkg/workloads/cortex/lib/model

1 file changed

+3
-0
lines changed

Diff for: pkg/workloads/cortex/lib/model/cron.py

+3
Original file line numberDiff line numberDiff line change
@@ -1236,6 +1236,9 @@ def _load_local_models(self) -> None:
12361236
)
12371237
self._reset_when_tfs_unresponsive()
12381238
return None
1239+
self._old_ts_state[f"{model_name}-{model_version}"] = int(
1240+
datetime.datetime.now(datetime.timezone.utc).timestamp()
1241+
)
12391242

12401243
def _is_this_a_newer_model_id(self, model_id: str, timestamp: int) -> bool:
12411244
return model_id in self._old_ts_state and self._old_ts_state[model_id] < timestamp

0 commit comments

Comments
 (0)