Spaces:
Running
Running
| """Pipeline entry script for Dialectica. | |
| Use this file to run each project stage from the command line. | |
| """ | |
| import argparse | |
| import subprocess | |
| import sys | |
| def run_data_generation(): | |
| """Phase 1: generate Bloom-labeled questions.""" | |
| subprocess.run([sys.executable, "scripts/make_dataset.py"], check=True) | |
| def run_feature_build(): | |
| """Phase 2: dedup and split data (placeholder).""" | |
| subprocess.run([sys.executable, "scripts/build_features.py"], check=True) | |
| def run_training(): | |
| """Phase 4: train models (placeholder).""" | |
| subprocess.run([sys.executable, "scripts/model.py"], check=True) | |
| def main(): | |
| """Parse stage arg and run selected steps.""" | |
| parser = argparse.ArgumentParser(description="Dialectica pipeline runner") | |
| parser.add_argument( | |
| "stage", | |
| choices=["data", "features", "train", "all"], | |
| help="which pipeline stage to run", | |
| ) | |
| args = parser.parse_args() | |
| if args.stage in ("data", "all"): | |
| run_data_generation() | |
| if args.stage in ("features", "all"): | |
| run_feature_build() | |
| if args.stage in ("train", "all"): | |
| run_training() | |
| if __name__ == "__main__": | |
| main() | |