From aa23f108578046b260d8a23a41a81ebec35eb939 Mon Sep 17 00:00:00 2001 From: hjc-puro Date: Sat, 3 May 2025 15:52:13 -0700 Subject: [PATCH] remove try/except because handled in separate pr --- atroposlib/envs/base.py | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/atroposlib/envs/base.py b/atroposlib/envs/base.py index 2c2c8612..53160168 100644 --- a/atroposlib/envs/base.py +++ b/atroposlib/envs/base.py @@ -681,19 +681,7 @@ class BaseEnv(ABC): f"{self.config.rollout_server_url}/status-env", json={"env_id": self.env_id}, ) as resp: - try: - # Raise an exception for bad status codes (4xx or 5xx) - resp.raise_for_status() - # Attempt to parse the response as JSON - self.status_dict = await resp.json() - except Exception as e: - # Handle HTTP errors (raised by raise_for_status) - error_text = await resp.text() # Read the response text for logging - logger.error( - f"Error fetching status from rollout server. Status: {e.status}, Message: {e.message}. Response: {error_text}" # noqa: E501 - ) - # Re-raise the exception to allow the @retry decorator to handle it - raise + self.status_dict = await resp.json() new_weight = self.status_dict["env_weight"] max_num_workers = self.config.max_num_workers if max_num_workers == -1: