Skip to content

refactor: reorganize evaluation scripts structure - #127

Merged
chani0343 merged 5 commits into
mainfrom
refactor/evaluation-scripts
Nov 11, 2025
Merged

chani0343 merged 5 commits into
mainfrom
refactor/evaluation-scripts

Conversation

@chani0343

Copy link
Copy Markdown
Collaborator
  • Move evaluator.py to src/evaluation/base/
  • Move metrics files to src/evaluation/metrics/
  • Move result files to src/evaluation/results/
  • Update all imports to reflect new structure
  • Rename complete_hierarchy_results.json to hierarchical_evaluation_results.json
  • Update output paths in evaluation scripts

Resolves #124

- Move evaluator.py to src/evaluation/base/
- Move metrics files to src/evaluation/metrics/
- Move result files to src/evaluation/results/
- Update all imports to reflect new structure
- Rename complete_hierarchy_results.json to hierarchical_evaluation_results.json
- Update output paths in evaluation scripts

Resolves #124
Comment thread src/evaluation/run_evaluation.py Outdated
from src.evaluation.evaluator import EvaluationConfig, ModelEvaluator
from src.evaluation.base.evaluator import EvaluationConfig, ModelEvaluator
from src.inference import MobileNetInference, ResNetInference
from src.onnx_model import OnnxClassifierInferenceBase as OnnxModel

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could you please import as is, not as OnnxModel? Just use OnnxClassifierInferenceBase

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you make sure that the results remain the same?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you mean? Are the results the same? I just arranged the folders, I didn't touch the logic at all.
And we haven't yet integrated into the project that the model will predict better with a black background, so there shouldn't be a change, and indeed, when we do that, we'll run the RUN_EVALOTION again and see the best results.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please note that it's a part of the ticket to run the code before your changes, and run after your changes, and at the end to compare the results. The goal behind it is to ensure we didn't break anything - but not to improve results etc. Please do that

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you make sure that the results remain the same?

…Base

- Remove 'as OnnxModel' alias as requested in code review
- Use OnnxClassifierInferenceBase directly for better readability

Addresses reviewer feedback
- Updated evaluation_results.json with PyTorch model performance
- ResNet18: 26.2% accuracy, 84.9ms latency
- MobileNet: 27.2% accuracy, 55.1ms latency
- Results generated after dataset/preparation and src/evaluation refactoring
@chani0343
chani0343 merged commit 734ea99 into main Nov 11, 2025
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Refactor evaluation scripts

2 participants