File size: 1,256 Bytes
e057d08
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
"""
Baseline Models Batch Runner
==============================

Run all baseline models (XGBoost, CatBoost, LightGBM) on all or specific datasets.

Usage:
    # Run on ALL datasets
    py -3.12 -m runners.run_baselines

    # Run on specific datasets
    py -3.12 -m runners.run_baselines --dataset analcatdata_authorship diabetes

Author: UW MSIM Team
Date: April 2026
"""

import argparse
import sys
from pathlib import Path

# Add parent directory to path
sys.path.insert(0, str(Path(__file__).parent.parent))

from runners.run_batch import main as run_batch_main


BASELINE_MODELS = ['xgboost', 'catboost', 'lightgbm']


def main():
    """Run all baseline models on all or specific datasets."""
    parser = argparse.ArgumentParser(description='Run baseline models')
    parser.add_argument('--dataset', nargs='*', default=None,
                        help='Specific dataset(s) to run (e.g., --dataset analcatdata_authorship diabetes)')

    args = parser.parse_args()

    # Build sys.argv for run_batch
    batch_args = ['run_baselines', '--model-filter', *BASELINE_MODELS]

    if args.dataset:
        batch_args.extend(['--dataset-filter', *args.dataset])

    sys.argv = batch_args
    run_batch_main()


if __name__ == '__main__':
    main()