MCPcopy Index your code
hub / github.com/google/adk-python / optimize

Method optimize

src/google/adk/optimization/agent_optimizer.py:32–49  ·  view source on GitHub ↗

Runs the optimizer. Args: initial_agent: The initial agent to be optimized. sampler: The interface used to get training and validation example UIDs, request agent evaluations, and get useful data for optimizing the agent. Returns: The final result of the optimizat

(
      self,
      initial_agent: Agent,
      sampler: Sampler[SamplingResultT],
  )

Source from the content-addressed store, hash-verified

30
31 @abstractmethod
32 async def optimize(
33 self,
34 initial_agent: Agent,
35 sampler: Sampler[SamplingResultT],
36 ) -> OptimizerResult[AgentWithScoresT]:
37 """Runs the optimizer.
38
39 Args:
40 initial_agent: The initial agent to be optimized.
41 sampler: The interface used to get training and validation example UIDs,
42 request agent evaluations, and get useful data for optimizing the agent.
43
44 Returns:
45 The final result of the optimization process, containing the optimized
46 agent instances along with their corresponding scores on the validation
47 examples and any optimization metadata.
48 """
49 ...

Callers 1

run_gepaFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected