Skip to content

Commit

Permalink
Update filter.py
Browse files Browse the repository at this point in the history
  • Loading branch information
puyuanOT authored Jan 13, 2024
1 parent a8bd473 commit 5a94a1f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion deeplake/core/query/filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ def _event_callback():
def filter_slice(indices: Sequence[int]):
result = list()
for i in indices:
print(getattr(dataset, "index_mapping_dict", None))
if getattr(dataset, "index_mapping_dict", None):
# If we are filtering an already filtered dataset
i = dataset.index_mapping_dict[i]
Expand Down Expand Up @@ -239,7 +240,6 @@ def pg_filter_slice(pg_callback, indices: Sequence[int]):
if progressbar:
result = compute.map_with_progress_bar(pg_filter_slice, idx, total_length=len(dataset)) # type: ignore
else:
print(getattr(dataset, "index_mapping_dict", None))
result = compute.map(filter_slice, idx) # type: ignore
print(result)
index_map = [k for x in result for k in x] # unfold the result map
Expand Down

0 comments on commit 5a94a1f

Please sign in to comment.