|
12 | 12 | # See the License for the specific language governing permissions and |
13 | 13 | # limitations under the License. |
14 | 14 | import logging |
15 | | -import sys |
16 | 15 | import traceback |
| 16 | +import uuid |
17 | 17 | from typing import Any |
18 | 18 |
|
19 | 19 | import aiohttp |
|
34 | 34 | VerifiersAgentVerifyRequest, |
35 | 35 | VerifiersAgentVerifyResponse, |
36 | 36 | VerifiersNeMoGymResponse, |
37 | | - VerifiersSeedSessionResponse, |
38 | 37 | ) |
39 | 38 |
|
40 | 39 |
|
@@ -71,7 +70,6 @@ async def create(self, *args: Any, **kwargs: Any) -> ChatCompletion: |
71 | 70 | choice_dict = response_dict["choices"][0] |
72 | 71 | message_dict = choice_dict.get("message", {}) |
73 | 72 |
|
74 | | - |
75 | 73 | prompt_token_ids = message_dict.pop("prompt_token_ids", []) |
76 | 74 | generation_token_ids = message_dict.pop("generation_token_ids", []) |
77 | 75 | generation_log_probs = message_dict.pop("generation_log_probs", []) |
@@ -164,7 +162,6 @@ async def _ensure_env_loaded(self, vf_env_id: str) -> tuple[vf.Environment, str, |
164 | 162 | if vf_env_id in _ENVS_CACHE: |
165 | 163 | return _ENVS_CACHE[vf_env_id], _ENV_IDS_CACHE[vf_env_id], _DATASET_ROWS_CACHE[vf_env_id] |
166 | 164 |
|
167 | | - import uuid |
168 | 165 | env_id = f"{vf_env_id}-{uuid.uuid4().hex[:8]}" |
169 | 166 | logger.info(f"Loading verifiers environment: {vf_env_id}") |
170 | 167 |
|
@@ -226,9 +223,8 @@ def _convert_trajectory_to_output(self, state: dict) -> list: |
226 | 223 | from nemo_gym.openai_utils import ( |
227 | 224 | NeMoGymEasyInputMessage, |
228 | 225 | NeMoGymResponseOutputMessage, |
229 | | - NeMoGymResponseOutputText, |
230 | | - NeMoGymEasyInputMessageForTraining, |
231 | 226 | NeMoGymResponseOutputMessageForTraining, |
| 227 | + NeMoGymResponseOutputText, |
232 | 228 | ) |
233 | 229 |
|
234 | 230 | output = [] |
|
0 commit comments