Skip to content

Code refactor and prototype v.1#1

Merged
Vicbi merged 27 commits into
mainfrom
v1-core-setup_vicky
Oct 28, 2025
Merged

Code refactor and prototype v.1#1
Vicbi merged 27 commits into
mainfrom
v1-core-setup_vicky

Conversation

@Vicbi
Copy link
Copy Markdown
Contributor

@Vicbi Vicbi commented Jul 11, 2025

Code refactor and prototype v.1

♻️ Current Situation & Problem

This PR refactors and consolidates the model comparison pipeline.
Enhancement: Improves code maintainability, extensibility, and experiment reproducibility.
Addresses performance and usability issues by streamlining dataset handling and optional augmentation transforms.

⚙️ Release Notes

  • Unified model comparison script.
  • Adds optional image degradation transforms (JPEG compression, Gaussian blur, color quantization).
  • Modularizes model initialization, dataset balancing, and preprocessing.
  • Maintains compatibility with ViT, DINOv2, and SimCLR models.

📚 Documentation

  • Updated docstrings for all major functions and classes.
  • Documented reasoning for modular design and augmentation choices.

📝 Code of Conduct & Contributing Guidelines

By submitting this pull request, you agree to follow our Coding Guidelines:

@Vicbi Vicbi requested a review from Copilot July 12, 2025 01:46
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR refactors and consolidates the image classification model comparison pipeline by removing legacy scripts and introducing a new, modular compressed_perception package.

  • Removed all old per-experiment scripts and configuration files under src/models and top‐level vit_lr_* folders.
  • Added src/compressed_perception modules for data transformation, dataset preparation, training utilities, and comparison workflows.
  • Updated documentation (docs/pipeline.md, README.md) and CI configurations (.yamllint, GitHub workflows) to align with the new structure.

Reviewed Changes

Copilot reviewed 50 out of 61 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
vit_lr_0.001/preprocessor_config.json Removed outdated ViT preprocessing config
vit_lr_0.001/config.json Removed old ViT model config
vit_lr_0.0005/preprocessor_config.json Removed duplicate preprocessing config
vit_lr_0.0005/config.json Removed duplicate model config
src/models/utils/util_methods.py Deleted legacy utility methods
src/models/utils/util_classes.py & util_classes_test.py Deleted old dataset and callback classes
src/models/utils/transforms.py & transforms_test.py Removed legacy image transforms
src/models/model_comparison*.py (all variants) Removed multiple legacy comparison scripts
src/compressed_perception/modules/data_transformation/image_transformation.py Added unified image augmentation/degradation utilities
src/compressed_perception/modules/data_preparation/preparation.py Added dataset filtering, balancing, splitting, transforms
src/compressed_perception/models/training/utils_methods.py Added training metrics, disk checks, GPU profiling utilities
src/compressed_perception/models/training/utils_classes.py Added dataset wrapper, model classes, and training callbacks
src/compressed_perception/models/training/constants.py Defined model-type constants
src/compressed_perception/models/comparison/compare_lr_sweep.py Added learning-rate sweep comparison script
src/compressed_perception/models/comparison/compare_baseline.py Added baseline model comparison script
docs/pipeline.md New pipeline documentation with usage and workflow overview
README.md Updated project structure and media paths
.yamllint Introduced custom YAML lint rules
.reuse/dep5.txt Added REUSE compliance metadata
.github/workflows/pull_request.yml & build-and-test.yml Added CI workflows for linting, REUSE compliance, link checks
Comments suppressed due to low confidence (1)

docs/pipeline.md:52

  • The markdown link is broken—replace [model_comparison_models.py](...) with a backtick-wrapped command, e.g., python model_comparison_models.py --resolution 224 ....
</details>

Comment thread .yamllint Outdated
Comment thread src/compressed_perception/models/comparison/compare_lr_sweep.py Outdated
@Vicbi Vicbi merged commit b23eeb1 into main Oct 28, 2025
4 of 7 checks passed
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.

2 participants