Skip to content

Commit

Permalink
Fix small issues in aggregation script (#553)
Browse files Browse the repository at this point in the history
- No debug mode by default
- Ignore number of evaluation workers in equivalence check
- Change logic for size check to not throw an exception
  • Loading branch information
MaxiBoether authored Jul 2, 2024
1 parent cdf1280 commit a4f167a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions analytics/tools/aggregate_runs/core_aggregation.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from modyn.supervisor.internal.grpc.enums import PipelineStage
from modyn.supervisor.internal.pipeline_executor.models import PipelineLogs, SingleEvaluationInfo

DEBUGGING_MODE = True
DEBUGGING_MODE = False
"""if True, the the process will halt on breakpoints to allow for manual verification"""


Expand Down Expand Up @@ -75,7 +75,7 @@ def aggregate_eval_metrics(df_eval_single: pd.DataFrame, logs: list[PipelineLogs
)

sizes = groups.agg(size=("model_idx", "size")).reset_index()
if len(sizes["size"].unique()) != 1 or int(sizes[0]) != len(logs):
if len(sizes["size"].unique()) != 1 or int(sizes["size"].unique()[0]) != len(logs):
logging.warning(f"\n{sizes[sizes['size'] != len(logs)]}")
logging.warning(
"The number of records in every group is not equal to the number of logs. "
Expand Down
2 changes: 2 additions & 0 deletions analytics/tools/aggregate_runs/pipeline_equivalence.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ def assert_pipeline_equivalence(logs: list[PipelineLogs]) -> None:
candidate.config.pipeline.training.seed = candidates[0].config.pipeline.training.seed
candidate.config.pipeline.training.device = candidates[0].config.pipeline.training.device
candidate.config.pipeline.evaluation.device = candidates[0].config.pipeline.evaluation.device
candidate.config.pipeline.evaluation.after_pipeline_evaluation_workers = candidates[0].config.pipeline.evaluation.after_pipeline_evaluation_workers
candidate.config.pipeline.evaluation.after_training_evaluation_workers = candidates[0].config.pipeline.evaluation.after_training_evaluation_workers

if isinstance(candidate.config.pipeline.selection_strategy, CoresetStrategyConfig) and isinstance(
candidate.config.pipeline.selection_strategy.downsampling_config, RHOLossDownsamplingConfig
Expand Down

0 comments on commit a4f167a

Please sign in to comment.