Skip to content

Commit

Permalink
Removing unnecessary expensive step
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinmicha authored Nov 8, 2024
1 parent 676c77b commit c37ab07
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions antipasti/preprocessing/preprocessing.py
Original file line number Diff line number Diff line change
Expand Up @@ -580,9 +580,9 @@ def load_training_images(self):

assert labels == [item for item in self.selected_entries if item not in self.pathological]

for pdb in self.selected_entries:
if pdb not in self.pathological and self.affinity_entries_only:
assert np.float16(10**kds[[item for item in self.selected_entries if item not in self.pathological].index(pdb)] == np.float16(self.df[self.df['pdb']==pdb]['affinity'])).all()
#for pdb in self.selected_entries:
# if pdb not in self.pathological and self.affinity_entries_only:
# assert np.float16(10**kds[[item for item in self.selected_entries if item not in self.pathological].index(pdb)] == np.float16(self.df[self.df['pdb']==pdb]['affinity'])).all()

return np.array(imgs), np.array(kds), labels, raw_imgs

Expand Down Expand Up @@ -623,4 +623,4 @@ def load_test_image(self):
h = h[0]
l = l[0]

return self.generate_masked_image(raw_sample, 0, test_h=int(h), test_l=int(l))[0]
return self.generate_masked_image(raw_sample, 0, test_h=int(h), test_l=int(l))[0]

0 comments on commit c37ab07

Please sign in to comment.