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

Expose early stopping hyper-parameters for all tasks #1241

Merged
merged 35 commits into from
Sep 21, 2022
Merged
Show file tree
Hide file tree
Changes from 32 commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
ff67d88
Early stop as hp
Aug 25, 2022
bb3fedc
Early stop metric added
Aug 25, 2022
d3d5234
override early stopping hook
Aug 29, 2022
226f2ad
inter_patience
Aug 29, 2022
3737a18
fix merge
Aug 29, 2022
d88fa10
spaces
Aug 29, 2022
0223a71
Patience ui header
Aug 29, 2022
6b57fda
Merge branch 'releases/v0.3.0-sc1.2' of https://github.com/openvinoto…
supersoob Aug 30, 2022
9564172
test
supersoob Aug 30, 2022
12bfa60
Fix seg
supersoob Aug 31, 2022
11b4720
warning for patience
supersoob Aug 31, 2022
90a0ade
adaptive remove
supersoob Aug 31, 2022
c4f1115
fix bug when early stop is false
supersoob Aug 31, 2022
b86d9aa
warning sign in patience
supersoob Aug 31, 2022
2d9bc0c
Merge branch 'releases/v0.3.0-sc1.2' of https://github.com/openvinoto…
supersoob Sep 1, 2022
063af54
Adaptive validation interval added
supersoob Sep 5, 2022
fa3dae8
Merge branch 'releases/v0.3.0-sc1.2' of https://github.com/openvinoto…
supersoob Sep 5, 2022
05bfb15
iseg
supersoob Sep 5, 2022
881727d
Refator
supersoob Sep 5, 2022
cbb7f99
Fix minor errors
Sep 5, 2022
35b1c46
params update in guide
Sep 5, 2022
ca011e1
Typo
supersoob Sep 6, 2022
0036c30
Refactor and change hp name
supersoob Sep 6, 2022
3b5111b
Modify codes for ada_itv_hook
supersoob Sep 6, 2022
5df0299
Typo
supersoob Sep 6, 2022
5fc4e60
Fix typo in warning
supersoob Sep 7, 2022
92a1442
default hp update
supersoob Sep 8, 2022
7cbcbec
hp update
supersoob Sep 8, 2022
81bbb10
update hpo_config file based on updated classification default hyper …
eunwoosh Sep 15, 2022
4844362
QUICK_START_GUIDE.md parameters
supersoob Sep 19, 2022
28cb37b
Change MPA submodule
supersoob Sep 19, 2022
b0e152d
Make start epoch param for early stopping
Sep 19, 2022
d1b892e
hp for inst-seg
Sep 19, 2022
91c84c1
Change MPA submodule commit
Sep 19, 2022
8b5ed4b
Codacy Static Code Analysis
supersoob Sep 19, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions QUICK_START_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,9 @@ usage: ote train template params [-h]
[--learning_parameters.learning_rate LEARNING_RATE]
[--learning_parameters.learning_rate_warmup_iters LEARNING_RATE_WARMUP_ITERS]
[--learning_parameters.num_iters NUM_ITERS]
[--learning_parameters.enable_early_stopping ENABLE_EARLY_STOPPING]
[--learning_parameters.early_stop_patience EARLY_STOP_PATIENCE]
[--learning_parameters.early_stop_iteration_patience EARLY_STOP_ITERATION_PATIENCE]
[--postprocessing.confidence_threshold CONFIDENCE_THRESHOLD]
[--postprocessing.result_based_confidence_threshold RESULT_BASED_CONFIDENCE_THRESHOLD]
[--nncf_optimization.enable_quantization ENABLE_QUANTIZATION]
Expand Down Expand Up @@ -205,6 +208,22 @@ optional arguments:
default_value: 300
max_value: 100000
min_value: 1
--learning_parameters.enable_early_stopping ENABLE_EARLY_STOPPING
header: Enable early stopping of the training
type: BOOLEAN
default_value: True
--learning_parameters.early_stop_patience EARLY_STOP_PATIENCE
header: Patience for early stopping
type: INTEGER
default_value: 10
max_value: 50
min_value: 0
--learning_parameters.early_stop_iteration_patience EARLY_STOP_ITERATION_PATIENCE
header: Iteration patience for early stopping
type: INTEGER
default_value: 0
max_value: 1000
min_value: 0
--postprocessing.confidence_threshold CONFIDENCE_THRESHOLD
header: Confidence threshold
type: FLOAT
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,17 +121,68 @@ learning_parameters:
enable_early_stopping:
affects_outcome_of: TRAINING
default_value: true
description: Adaptive early exit from training when accuracy isn't changed or decreased for several epochs.
description: Early exit from training when validation accuracy isn't changed or decreased for several epochs.
editable: true
header: Enable adaptive early stopping of the training
header: Enable early stopping of the training
type: BOOLEAN
ui_rules:
action: DISABLE_EDITING
operator: AND
rules: []
type: UI_RULES
visible_in_ui: false
visible_in_ui: true
warning: null
early_stop_start:
affects_outcome_of: TRAINING
default_value: 3
editable: true
header: Start epoch for early stopping
max_value: 1000
min_value: 0
type: INTEGER
ui_rules:
action: DISABLE_EDITING
operator: AND
rules: []
type: UI_RULES
value: 3
visible_in_ui: false
early_stop_patience:
affects_outcome_of: TRAINING
default_value: 8
description: Training will stop if the model does not improve within the number of epochs of patience.
editable: true
header: Patience for early stopping
max_value: 50
min_value: 0
type: INTEGER
ui_rules:
action: DISABLE_EDITING
operator: AND
rules: []
type: UI_RULES
value: 8
visible_in_ui: true
warning: This is applied exclusively when early stopping is enabled.
early_stop_iteration_patience:
affects_outcome_of: TRAINING
default_value: 0
description:
Training will stop if the model does not improve within the number of iterations of patience.
This ensures the model is trained enough with the number of iterations of patience before early stopping.
editable: true
header: Iteration patience for early stopping
max_value: 1000
min_value: 0
type: INTEGER
ui_rules:
action: DISABLE_EDITING
operator: AND
rules: []
type: UI_RULES
value: 0
visible_in_ui: true
warning: This is applied exclusively when early stopping is enabled.
type: PARAMETER_GROUP
visible_in_ui: true
pot_parameters:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ hp_space:
learning_parameters.learning_rate:
param_type: qloguniform
range:
- 0.0014
- 0.035
- 0.0001
- 0.00098
- 0.0245
- 0.00001
learning_parameters.batch_size:
param_type: qloguniform
range:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@
'../../../submodule/models/classification/ote_efficientnet_b0.yaml',
]

runner = dict(max_epochs=20)
fp16 = dict(loss_scale=512.)
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ hyper_parameters:
num_workers:
default_value: 0
learning_rate:
default_value: 0.007
default_value: 0.0049
auto_hpo_state: POSSIBLE
learning_rate_warmup_iters:
default_value: 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@
'../../../submodule/models/classification/ote_efficientnet_v2_s.yaml',
]

runner = dict(max_epochs=20)
fp16 = dict(loss_scale=512.)
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ hyper_parameters:
num_workers:
default_value: 0
learning_rate:
default_value: 0.007
default_value: 0.0071
auto_hpo_state: POSSIBLE
learning_rate_warmup_iters:
default_value: 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ hp_space:
learning_parameters.learning_rate:
param_type: qloguniform
range:
- 0.0008
- 0.00029
- 0.1
- 0.0001
- 0.00001
learning_parameters.batch_size:
param_type: qloguniform
range:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@
'../../../submodule/models/classification/ote_mobilenet_v3_large.yaml',
]

runner = dict(max_epochs=20)
fp16 = dict(loss_scale=512.)
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ hyper_parameters:
num_workers:
default_value: 0
learning_rate:
default_value: 0.016
default_value: 0.0058
auto_hpo_state: POSSIBLE
learning_rate_warmup_iters:
default_value: 100
default_value: 10
num_iters:
default_value: 90
algo_backend:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,85 @@ learning_parameters:
value: 0
visible_in_ui: true
warning: null
enable_early_stopping:
affects_outcome_of: TRAINING
default_value: true
description: Early exit from training when validation accuracy isn't changed or decreased for several epochs.
editable: true
header: Enable early stopping of the training
type: BOOLEAN
ui_rules:
action: DISABLE_EDITING
operator: AND
rules: []
type: UI_RULES
visible_in_ui: true
warning: null
early_stop_start:
affects_outcome_of: TRAINING
default_value: 3
editable: true
header: Start epoch for early stopping
max_value: 1000
min_value: 0
type: INTEGER
ui_rules:
action: DISABLE_EDITING
operator: AND
rules: []
type: UI_RULES
value: 3
visible_in_ui: false
early_stop_patience:
affects_outcome_of: TRAINING
default_value: 10
description: Training will stop if the model does not improve within the number of epochs of patience.
editable: true
header: Patience for early stopping
max_value: 50
min_value: 0
type: INTEGER
ui_rules:
action: DISABLE_EDITING
operator: AND
rules: []
type: UI_RULES
value: 10
visible_in_ui: true
warning: This is applied exclusively when early stopping is enabled.
early_stop_iteration_patience:
affects_outcome_of: TRAINING
default_value: 0
description:
Training will stop if the model does not improve within the number of iterations of patience.
This ensures the model is trained enough with the number of iterations of patience before early stopping.
editable: true
header: Iteration patience for early stopping
max_value: 1000
min_value: 0
type: INTEGER
ui_rules:
action: DISABLE_EDITING
operator: AND
rules: []
type: UI_RULES
value: 0
visible_in_ui: true
warning: This is applied exclusively when early stopping is enabled.
use_adaptive_interval:
affects_outcome_of: TRAINING
default_value: true
description: Depending on the size of iteration per epoch, adaptively update the validation interval and related values.
editable: true
header: Use adaptive validation interval
type: BOOLEAN
ui_rules:
action: DISABLE_EDITING
operator: AND
rules: []
type: UI_RULES
visible_in_ui: true
warning: This will automatically control the patience and interval when early stopping is enabled.
type: PARAMETER_GROUP
visible_in_ui: true
postprocessing:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,85 @@ learning_parameters:
value: 0
visible_in_ui: true
warning: null
enable_early_stopping:
affects_outcome_of: TRAINING
default_value: true
description: Early exit from training when validation accuracy isn't changed or decreased for several epochs.
editable: true
header: Enable early stopping of the training
type: BOOLEAN
ui_rules:
action: DISABLE_EDITING
operator: AND
rules: []
type: UI_RULES
visible_in_ui: true
warning: null
early_stop_start:
affects_outcome_of: TRAINING
default_value: 3
editable: true
header: Start epoch for early stopping
max_value: 1000
min_value: 0
type: INTEGER
ui_rules:
action: DISABLE_EDITING
operator: AND
rules: []
type: UI_RULES
value: 3
visible_in_ui: false
early_stop_patience:
affects_outcome_of: TRAINING
default_value: 10
description: Training will stop if the model does not improve within the number of epochs of patience.
editable: true
header: Patience for early stopping
max_value: 50
min_value: 0
type: INTEGER
ui_rules:
action: DISABLE_EDITING
operator: AND
rules: []
type: UI_RULES
value: 10
visible_in_ui: true
warning: This is applied exclusively when early stopping is enabled.
early_stop_iteration_patience:
affects_outcome_of: TRAINING
default_value: 0
description:
Training will stop if the model does not improve within the number of iterations of patience.
This ensures the model is trained enough with the number of iterations of patience before early stopping.
editable: true
header: Iteration patience for early stopping
max_value: 1000
min_value: 0
type: INTEGER
ui_rules:
action: DISABLE_EDITING
operator: AND
rules: []
type: UI_RULES
value: 0
visible_in_ui: true
warning: This is applied exclusively when early stopping is enabled.
use_adaptive_interval:
affects_outcome_of: TRAINING
default_value: true
description: Depending on the size of iteration per epoch, adaptively update the validation interval and related values.
editable: true
header: Use adaptive validation interval
type: BOOLEAN
ui_rules:
action: DISABLE_EDITING
operator: AND
rules: []
type: UI_RULES
visible_in_ui: true
warning: This will automatically control the patience and interval when early stopping is enabled.
type: PARAMETER_GROUP
visible_in_ui: true
postprocessing:
Expand Down
Loading