Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Batch evaluation intervals into a single request and a single evaluation process #554

Merged
merged 25 commits into from
Jul 3, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
make client parsing better
  • Loading branch information
XianzheMa committed Jul 3, 2024
commit 0214c771e8e16bb39dc20cb26638a45c2f1d4d43
2 changes: 2 additions & 0 deletions modyn/protos/evaluator.proto
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ message EvaluateModelIntervalResponse {

message EvaluateModelResponse {
// only when all interval evaluations failed, this field will be set to false
// it is a field of convenience for the client to decide whether to wait for the evaluation completion.
// the client can always check the interval_responses
bool evaluation_started = 1;
int32 evaluation_id = 2;
// always has the same size as the number of intervals
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -313,13 +313,12 @@
# here we assume only one interval is evaluated
eval_results: dict = {"dataset_size": response.interval_responses[0].dataset_size, "metrics": []}

for single_eval_data in eval_data:
if single_eval_data.interval_index == 0:
for metric in single_eval_data.evaluation_data:
eval_results["metrics"].append({"name": metric.metric, "result": metric.result})
return None, eval_results
# this shouldn't happen
raise RuntimeError("No evaluation data found")
assert len(eval_data) == 1, "The evaluation request only contains one interval so we expect only one result."
assert eval_data[0].interval_index == 0
for metric in eval_data[0].evaluation_data:
eval_results["metrics"].append({"name": metric.metric, "result": metric.result})

Check warning on line 319 in modyn/supervisor/internal/pipeline_executor/evaluation_executor.py

View check run for this annotation

Codecov / codecov/patch

modyn/supervisor/internal/pipeline_executor/evaluation_executor.py#L319

Added line #L319 was not covered by tests

return None, eval_results


# ------------------------------------------------------------------------------------ #
Expand All @@ -343,5 +342,5 @@
supervisor_logs=SupervisorLogs(),
)

logs_.supervisor_logs = ex.run_post_pipeline_evaluations()

Check warning on line 345 in modyn/supervisor/internal/pipeline_executor/evaluation_executor.py

View check run for this annotation

Codecov / codecov/patch

modyn/supervisor/internal/pipeline_executor/evaluation_executor.py#L345

Added line #L345 was not covered by tests
logs_.materialize(snapshot_path, mode="final")
Loading