Skip to content

Commit

Permalink
Use fast_gather instead of take
Browse files Browse the repository at this point in the history
  • Loading branch information
druzsan authored and neindochoh committed Dec 7, 2023
1 parent 331c831 commit a1770f8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions renumics/spotlight_plugins/core/huggingface_datasource.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,9 @@ def get_column_values(
raw_values = self._dataset.data[column_name]
else:
actual_indices = list(range(len(self._dataset)))[indices]
raw_values = self._dataset.data[column_name].take(actual_indices)
raw_values = self._dataset.data.fast_gather(actual_indices)[column_name]
else:
raw_values = self._dataset.data[column_name].take(indices)
raw_values = self._dataset.data.fast_gather(indices)[column_name]

feature = self._dataset.features[column_name]

Expand Down

0 comments on commit a1770f8

Please sign in to comment.