Skip to content

Commit

Permalink
also send a Close operation
Browse files Browse the repository at this point in the history
  • Loading branch information
tayritenour committed Apr 18, 2023
1 parent 75e2f9e commit 66c4a85
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions harness/tests/experiment/pytorch/test_deepspeed_autotuning.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,6 @@ def test_simple_model_profile_info_run_fails() -> None:
assert len(search_runner.state.trial_progress) == 1


def test_mbs_binary_search() -> None:
pass


class MockMaster:
def __init__(self, all_metrics: List[Union[float, Dict[str, Any]]]) -> None:
self.events_queue: Deque[bindings.v1SearcherEvent] = deque([])
Expand Down Expand Up @@ -181,10 +177,16 @@ def _append_events_for_op(self, op: searcher.Operation) -> None:
requestId=str(op.request_id),
exitedReason=bindings.v1TrialExitedEarlyExitedReason.EXITED_REASON_UNSPECIFIED,
)
self.events_count += 1
event = bindings.v1SearcherEvent(
id=self.events_count, trialExitedEarly=trial_exited_early
)
self.events_queue.append(event)

trial_closed = bindings.v1TrialClosed(requestId=str(op.request_id))
self.events_count += 1
event = bindings.v1SearcherEvent(id=self.events_count, trialClosed=trial_closed)
self.events_queue.append(event)
else:
validation_completed = bindings.v1ValidationCompleted(
requestId=str(op.request_id),
Expand Down

0 comments on commit 66c4a85

Please sign in to comment.