Skip to content

Commit

Permalink
save
Browse files Browse the repository at this point in the history
  • Loading branch information
dsmilkov committed Jan 25, 2024
1 parent 6d9d8d2 commit 214e55e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lilac/data/dataset_duckdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -571,7 +571,7 @@ def _recompute_joint_table(self, latest_mtime_micro_sec: int) -> DatasetManifest
def _clear_joint_table_cache(self) -> None:
"""Clears the cache for the joint table."""
self._recompute_joint_table.cache_clear()
self._pivot_cache = {}
self._pivot_cache.clear()
if env('USE_TABLE_INDEX', default=False):
self.con.execute('DROP TABLE IF EXISTS mtime_cache')

Expand Down Expand Up @@ -2529,6 +2529,7 @@ def add_labels(
# Any deleted rows will cause statistics to be out of date.
if num_labels > 0 and name == DELETED_LABEL_NAME:
self.stats.cache_clear()
self._pivot_cache.clear()

return num_labels

Expand Down Expand Up @@ -2592,6 +2593,7 @@ def remove_labels(

if remove_row_ids and name == DELETED_LABEL_NAME:
self.stats.cache_clear()
self._pivot_cache.clear()

return len(remove_row_ids)

Expand Down

0 comments on commit 214e55e

Please sign in to comment.