File size: 1,175 Bytes
fc13185
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
operators: 
- id: load_math
  config:
    type: hf_source
    dataset: mathmadness/MathCoder
    split: train
    trust_remote_code: True
- id: sample_dataset
  config:
    type: function
    function: data_strategies.commons.uniform_sample_limited
    function_config:
      num_samples: 1_000_000  # 1.25% of 10000 target from stage 1
  input_ids:
  - load_math
- id: clean_up
  config:
    type: function
    function: data_strategies.SeedMathData.utils.mathcoder_map
  input_ids:
  - sample_dataset
- id: classify
  config:
    type: fasttext
    num_cpus: 32
    hf_repo_id: mlfoundations-dev/instruction_filtering_fast_text_math_pos_numina_neg_bad_seed_math 
    input_column: instruction_seed
    target_label: "__label__QA_doc"
    top_percentage_ranking: 10
  input_ids:
   - clean_up
- id: keep_only
  config:
    type: function
    function: data_strategies.commons.keep_only_columns
    function_config:
      columns_to_keep:    
        - instruction_seed
  input_ids:
  - classify
- id: _add_source
  config:
    type: function
    function: data_strategies.commons.add_constant_columns
    function_config:
      source: "mathcoder"
  input_ids:
  - keep_only