Skip to content

Commit

Permalink
Merge pull request #202 from ServiceNow/shuffle_exps
Browse files Browse the repository at this point in the history
added `study.shuffle_exps()` feature
  • Loading branch information
recursix authored Jan 14, 2025
2 parents e6c19be + 2f79dcd commit 0819ae4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/agentlab/experiments/study.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
from agentlab.experiments.launch_exp import find_incomplete, non_dummy_count, run_experiments
from agentlab.experiments.multi_server import BaseServer, WebArenaInstanceVars
from multiprocessing import Pool, Manager, Queue
import random

logger = logging.getLogger(__name__)

Expand Down Expand Up @@ -157,6 +158,10 @@ def get_results(self, suffix="", also_save=True):

return result_df, summary_df, error_report

def shuffle_exps(self):
"""Shuffle the experiments in the study."""
self.exp_args_list = random.sample(self.exp_args_list, len(self.exp_args_list))


@dataclass
class Study(AbstractStudy):
Expand Down

0 comments on commit 0819ae4

Please sign in to comment.