RolloutWorker.for_policy(func: Callable[[Policy, Any | None], T], policy_id: str | None = 'default_policy', **kwargs) T[source]#

Calls the given function with the specified policy as first arg.

  • func – The function to call with the policy as first arg.

  • policy_id – The PolicyID of the policy to call the function with.

Keyword Arguments:

kwargs – Additional kwargs to be passed to the call.


The return value of the function call.