Skip to content

Commit f57037f

Browse files
authored
support num_train_epoches while keep dynamic-step training (#50)
* support num_train_epoches while keep dynamic-step training * support num_train_epoches while keep dynamic-step training * add how to use.md for weighter
1 parent 4475d6d commit f57037f

16 files changed

Lines changed: 148 additions & 47 deletions

File tree

examples/test/test_select.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,4 +60,4 @@ components_cfg_file: src/dataflex/configs/components.yaml
6060
component_name: delta_loss # 选择组件名称,对应 components_cfg_file 中定义的组件
6161
warmup_step: 4
6262
update_step: 3
63-
update_times: 4
63+
update_times: 4 # Updates per Flex epoch; repeats by num_train_epochs

examples/test/test_weight.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,4 +59,4 @@ train_type: dynamic_weight # 选择训练器类型。可选值包括:
5959
components_cfg_file: src/dataflex/configs/components.yaml
6060
component_name: custom # 选择组件名称,对应 components_cfg_file 中定义的组件
6161
warmup_step: 1
62-
train_step: 3 # 总训练步数(包括warm_up)
62+
train_step: 3 # Total steps; overrides num_train_epochs

examples/train_lora/selectors/custom.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ components_cfg_file: src/dataflex/configs/components.yaml
5757
component_name: custom # 选择组件名称,对应 components_cfg_file 中定义的组件
5858
warmup_step: 10
5959
update_step: 10
60-
update_times: 2
60+
update_times: 2 # Updates per Flex epoch; repeats by num_train_epochs
6161

6262
## eval
6363
# val_size: 0.001
@@ -71,4 +71,4 @@ eval_steps: 10
7171
# early_stopping_steps: 3
7272
# early_stopping_min_delta: 0.01
7373

74-
# FORCE_TORCHRUN=1 DISABLE_VERSION_CHECK=1 dataflex-cli train examples/train_lora/selectors/custom.yaml
74+
# FORCE_TORCHRUN=1 DISABLE_VERSION_CHECK=1 dataflex-cli train examples/train_lora/selectors/custom.yaml

examples/train_lora/selectors/delta_loss.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ components_cfg_file: src/dataflex/configs/components.yaml
5757
component_name: delta_loss # 选择组件名称,对应 components_cfg_file 中定义的组件
5858
warmup_step: 10
5959
update_step: 10
60-
update_times: 2
60+
update_times: 2 # Updates per Flex epoch; repeats by num_train_epochs
6161

6262
## eval
6363
# val_size: 0.001
@@ -71,4 +71,4 @@ eval_steps: 10
7171
# early_stopping_steps: 3
7272
# early_stopping_min_delta: 0.01
7373

74-
# FORCE_TORCHRUN=1 DISABLE_VERSION_CHECK=1 dataflex-cli train examples/train_lora/selectors/delta_loss.yaml
74+
# FORCE_TORCHRUN=1 DISABLE_VERSION_CHECK=1 dataflex-cli train examples/train_lora/selectors/delta_loss.yaml

examples/train_lora/selectors/less.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ components_cfg_file: src/dataflex/configs/components.yaml
5757
component_name: less # 选择组件名称,对应 components_cfg_file 中定义的组件
5858
warmup_step: 10
5959
update_step: 10
60-
update_times: 2
60+
update_times: 2 # Updates per Flex epoch; repeats by num_train_epochs
6161

6262
## eval
6363
# val_size: 0.001
@@ -71,4 +71,4 @@ eval_steps: 10
7171
# early_stopping_steps: 3
7272
# early_stopping_min_delta: 0.01
7373

74-
# FORCE_TORCHRUN=1 DISABLE_VERSION_CHECK=1 dataflex-cli train examples/train_lora/selectors/less.yaml
74+
# FORCE_TORCHRUN=1 DISABLE_VERSION_CHECK=1 dataflex-cli train examples/train_lora/selectors/less.yaml

examples/train_lora/selectors/loss.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ components_cfg_file: src/dataflex/configs/components.yaml
5757
component_name: loss # 选择组件名称,对应 components_cfg_file 中定义的组件
5858
warmup_step: 10
5959
update_step: 10
60-
update_times: 2
60+
update_times: 2 # Updates per Flex epoch; repeats by num_train_epochs
6161

6262
## eval
6363
# val_size: 0.001
@@ -71,4 +71,4 @@ eval_steps: 10
7171
# early_stopping_steps: 3
7272
# early_stopping_min_delta: 0.01
7373

74-
# FORCE_TORCHRUN=1 DISABLE_VERSION_CHECK=1 dataflex-cli train examples/train_lora/selectors/loss.yaml
74+
# FORCE_TORCHRUN=1 DISABLE_VERSION_CHECK=1 dataflex-cli train examples/train_lora/selectors/loss.yaml

examples/train_lora/selectors/near.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ components_cfg_file: src/dataflex/configs/components.yaml
5757
component_name: near # 选择组件名称,对应 components_cfg_file 中定义的组件
5858
warmup_step: 10
5959
update_step: 10
60-
update_times: 2
60+
update_times: 2 # Updates per Flex epoch; repeats by num_train_epochs
6161

6262
## eval
6363
# val_size: 0.001
@@ -71,4 +71,4 @@ eval_steps: 10
7171
# early_stopping_steps: 3
7272
# early_stopping_min_delta: 0.01
7373

74-
# FORCE_TORCHRUN=1 DISABLE_VERSION_CHECK=1 dataflex-cli train examples/train_lora/selectors/near.yaml
74+
# FORCE_TORCHRUN=1 DISABLE_VERSION_CHECK=1 dataflex-cli train examples/train_lora/selectors/near.yaml

examples/train_lora/selectors/nice.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ components_cfg_file: src/dataflex/configs/components.yaml
5757
component_name: nice # 选择组件名称,对应 components_cfg_file 中定义的组件
5858
warmup_step: 10
5959
update_step: 10
60-
update_times: 2
60+
update_times: 2 # Updates per Flex epoch; repeats by num_train_epochs
6161

6262
## eval
6363
# val_size: 0.001
@@ -71,4 +71,4 @@ eval_steps: 10
7171
# early_stopping_steps: 3
7272
# early_stopping_min_delta: 0.01
7373

74-
# FORCE_TORCHRUN=1 DISABLE_VERSION_CHECK=1 dataflex-cli train examples/train_lora/selectors/nice.yaml
74+
# FORCE_TORCHRUN=1 DISABLE_VERSION_CHECK=1 dataflex-cli train examples/train_lora/selectors/nice.yaml

examples/train_lora/selectors/random.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ components_cfg_file: src/dataflex/configs/components.yaml
5757
component_name: random # 选择组件名称,对应 components_cfg_file 中定义的组件
5858
warmup_step: 10
5959
update_step: 10
60-
update_times: 2
60+
update_times: 2 # Updates per Flex epoch; repeats by num_train_epochs
6161

6262
## eval
6363
# val_size: 0.001
@@ -71,4 +71,4 @@ eval_steps: 10
7171
# early_stopping_steps: 3
7272
# early_stopping_min_delta: 0.01
7373

74-
# FORCE_TORCHRUN=1 DISABLE_VERSION_CHECK=1 dataflex-cli train examples/train_lora/selectors/random.yaml
74+
# FORCE_TORCHRUN=1 DISABLE_VERSION_CHECK=1 dataflex-cli train examples/train_lora/selectors/random.yaml

examples/train_lora/selectors/tsds.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ components_cfg_file: src/dataflex/configs/components.yaml
5757
component_name: tsds # 选择组件名称,对应 components_cfg_file 中定义的组件
5858
warmup_step: 10
5959
update_step: 10
60-
update_times: 2
60+
update_times: 2 # Updates per Flex epoch; repeats by num_train_epochs
6161

6262
## eval
6363
# val_size: 0.001

0 commit comments

Comments
 (0)