Skip to content

Commit

Permalink
Fix biobank dataset method
Browse files Browse the repository at this point in the history
  • Loading branch information
1pha committed Mar 18, 2024
1 parent b5cf589 commit d506bef
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 15 deletions.
2 changes: 1 addition & 1 deletion config/misc/default.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
seed: 42
debug: False
modes: [ train, valid ]
modes: [ train , valid , test ]
13 changes: 0 additions & 13 deletions sage/data/dataloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,19 +283,6 @@ def remove_duplicates(self, labels: pd.DataFrame) -> pd.DataFrame:
labels = labels[~_dups_bool]
return labels

def _exclude_data(self,
lst: pd.DataFrame,
root: Path,
exclusion_fname: str = "exclusion.csv") -> List[Path]:
try:
exc = pd.read_csv(root / exclusion_fname, header=None)
exclusion = set(exc.values.flatten().tolist())
lst = [f for f in lst if f not in exclusion]
except:
logger.info("No exclusion file found. %s", root / exclusion_fname)
pass
return lst


class UKBClassification(UKBDataset):
def __init__(self,
Expand Down
2 changes: 1 addition & 1 deletion sage/xai/trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ def _configure_xai(self,
attr_mtd = ca.InputXGradient(forward_func=model.backbone)
xai = ca.NoiseTunnel(attribution_method=attr_mtd)
if xai_call_kwarg is None:
xai_call_kwarg = dict(nt_type="smoothgrad", nt_samples=15)
xai_call_kwarg = dict(nt_type="smoothgrad", nt_samples=10)
else:
breakpoint()
self.xai_call_kwarg = dict() if xai_call_kwarg is None else xai_call_kwarg
Expand Down

0 comments on commit d506bef

Please sign in to comment.