Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added study.shuffle_exps() feature #202

Merged
merged 3 commits into from
Jan 14, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading