From dedfa8c3b3ffc359d2df08fb119da3d29cf8010f Mon Sep 17 00:00:00 2001
From: avantikalal <avantikalal1990@gmail.com>
Date: Wed, 24 Jul 2024 21:10:09 +0000
Subject: [PATCH] fixed test url

---
 tests/test_models.py | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/tests/test_models.py b/tests/test_models.py
index 0df436b..2b4c546 100644
--- a/tests/test_models.py
+++ b/tests/test_models.py
@@ -1,5 +1,6 @@
 import torch
 
+import wandb
 from grelu.model.models import (
     BorzoiModel,
     BorzoiPretrainedModel,
@@ -11,11 +12,18 @@
     EnformerModel,
     EnformerPretrainedModel,
 )
+from grelu.resources import DEFAULT_WANDB_HOST
 from grelu.sequence.format import convert_input_type
 
 inputs = convert_input_type(["A" * 128], "one_hot")
 
 
+try:
+    wandb.login(host=DEFAULT_WANDB_HOST, anonymous="never", timeout=0)
+except wandb.errors.UsageError:  # login anonymously if not logged in already
+    wandb.login(host=DEFAULT_WANDB_HOST, relogin=True, anonymous="must", timeout=0)
+
+
 # Test a fully convolutional model with residual connections and autocropping
 def test_conv_model():
     model = ConvModel(