Skip to content

Commit ef2f2a7

Browse files
authored
Merge pull request #30 from Genentech/fix-pearson
added reset method to PearsonCorrCoef
2 parents f349d29 + dedfa8c commit ef2f2a7

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

src/grelu/lightning/metrics.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,3 +144,6 @@ def compute(self) -> torch.Tensor:
144144
return output.mean()
145145
else:
146146
return output
147+
148+
def reset(self) -> None:
149+
self.pearson.reset()

tests/test_models.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,16 @@
1212
EnformerModel,
1313
EnformerPretrainedModel,
1414
)
15+
from grelu.resources import DEFAULT_WANDB_HOST
1516
from grelu.sequence.format import convert_input_type
1617

1718
inputs = convert_input_type(["A" * 128], "one_hot")
1819

1920

2021
try:
21-
wandb.login(host="https://genentech.wandb.io", anonymous="never", timeout=0)
22+
wandb.login(host=DEFAULT_WANDB_HOST, anonymous="never", timeout=0)
2223
except wandb.errors.UsageError: # login anonymously if not logged in already
23-
wandb.login(
24-
host="https://genentech.wandb.io", relogin=True, anonymous="must", timeout=0
25-
)
24+
wandb.login(host=DEFAULT_WANDB_HOST, relogin=True, anonymous="must", timeout=0)
2625

2726

2827
# Test a fully convolutional model with residual connections and autocropping

0 commit comments

Comments
 (0)