Skip to content

Commit

Permalink
removed try/catch
Browse files Browse the repository at this point in the history
  • Loading branch information
shreyasc30 authored Aug 5, 2024
1 parent 69363aa commit e24e63b
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions bliss/cached_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,10 +170,7 @@ def __getitem__(self, index):
self.buffered_file_index = converted_index
with open(self.file_paths[converted_index], "rb") as f:
self.buffered_data = torch.load(f)
try:
output_data = self.buffered_data[converted_sub_index]
except KeyError:
output_data = self.buffered_data
output_data = self.buffered_data[converted_sub_index]
return self.transform(output_data)

def get_chunked_indices(self):
Expand Down

0 comments on commit e24e63b

Please sign in to comment.