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 probability option to aug nodes #192

Merged
merged 2 commits into from
Oct 24, 2023
Merged

Add probability option to aug nodes #192

merged 2 commits into from
Oct 24, 2023

Conversation

sheridana
Copy link
Collaborator

  • Adds a skip_node() batch filter method to be overridden in subclasses
  • Adds a probability parameter to augmentation nodes that returns true in skip_node() if less than a random float between 0 and 1
  • Adds a test for skipping

Pre-Merge Checklist:

  • if this PR adds a feature: request merge into the latest development branch (vX.Y-dev)
  • if this PR fixes a bug: request merge into the latest patch branch (patch-X.Y.Z)
  • PR branch name is short and describes the feature/bug addressed in this PR
  • commit messages are consistent
  • changes reviewed by another contributor
  • tests cover changes
  • all tests pass

@sheridana sheridana requested a review from pattonw October 17, 2023 20:20
@codecov-commenter
Copy link

codecov-commenter commented Oct 18, 2023

Codecov Report

Merging #192 (d29cbb9) into dev-v1.4 (a33e5b4) will decrease coverage by 0.03%.
The diff coverage is 93.75%.

@@             Coverage Diff              @@
##           dev-v1.4     #192      +/-   ##
============================================
- Coverage     67.60%   67.58%   -0.03%     
============================================
  Files            98       98              
  Lines          6829     6854      +25     
============================================
+ Hits           4617     4632      +15     
- Misses         2212     2222      +10     
Files Coverage Δ
gunpowder/nodes/batch_filter.py 91.08% <100.00%> (+0.18%) ⬆️
gunpowder/nodes/deform_augment.py 91.54% <100.00%> (+0.12%) ⬆️
gunpowder/nodes/elastic_augment.py 84.36% <100.00%> (+0.19%) ⬆️
gunpowder/nodes/intensity_augment.py 94.73% <100.00%> (+0.61%) ⬆️
gunpowder/nodes/noise_augment.py 100.00% <100.00%> (ø)
gunpowder/nodes/shift_augment.py 99.24% <100.00%> (+0.01%) ⬆️
gunpowder/nodes/simple_augment.py 93.58% <100.00%> (+0.12%) ⬆️
gunpowder/nodes/defect_augment.py 13.10% <33.33%> (+0.42%) ⬆️

... and 1 file with indirect coverage changes

@pattonw pattonw merged commit f0c62af into dev-v1.4 Oct 24, 2023
4 of 8 checks passed
@pattonw pattonw deleted the skip_node branch October 24, 2023 16:06
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.

3 participants