Skip to content

Commit d569a64

Browse files
committed
backward compat and fix test again
1 parent d9666fd commit d569a64

File tree

3 files changed

+9
-15
lines changed

3 files changed

+9
-15
lines changed

eval_protocol/models.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -309,15 +309,20 @@ def rollout_internal_error(cls, error_message: str, extra_info: Optional[Dict[st
309309
"""Create a status indicating the rollout failed with an internal error."""
310310
return cls.internal_error(error_message, cls._build_details_with_extra_info(extra_info))
311311

312+
@classmethod
313+
def internal_error(cls, error_message: str, details: Optional[List[Dict[str, Any]]] = None) -> "Status":
314+
"""Create a status indicating an internal error occurred."""
315+
return cls(code=cls.Code.INTERNAL, message=error_message, details=details or [])
316+
312317
# For backwards compatibility
313318
@classmethod
314319
def rollout_error(cls, error_message: str, extra_info: Optional[Dict[str, Any]] = None) -> "Status":
315320
"""Create a status indicating the rollout failed with an error."""
316321
return cls.internal_error(error_message, cls._build_details_with_extra_info(extra_info))
317322

318323
@classmethod
319-
def internal_error(cls, error_message: str, details: Optional[List[Dict[str, Any]]] = None) -> "Status":
320-
"""Create a status indicating an internal error occurred."""
324+
def error(cls, error_message: str, details: Optional[List[Dict[str, Any]]] = None) -> "Status":
325+
"""Create a status indicating an error occurred."""
321326
return cls(code=cls.Code.INTERNAL, message=error_message, details=details or [])
322327

323328
# UNAVAILABLE = 14

eval_protocol/pytest/evaluation_test_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,7 @@ async def execute_row_with_backoff(task: asyncio.Task[EvaluationRow], row: Evalu
398398
else:
399399
# Non-retryable exception - fail immediately
400400
logging.error(f"❌ Rollout failed (non-retryable error encountered): {repr(e)}")
401-
row.rollout_status = Status.rollout_error(repr(e))
401+
row.rollout_status = Status.rollout_error(str(e))
402402
return row
403403

404404
async def execute_row_with_backoff_and_log(

tests/remote_server/test_remote_fireworks_propagate_status.py

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,4 @@
1-
# MANUAL SERVER STARTUP REQUIRED:
2-
#
3-
# For Python server testing, start:
4-
# python -m tests.remote_server.remote_server (runs on http://127.0.0.1:3000)
5-
#
6-
# For TypeScript server testing, start:
7-
# cd tests/remote_server/typescript-server
8-
# npm install
9-
# npm start
10-
#
11-
# The TypeScript server should be running on http://127.0.0.1:3000
12-
# You only need to start one of the servers!
1+
# AUTO SERVER STARTUP: Server is automatically started and stopped by the test
132

143
import subprocess
154
import socket

0 commit comments

Comments
 (0)