Skip to content
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,4 @@ gitpython # for the reproducibility script
requests
matplotlib
ray[default]
python-slugify
13 changes: 11 additions & 2 deletions src/agentlab/experiments/study.py
Original file line number Diff line number Diff line change
@@ -1,20 +1,26 @@
import gzip
import logging
import pickle
import re
import uuid
from dataclasses import dataclass
from datetime import datetime
from pathlib import Path
import uuid

import bgym
from bgym import Benchmark, EnvArgs, ExpArgs
from slugify import slugify

from agentlab.agents.agent_args import AgentArgs
from agentlab.analyze import inspect_results
from agentlab.experiments import args
from agentlab.experiments import reproducibility_util as repro
from agentlab.experiments.exp_utils import RESULTS_DIR, add_dependencies
from agentlab.experiments.launch_exp import find_incomplete, run_experiments, non_dummy_count
from agentlab.experiments.launch_exp import (
find_incomplete,
non_dummy_count,
run_experiments,
)

logger = logging.getLogger(__name__)

Expand Down Expand Up @@ -220,6 +226,9 @@ def name(self):
study_name = f"{agent_names[0]}_on_{self.benchmark.name}"
else:
study_name = f"{len(agent_names)}_agents_on_{self.benchmark.name}"

study_name = slugify(study_name, max_length=100, allow_unicode=True)

if self.suffix:
study_name += f"_{self.suffix}"
return study_name
Expand Down