Skip to content

Commit c3f6a54

Browse files
committed
Random instance choice
1 parent 0077c5f commit c3f6a54

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/browsergym/workarena/instance.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import base64
22
import json
33
import os
4+
import random
45
import requests
56
from itertools import cycle
67

@@ -120,7 +121,7 @@ def __init__(
120121
raise ValueError(
121122
f"No instances found in the dataset {INSTANCE_REPO_ID}. Please provide instance details via parameters or environment variables."
122123
)
123-
instance = instances[0] # For now, just pick the first one
124+
instance = random.choice(instances)
124125
snow_url = instance["url"]
125126
snow_credentials = ("admin", instance["password"])
126127

0 commit comments

Comments
 (0)