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

[api] Added Early stopping configuration (#38) #2806

Merged
merged 3 commits into from
Oct 24, 2023

Conversation

jagodevreede
Copy link
Contributor

@jagodevreede jagodevreede commented Oct 12, 2023

Description

This PR implements a listener for early stopping as described in #38. And takes the code @gforman44 and implements that in a TrainingListener

resolves #38

Copy link
Contributor

@zachgk zachgk left a comment

Choose a reason for hiding this comment

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

Thank you for contributing this @jagodevreede! I'm sure many training users will appreciate it. Your PR looks pretty good, but I left a few comments.

I'll also run the CI. It will probably complain from our code formatter and checkstyle. See http://docs.djl.ai/docs/development/development_guideline.html#coding-conventions for some explanations and how to check it locally as well

@jagodevreede
Copy link
Contributor Author

Local build is happy now, let's see if CI agrees with that. Also fixed your comments.

@jagodevreede
Copy link
Contributor Author

I was able to reproduce the failing ci build locally with JDK11. Fixed it in commit 402df41

@codecov-commenter
Copy link

Codecov Report

Attention: 1361 lines in your changes are missing coverage. Please review.

Comparison is base (bb5073f) 72.08% compared to head (402df41) 72.04%.
Report is 898 commits behind head on master.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #2806      +/-   ##
============================================
- Coverage     72.08%   72.04%   -0.05%     
- Complexity     5126     7106    +1980     
============================================
  Files           473      703     +230     
  Lines         21970    31751    +9781     
  Branches       2351     3294     +943     
============================================
+ Hits          15838    22875    +7037     
- Misses         4925     7303    +2378     
- Partials       1207     1573     +366     
Files Coverage Δ
...ava/ai/djl/inference/streaming/StreamingBlock.java 100.00% <100.00%> (ø)
api/src/main/java/ai/djl/metric/Dimension.java 100.00% <100.00%> (ø)
api/src/main/java/ai/djl/metric/Unit.java 100.00% <100.00%> (ø)
api/src/main/java/ai/djl/modality/audio/Audio.java 100.00% <100.00%> (ø)
api/src/main/java/ai/djl/modality/cv/Image.java 69.23% <ø> (-4.11%) ⬇️
...rc/main/java/ai/djl/modality/cv/MultiBoxPrior.java 76.00% <ø> (ø)
...ava/ai/djl/modality/cv/output/DetectedObjects.java 96.29% <100.00%> (+1.29%) ⬆️
...rc/main/java/ai/djl/modality/cv/output/Joints.java 71.42% <100.00%> (ø)
.../main/java/ai/djl/modality/cv/output/Landmark.java 100.00% <ø> (ø)
...i/djl/modality/cv/transform/RandomResizedCrop.java 94.11% <100.00%> (+5.22%) ⬆️
... and 226 more

... and 373 files with indirect coverage changes

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

@zachgk zachgk merged commit 0b6474f into deepjavalibrary:master Oct 24, 2023
5 checks passed
frankfliu pushed a commit that referenced this pull request Apr 26, 2024
* [api] Added Early stopping configuration (#38)

* [api] Added Builder for Early stopping configuration (#38)

* Explicitly set NDManager for dataset in EarlyStoppingListenerTest to make the test run on JDK11 in gradle.
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.

Early stopping configuration
3 participants