File size: 851 Bytes
41a34cd
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
from data_generator import generate_data

import argparse


def parse_args():
    parser = argparse.ArgumentParser(description="Clear old dataset and generate new one")
    parser.add_argument("size", help="size of new dataset", type=int)
    parser.add_argument("depth", help="max_depth scope depth of generated equation, no less than 1", type=int)
    parser.add_argument("length", help="length of equation will be in range length/2..length", type=int)
    parser.add_argument("fraction", help="fraction of tex vocab to sample tokens from, float in range 0..1", type=float)
    args = parser.parse_args()
    return args


def main():
    args = parse_args()
    generate_data(examples_count=args.size, max_depth=args.depth, equation_length=args.length,
                  distribution_fraction=args.fraction)


if __name__ == "__main__":
    main()