Skip to content

Commit

Permalink
fix cache indices after filtering
Browse files Browse the repository at this point in the history
  • Loading branch information
jiashenC committed May 2, 2023
1 parent 5c791e2 commit fcd5166
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion eva/expression/function_expression.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ def _apply_function_expression(self, func: Callable, batch: Batch, **kwargs):
assert len(cache_keys) == len(batch), "Not all rows have the cache key"

cache_miss = np.full(len(batch), True)
for idx, key in cache_keys.iterrows():
for idx, (_, key) in enumerate(cache_keys.iterrows()):
val = self._cache.store.get(key.to_numpy())
results[idx] = val
cache_miss[idx] = val is None
Expand Down

0 comments on commit fcd5166

Please sign in to comment.