Skip to content
This repository has been archived by the owner on Jan 26, 2024. It is now read-only.

Commit

Permalink
handle even a missing targets group
Browse files Browse the repository at this point in the history
  • Loading branch information
Coos Baakman committed Dec 18, 2023
1 parent edfed88 commit 7b33837
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions deeprank/learn/DataSet.py
Original file line number Diff line number Diff line change
Expand Up @@ -936,9 +936,8 @@ def load_one_variant(self, fname, variant_name=None):
# get the target value
if self.select_target is not None:

target_group = variant_data['targets']
if self.select_target in target_group:
target = target_group[self.select_target][()]
if 'targets' in variant_data and self.select_target in variant_data['targets']:
target = variant_data['targets'][self.select_target][()]
logger.debug("{} has target {}".format(variant_name, target))

target = np.array([target]).astype(outtype)
Expand Down

0 comments on commit 7b33837

Please sign in to comment.