support localhost agent#1842
Open
Harold-lkk wants to merge 1 commit into
Open
Conversation
249f0fa to
677da3c
Compare
hhaAndroid
reviewed
May 27, 2026
| self.max_concurrent_samples = max_concurrent_samples | ||
| self._sample_semaphore = asyncio.Semaphore(max_concurrent_samples) if max_concurrent_samples else None | ||
|
|
||
| async def generate_group(self, rollout_state: list[RolloutState], **kwargs) -> list[RolloutState]: |
Collaborator
There was a problem hiding this comment.
这个代码可以考虑放到基类里面去,因为是通用的。否则其他agent 也要写一遍
| raw_item = rollout_state.extra_fields["rollout_item"] | ||
| if isinstance(raw_item, AgentRolloutItem): | ||
| return raw_item.model_copy(deep=True) | ||
| return AgentRolloutItem.model_validate(raw_item).model_copy(deep=True) |
Collaborator
There was a problem hiding this comment.
有可能不是 AgentRolloutItem 吗?如果一定是,不用写这个代码
| self, | ||
| *, | ||
| name: str, | ||
| judger_config: Any | None = None, |
Collaborator
There was a problem hiding this comment.
为啥既需要judger_config又需要judger?
| reward_model = dict(item.reward_model or {}) | ||
|
|
||
| messages_artifact = item.artifacts.get("messages") | ||
| if messages_artifact is not None: |
| reward_model=reward_model, | ||
| status=Status.COMPLETED if item.infer.status == StageStatus.COMPLETED else Status.FAILED, | ||
| ) | ||
| judged = await self.build().judge(rollout_state) |
Collaborator
There was a problem hiding this comment.
如果 judge 可能耗时,那么要额外加判断,不是完成状态不进 judge,可以节省时间
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.