Skip to content

Commit

Permalink
[revert] delete predictions from evaluation_summary
Browse files Browse the repository at this point in the history
  • Loading branch information
hglee98 committed Dec 20, 2024
1 parent c25d548 commit 50106c6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
5 changes: 2 additions & 3 deletions src/netspresso_trainer/pipelines/evaluation.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,14 +120,13 @@ def log_end_evaluation(
elapsed_time=time_for_evaluation,
)
predictions = self.task_processor.get_predictions(valid_samples, self.logger.class_map)

Check failure on line 122 in src/netspresso_trainer/pipelines/evaluation.py

View workflow job for this annotation

GitHub Actions / ruff

Ruff (F841)

src/netspresso_trainer/pipelines/evaluation.py:122:9: F841 Local variable `predictions` is assigned to but never used
self.save_summary(losses, metrics, predictions, time_for_evaluation)
self.save_summary(losses, metrics, time_for_evaluation)

def save_summary(self, losses, metrics, predictions, time_for_evaluation):
def save_summary(self, losses, metrics, time_for_evaluation):
flops, params = get_params_and_flops(self.model, self.sample_input.float())
evaluation_summary = EvaluationSummary(
losses=losses,
metrics=metrics,
predictions=predictions,
metrics_list=self.metric_factory.metric_names,
primary_metric=self.metric_factory.primary_metric,
flops=flops,
Expand Down
1 change: 0 additions & 1 deletion src/netspresso_trainer/utils/record.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,6 @@ class EvaluationSummary:
primary_metric: str
flops: Optional[int] = None
params: Optional[int] = None
predictions: Optional[dict] = None
total_evaluation_time: Optional[float] = None
success: bool = False

Expand Down

0 comments on commit 50106c6

Please sign in to comment.