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

Add separate classes for classification tasks #501

Merged
merged 1 commit into from
Nov 8, 2023
Merged

Conversation

amrit110
Copy link
Member

@amrit110 amrit110 commented Nov 8, 2023

PR Type ([Feature | Fix | Documentation | Test])

Refactor/Improvement

Short Description

  • Add better class hierarchy for task classes
  • Move save/load model methods to base task class
  • Add model_name property to model wrappers and use that in the save function

Tests Added

tests/cyclops/tasks/test_classification.py

@amrit110 amrit110 self-assigned this Nov 8, 2023
@amrit110 amrit110 added the refactor Refactor existing code, with same or similar functionality label Nov 8, 2023
Copy link
Collaborator

@mahshidaln mahshidaln left a comment

Choose a reason for hiding this comment

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

Looks good!

Copy link

codecov bot commented Nov 8, 2023

Codecov Report

Merging #501 (0fc97cb) into main (cb788c2) will increase coverage by 0.33%.
Report is 1 commits behind head on main.
The diff coverage is 74.32%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #501      +/-   ##
==========================================
+ Coverage   61.96%   62.30%   +0.33%     
==========================================
  Files          86       87       +1     
  Lines        8435     8454      +19     
==========================================
+ Hits         5227     5267      +40     
+ Misses       3208     3187      -21     
Files Coverage Δ
cyclops/models/wrappers/pt_model.py 80.15% <100.00%> (+0.40%) ⬆️
cyclops/tasks/cxr_classification.py 42.59% <100.00%> (-6.64%) ⬇️
cyclops/tasks/mortality_prediction.py 32.22% <100.00%> (-0.57%) ⬇️
cyclops/utils/file.py 99.07% <ø> (ø)
cyclops/models/wrappers/sk_model.py 43.84% <80.00%> (+5.19%) ⬆️
cyclops/tasks/classification.py 81.81% <81.81%> (ø)
cyclops/tasks/base.py 84.50% <79.16%> (-3.00%) ⬇️
cyclops/models/wrappers/base.py 68.75% <20.00%> (-22.16%) ⬇️

Impacted file tree graph

@amrit110 amrit110 merged commit 02c7e8c into main Nov 8, 2023
9 checks passed
@amrit110 amrit110 deleted the improve_task_classes branch November 8, 2023 20:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactor Refactor existing code, with same or similar functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants