forked from foundation-model-stack/fms-hf-tuning
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/main'
- Loading branch information
Showing
27 changed files
with
370 additions
and
274 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
examples/trainercontroller_configs/epoch-level-training-loss-below-threshold-log-config.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
controller_metrics: | ||
- name: training_loss_window | ||
class: HistoryBasedMetric | ||
arguments: | ||
window_size: 1 | ||
controllers: | ||
- name: epoch_level_stop_on_training_loss_below_threshold | ||
triggers: | ||
- on_step_end | ||
rule: len(training_loss_window["training_loss"]["loss"]) == training_loss_window["window_size"] and training_loss_window["training_loss"]["loss"][0] < 2.2 and training_loss_window["training_loss"]["epoch"][0] > 2 | ||
config: | ||
trigger_log_level: warning | ||
operations: | ||
- hfcontrols.should_training_stop |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
controller_metrics: | ||
- name: loss | ||
- name: training_loss | ||
class: Loss | ||
controllers: | ||
- name: loss_controller | ||
triggers: | ||
- on_log | ||
rule: loss < 1.0 | ||
rule: training_loss["loss"] < 1.0 | ||
operations: | ||
- hfcontrols.should_training_stop |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
controller_metrics: | ||
- name: loss | ||
- name: training_loss | ||
class: MissingMetricClass | ||
controllers: | ||
- name: loss_controller_invalid_metric | ||
triggers: | ||
- on_log | ||
rule: loss < 1.0 | ||
rule: training_loss['loss'] < 1.0 | ||
operations: | ||
- hfcontrols.should_training_stop |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
controller_metrics: | ||
- name: loss | ||
- name: training_loss | ||
class: Loss | ||
controllers: | ||
- name: loss_controller_invalid_operation | ||
triggers: | ||
- on_log | ||
rule: loss < 1.0 | ||
rule: training_loss['loss'] < 1.0 | ||
operations: | ||
- missingop.should_training_stop |
4 changes: 2 additions & 2 deletions
4
tests/data/trainercontroller/loss_invalid_operation_action.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
controller_metrics: | ||
- name: loss | ||
- name: training_loss | ||
class: Loss | ||
controllers: | ||
- name: loss_controller_invalid_operation_action | ||
triggers: | ||
- on_log | ||
rule: loss < 1.0 | ||
rule: training_loss['loss'] < 1.0 | ||
operations: | ||
- hfcontrols.missingaction |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
controller_metrics: | ||
- name: loss | ||
- name: training_loss | ||
class: Loss | ||
controllers: | ||
- name: loss_controller_invalid_trigger | ||
triggers: | ||
- log_it_all_incorrect_trigger_name | ||
rule: loss < 1.0 | ||
rule: training_loss['loss'] < 1.0 | ||
operations: | ||
- hfcontrols.should_training_stop |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
controller_metrics: | ||
- name: loss | ||
- name: training_loss | ||
class: Loss | ||
controllers: | ||
- name: loss_controller | ||
triggers: | ||
- on_log | ||
rule: loss < 1.0 | ||
rule: training_loss['loss'] < 1.0 | ||
operations: | ||
- hfcontrols.should_training_stop |
4 changes: 2 additions & 2 deletions
4
tests/data/trainercontroller/loss_on_threshold_with_trainer_state.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
controller_metrics: | ||
- name: state | ||
class: TrainingState | ||
- name: loss | ||
- name: training_loss | ||
class: Loss | ||
controllers: | ||
- name: loss_controller | ||
triggers: | ||
- on_log | ||
rule: loss < 2 and state["epoch"] >= 0.5 | ||
rule: training_loss['loss'] < 2 and state["epoch"] >= 0.5 | ||
operations: | ||
- hfcontrols.should_training_stop |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
controller_metrics: | ||
- name: loss | ||
- name: training_loss | ||
class: Loss | ||
controllers: | ||
- name: loss_controller_unavailable_metric | ||
triggers: | ||
- on_step_end | ||
rule: loss < 1.0 | ||
rule: training_loss['loss'] < 1.0 | ||
operations: | ||
- hfcontrols.should_training_stop |
2 changes: 1 addition & 1 deletion
2
tests/data/trainercontroller/loss_with_malicious_input_rule.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
controller_metrics: | ||
- name: state | ||
class: TrainingState | ||
controllers: | ||
- name: stop_on_training_loss_on_save | ||
triggers: | ||
- on_save | ||
rule: state["epoch"] >= 0.5 | ||
operations: | ||
- hfcontrols.should_training_stop |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.