Skip to content

Commit ffdf504

Browse files
committed
fixed type hinting for better documentation
1 parent 46c8215 commit ffdf504

15 files changed

Lines changed: 37 additions & 39 deletions

File tree

docs/getting-started/faq.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Anyone! We had a few groups in mind when building MASEval.
1212

1313
1. Check this documentation.
1414
2. If the feature does not exist, please [open an issue on GitHub](https://github.com/parameterlab/MASEval/issues/new). Feature requests are welcome.
15-
3. Consider implementing it yourself. Check out the [contributing guide](contributing.md) for details.
15+
3. Consider implementing it yourself. Check out the [contributing guide](https://github.com/parameterlab/MASEval/blob/main/CONTRIBUTING.md) for details.
1616

1717
## Q: Can I only test multi-agent systems?
1818

docs/reference/environment.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,3 @@ Some agent adapters expose helper tools or user-simulation tools that can be use
1313
[:material-github: View source](https://github.com/parameterlab/maseval/blob/main/maseval/interface/agents/smolagents.py){ .md-source-file }
1414

1515
::: maseval.interface.agents.smolagents.SmolAgentAdapter
16-
17-
::: maseval.interface.agents.smolagents.SmolAgentLLMUser

docs/reference/user.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,7 @@ The `LLMUser` is initialized with a persona and a scenario, both of which are ty
1616

1717
Some integrations provide convenience user/tool implementations for specific agent frameworks. For example:
1818

19-
[:material-github: View source](https://github.com/parameterlab/maseval/blob/main/maseval/interface/agents/smolagents.py){ .md-source-file }
20-
21-
::: maseval.interface.agents.smolagents.SmolAgentLLMUser
19+
See [SmolAgentLLMUser](../interface/agents/smolagents.md) in the smolagents integration documentation.
2220

2321
[:material-github: View source](https://github.com/parameterlab/maseval/blob/main/maseval/interface/agents/langgraph.py){ .md-source-file }
2422

maseval/benchmark/gaia2/gaia2.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ def __init__(
124124
fail_on_evaluation_error: bool = False,
125125
progress_bar: bool | str = True,
126126
seed: Optional[int] = None,
127-
seed_generator=None,
127+
seed_generator: Optional[SeedGenerator] = None,
128128
):
129129
"""Initialize benchmark with Gaia2-specific defaults.
130130

maseval/benchmark/macs/macs.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ def get_model_adapter(self, model_id, **kwargs):
6565
)
6666
from maseval.core.config import ConfigurableMixin
6767
from maseval.core.tracing import TraceableMixin
68+
from maseval.core.seeding import DefaultSeedGenerator
6869

6970

7071
# Statuses where agent is accountable (included in scoring)
@@ -147,7 +148,7 @@ def _schema_to_inputs(schema: Dict[str, Any]) -> Dict[str, Any]:
147148
}
148149
return inputs
149150

150-
def __call__(self, **kwargs) -> str:
151+
def __call__(self, **kwargs: Any) -> str:
151152
"""Execute the tool with simulated response.
152153
153154
Args:
@@ -828,7 +829,7 @@ def setup_user( # type: ignore[invalid-method-override]
828829
agent_data: Dict[str, Any],
829830
environment: MACSEnvironment,
830831
task: Task,
831-
seed_generator,
832+
seed_generator: DefaultSeedGenerator,
832833
) -> MACSUser:
833834
"""Create MACS user simulator.
834835
@@ -872,7 +873,7 @@ def setup_agents( # type: ignore[invalid-method-override]
872873
environment: MACSEnvironment,
873874
task: Task,
874875
user: Optional[User],
875-
seed_generator,
876+
seed_generator: DefaultSeedGenerator,
876877
) -> Tuple[Sequence[AgentAdapter], Dict[str, AgentAdapter]]:
877878
"""Create agents for this task. Must be implemented by subclass.
878879

maseval/benchmark/multiagentbench/multiagentbench.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ def __init__(
9595
fail_on_evaluation_error: bool = False,
9696
progress_bar: bool | str = True,
9797
seed: Optional[int] = None,
98-
seed_generator=None,
98+
seed_generator: Optional[SeedGenerator] = None,
9999
):
100100
"""Initialize the benchmark.
101101

maseval/benchmark/tau2/tau2.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ def get_model_adapter(self, model_id, **kwargs):
6868
from maseval import AgentAdapter, Benchmark, Evaluator, ModelAdapter, Task, User
6969
from maseval.core.user import AgenticLLMUser
7070
from maseval.core.callback import BenchmarkCallback
71+
from maseval.core.seeding import DefaultSeedGenerator, SeedGenerator
7172

7273
from maseval.benchmark.tau2.environment import Tau2Environment
7374
from maseval.benchmark.tau2.evaluator import Tau2Evaluator
@@ -252,7 +253,7 @@ def __init__(
252253
fail_on_evaluation_error: bool = False,
253254
progress_bar: bool | str = True,
254255
seed: Optional[int] = None,
255-
seed_generator=None,
256+
seed_generator: Optional[SeedGenerator] = None,
256257
):
257258
"""Initialize benchmark with tau2-specific defaults.
258259
@@ -328,7 +329,7 @@ def setup_user( # type: ignore[override]
328329
agent_data: Dict[str, Any],
329330
environment: Tau2Environment,
330331
task: Task,
331-
seed_generator,
332+
seed_generator: DefaultSeedGenerator,
332333
) -> Optional[User]:
333334
"""Create Tau2 user simulator.
334335
@@ -964,7 +965,7 @@ def setup_agents( # type: ignore[invalid-method-override]
964965
environment: Tau2Environment,
965966
task: Task,
966967
user: Optional[User],
967-
seed_generator,
968+
seed_generator: DefaultSeedGenerator,
968969
) -> Tuple[Sequence[AgentAdapter], Dict[str, AgentAdapter]]:
969970
"""Create the default tau2 agent.
970971

maseval/core/benchmark.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -740,7 +740,7 @@ def setup_evaluators(self, environment, task, agents, user, seed_generator):
740740
pass
741741

742742
@abstractmethod
743-
def get_model_adapter(self, model_id: str, **kwargs) -> ModelAdapter:
743+
def get_model_adapter(self, model_id: str, **kwargs: Any) -> ModelAdapter:
744744
"""Provide a ModelAdapter for benchmark components that require LLM access.
745745
746746
Many benchmark components beyond the agents themselves require access to language
@@ -772,7 +772,7 @@ def get_model_adapter(self, model_id: str, **kwargs) -> ModelAdapter:
772772
For proper tracing, register the adapter after creation using the kwargs:
773773
774774
```python
775-
def get_model_adapter(self, model_id: str, **kwargs) -> ModelAdapter:
775+
def get_model_adapter(self, model_id: str, **kwargs: Any) -> ModelAdapter:
776776
adapter = GoogleGenAIModelAdapter(self.client, model_id=model_id)
777777
778778
# Register for tracing if registration info provided

maseval/core/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def gather_config(self) -> Dict[str, Any]:
5757
task execution completes. The `gather_config()` method is called sequentially
5858
and should return static configuration data (not runtime state).
5959
60-
Attributes:
60+
Note:
6161
Components should expose their configuration through instance variables or
6262
properties that can be accessed during configuration gathering.
6363
"""

maseval/core/tracing.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,11 @@ def gather_traces(self) -> Dict[str, Any]:
6767
traces during concurrent execution, but the `gather_traces()` method
6868
itself is called sequentially.
6969
70-
Attributes:
71-
Components can store traces in any internal data structure. Common patterns:
72-
- `self.logs = []` for invocation histories
73-
- `self._messages = MessageHistory()` for conversations
74-
- `self.logs = []` for simulator attempts
70+
Note:
71+
Components can store traces in any internal data structure. Common patterns
72+
include `self.logs = []` for invocation histories,
73+
`self._messages = MessageHistory()` for conversations,
74+
and `self.logs = []` for simulator attempts.
7575
"""
7676

7777
def gather_traces(self) -> Dict[str, Any]:

0 commit comments

Comments
 (0)