Skip to content

Commit 7933dd1

Browse files
author
Dylan Huang
committed
Remove backwards compatibility methods for rollout status from EvaluationRow and associated tests.
1 parent c633480 commit 7933dd1

File tree

3 files changed

+0
-51
lines changed

3 files changed

+0
-51
lines changed

eval_protocol/models.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -576,14 +576,6 @@ def is_trajectory_evaluation(self) -> bool:
576576
and len(self.evaluation_result.step_outputs) > 0
577577
)
578578

579-
def get_rollout_status(self) -> Status:
580-
"""Get the rollout status (backwards compatibility method)."""
581-
return self.rollout_status
582-
583-
def set_rollout_status(self, status: Status) -> None:
584-
"""Set the rollout status (backwards compatibility method)."""
585-
self.rollout_status = status
586-
587579
def get_conversation_length(self) -> int:
588580
"""Returns the number of messages in the conversation."""
589581
return len(self.messages)

tests/test_status_migration_integration.py

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -42,34 +42,6 @@ def test_rollout_status_field_access(self):
4242
assert row.rollout_status.code == Status.Code.FINISHED
4343

4444

45-
class TestBackwardsCompatibilityMethods:
46-
"""Test the backwards compatibility methods."""
47-
48-
def test_get_rollout_status_method(self):
49-
"""Test the get_rollout_status method."""
50-
row = EvaluationRow(messages=[])
51-
52-
# Method should return the current rollout_status
53-
status = row.get_rollout_status()
54-
assert status.code == Status.Code.OK
55-
assert status.message == "Rollout is running"
56-
57-
# Should be the same object reference
58-
assert status is row.rollout_status
59-
60-
def test_set_rollout_status_method(self):
61-
"""Test the set_rollout_status method."""
62-
row = EvaluationRow(messages=[])
63-
64-
# Method should update the rollout_status
65-
new_status = Status.rollout_error("Test error")
66-
row.set_rollout_status(new_status)
67-
68-
assert row.rollout_status.code == Status.Code.INTERNAL
69-
assert row.rollout_status.message == "Test error"
70-
assert row.rollout_status is new_status
71-
72-
7345
class TestStatusTransitions:
7446
"""Test transitioning between different status states."""
7547

tests/test_status_model.py

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -302,21 +302,6 @@ def test_evaluation_row_default_status(self):
302302
assert row.rollout_status.message == "Rollout is running"
303303
assert row.rollout_status.details == []
304304

305-
def test_backwards_compatibility_methods(self):
306-
"""Test the backwards compatibility methods."""
307-
row = EvaluationRow(messages=[])
308-
309-
# Test get_rollout_status
310-
status = row.get_rollout_status()
311-
assert status.code == Status.Code.OK
312-
assert status.message == "Rollout is running"
313-
314-
# Test set_rollout_status
315-
new_status = Status.rollout_finished()
316-
row.set_rollout_status(new_status)
317-
assert row.rollout_status.code == Status.Code.FINISHED
318-
assert row.rollout_status.message == "Rollout finished"
319-
320305
def test_status_transitions(self):
321306
"""Test transitioning between different status states."""
322307
row = EvaluationRow(messages=[])

0 commit comments

Comments
 (0)