File size: 1,724 Bytes
a20f638
 
 
 
 
aa4d3b4
 
 
c1bf2c0
d4f46a1
a20f638
 
de21fbe
 
87e1b59
d4f46a1
a20f638
 
b6be264
a20f638
 
0bc653d
 
b6be264
a20f638
 
399b20e
a20f638
 
 
 
 
 
e6071d9
a20f638
 
 
 
e6071d9
 
a20f638
 
 
 
e6071d9
 
a20f638
 
 
 
e6071d9
 
a20f638
 
 
 
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
49
50
51
52
53
54
55
56
57
config = {
    # tokenizer
    'tokenizer_path_retrieval': 'imamnurby/bow-tokenizer-uncased',

    # model_path
    'model_path_retrieval': './library_retriever/retrieval_distillbert',
    'model_path_generative': './pattern_generator',
    'model_path_classifier': './configuration_classifier',
    'classifier_head_path': './configuration_classifier/classifier_head_rf_11nov.pkl',
    

    # db path
    'db_metadata_path': 'lib_to_features.csv',
    'db_constructor_path': 'lib_to_constructor.csv',
    'db_params_path' : 'lib_to_constructor_w_params_v2.csv',
    'exclusion_list_path': 'common_words.txt',

    # retrieval_model_setting
    'max_k': 3,

    # generative_model_setting
    'num_beams': 2,
    'num_return_sequences': 2,
    'max_length_generate': 50,

    # hw_classifier setting
    'max_length': 128
}

classifier_class_mapping = {
    0: {'protocol': 'UART',
        'pin_connection_from_hw_to_arduino': {
            'arduino_mega': [('RX-->19, TX-->18')],
            # 'arduino_uno': [('RX-->0, TX-->1')]
        }
    },
    1: {'protocol': 'SPI',
        'pin_connection_from_hw_to_arduino': {
            'arduino': [('SCK-->52, MOSI-->51, MISO-->50, CS-->53')],
            # 'arduino_uno': [('SCK-->13, MOSI-->11, MISO-->12, CS-->10')]
        }
    },
    2: {'protocol': 'I2C',
        'pin_connection_from_hw_to_arduino': {
            'arduino': [('SDA-->20, SCL-->21')],
            # 'arduino_uno': [('SDA-->A4, SCL-->A5')],
        }
    },
    3: {'protocol': 'Explicit declaration',
        'pin_connection_from_hw_to_arduino': {
            'arduino': [('DATA-->any digital or analog pins')],
            # 'arduino_uno': [('DATA-->any digital or analog pins')],
        }
    }
}