mirror of
https://github.com/NousResearch/atropos.git
synced 2026-04-25 17:10:42 +00:00
clean up
This commit is contained in:
parent
baf4b2d8a8
commit
e5b8fb8654
3 changed files with 37 additions and 90 deletions
|
|
@ -773,14 +773,11 @@ class BaseEnv(ABC):
|
|||
scored_data,
|
||||
) as resp:
|
||||
if resp.status >= 500:
|
||||
# Server errors (5xx) should trigger a retry
|
||||
logging.debug(f"Server error: {resp.status}, retrying...")
|
||||
raise Exception(f"Server error: {resp.status}")
|
||||
elif resp.status >= 400:
|
||||
# Client errors (4xx) are logged but not retried
|
||||
logging.error(f"Client error: {resp.status}, not retrying")
|
||||
return
|
||||
# Success case: print response text
|
||||
print(await resp.text())
|
||||
|
||||
def _post_json_with_compression(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue