File size: 766 Bytes
3ff674d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
import sys
import os

project_root = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..'))
sys.path.append(project_root)
print(project_root)

import argparse

import yaml

from dataset_processor import DatasetProcessor

def main():
    parser = argparse.ArgumentParser()
    parser.add_argument(
        '--config', type=str, help='Chemin vers le fichier YAML de configuration.', required=True
    )

    args = parser.parse_args()
    with open(args.config, 'r') as file:
        config = yaml.safe_load(file)

    dataset_processor = DatasetProcessor(
        dataset_path=config.get('dataset_path'),
        saved_processed_dataset_path=config.get('saved_processed_dataset_path'))
    dataset_processor.run()

if __name__ == '__main__':
    main()