MCPcopy
hub / github.com/microsoft/agent-lightning / enqueue_rollout

Method enqueue_rollout

tests/algorithm/test_apo.py:60–74  ·  view source on GitHub ↗
(
        self,
        *,
        input: Dict[str, Any],
        mode: str,
        resources_id: Optional[str] = None,
    )

Source from the content-addressed store, hash-verified

58 return update_mock
59
60 async def enqueue_rollout(
61 self,
62 *,
63 input: Dict[str, Any],
64 mode: str,
65 resources_id: Optional[str] = None,
66 ) -> Mock:
67 rollout_id = f"rollout-{self._counter}"
68 self._counter += 1
69 self.enqueue_calls.append(
70 {"rollout_id": rollout_id, "input": input, "mode": mode, "resources_id": resources_id}
71 )
72 result = Mock()
73 result.rollout_id = rollout_id
74 return result
75
76 async def wait_for_rollouts(self, rollout_ids: Sequence[str], timeout: float) -> List[Rollout]:
77 self.wait_calls.append({"rollout_ids": tuple(rollout_ids), "timeout": timeout})

Callers 14

algorithm_batchMethod · 0.45
handle_singleMethod · 0.45
do_workFunction · 0.45
algoFunction · 0.45
sft_one_iterFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected