Skip to content

Commit

Permalink
Fix seeding bug
Browse files Browse the repository at this point in the history
  • Loading branch information
gahdritz authored Aug 9, 2023
1 parent 1d878a1 commit 451642c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions openfold/data/data_transforms.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,8 @@ def sample_msa(protein, max_seq, keep_extra, seed=None):
g = torch.Generator(device=protein["msa"].device)
if seed is not None:
g.manual_seed(seed)
else:
g.seed()
shuffled = torch.randperm(num_seq - 1, generator=g) + 1
index_order = torch.cat(
(torch.tensor([0], device=shuffled.device), shuffled),
Expand Down

0 comments on commit 451642c

Please sign in to comment.