Commit 200d9517 authored by Gustaf Ahdritz's avatar Gustaf Ahdritz
Browse files

Speed up dataset filtering

parent d96f27b1
...@@ -107,7 +107,7 @@ class OpenFoldSingleDataset(torch.utils.data.Dataset): ...@@ -107,7 +107,7 @@ class OpenFoldSingleDataset(torch.utils.data.Dataset):
if(filter_path is not None): if(filter_path is not None):
with open(filter_path, "r") as f: with open(filter_path, "r") as f:
chains_to_include = [l.strip() for l in f.readlines()] chains_to_include = set([l.strip() for l in f.readlines()])
self._chain_ids = [c for c in self._chain_ids if c in chains_to_include] self._chain_ids = [c for c in self._chain_ids if c in chains_to_include]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment