-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Perform dataset mixing via sampling probabilities in data config (#408)
Code to perform dataset sampling via sampling probabilities in data Signed-off-by: Dushyant Behl <dushyantbehl@in.ibm.com>
- Loading branch information
1 parent
e6f7a22
commit 4168c87
Showing
7 changed files
with
255 additions
and
50 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
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
41 changes: 41 additions & 0 deletions
41
tests/artifacts/predefined_data_configs/multiple_datasets_with_sampling.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,41 @@ | ||
dataprocessor: | ||
type: default | ||
sampling_stopping_strategy: first_exhausted | ||
seed: 66 | ||
datasets: | ||
- name: dataset_1 | ||
sampling: 0.3 | ||
data_paths: | ||
- "FILE_PATH" | ||
data_handlers: | ||
- name: tokenize_and_apply_input_masking | ||
arguments: | ||
remove_columns: all | ||
batched: false | ||
fn_kwargs: | ||
input_field_name: input | ||
output_field_name: output | ||
- name: dataset_2 | ||
sampling: 0.4 | ||
data_paths: | ||
- "FILE_PATH" | ||
data_handlers: | ||
- name: tokenize_and_apply_input_masking | ||
arguments: | ||
remove_columns: all | ||
batched: false | ||
fn_kwargs: | ||
input_field_name: input | ||
output_field_name: output | ||
- name: dataset_3 | ||
sampling: 0.3 | ||
data_paths: | ||
- "FILE_PATH" | ||
data_handlers: | ||
- name: tokenize_and_apply_input_masking | ||
arguments: | ||
remove_columns: all | ||
batched: false | ||
fn_kwargs: | ||
input_field_name: input | ||
output_field_name: output |
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.