Skip to content

Add dataset slicing and fix remove annotations - #1131

Open
potipot wants to merge 4 commits into
masterfrom
fix_remove_annotations_add_dataset_slicing
Open

Add dataset slicing and fix remove annotations#1131
potipot wants to merge 4 commits into
masterfrom
fix_remove_annotations_add_dataset_slicing

Conversation

@potipot

@potipot potipot commented Aug 11, 2022

Copy link
Copy Markdown
Contributor

add dataset slicing

This simple PR adds functionality of slicing dataset to return a new sub dataset. This can be used in inference for example like so:

infer_dl = model_type.infer_dl(valid_ds[:4], batch_size=4, shuffle=False)
preds = model_type.predict_from_dl(model, infer_dl, keep_images=True)

remove annotation

The remove annotation for detection component was broken, it only deleted the label_id from record but not the string encoded label itself.

@ai-fast-track

Copy link
Copy Markdown
Collaborator

Great idea Pawel! Thanks!

@potipot

potipot commented Aug 11, 2022

Copy link
Copy Markdown
Contributor Author

it seems like the error is coming from pytorch-lightning 1.7.0
the version we install

Requirement already satisfied: pytorch-lightning>=1.4.5 in /opt/hostedtoolcache/Python/3.7.13/x64/lib/python3.7/site-packages (from icevision==0.12.0) (1.7.1)

argument deprecated since 1.7.0:
https://pytorch-lightning.readthedocs.io/en/stable/generated/CHANGELOG.html#removed

@codecov

codecov Bot commented Aug 11, 2022

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 87.50000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 85.83%. Comparing base (356d29b) to head (500ddf2).
⚠️ Report is 10 commits behind head on master.

Files with missing lines Patch % Lines
icevision/data/dataset.py 85.71% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1131      +/-   ##
==========================================
+ Coverage   85.48%   85.83%   +0.35%     
==========================================
  Files         305      305              
  Lines        6675     6713      +38     
==========================================
+ Hits         5706     5762      +56     
+ Misses        969      951      -18     
Flag Coverage Δ
unittests 85.83% <87.50%> (+0.35%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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