Download impl/src/run_pipeline.py from pramodkachare/Cyber: direct link, hf CLI and curl.
- Browser
- Download file 1.43 kB
-
https://huggingface.co/datasets/pramodkachare/Cyber/resolve/main/impl/src/run_pipeline.py
- Command line
-
hf download hf://datasets/pramodkachare/Cyber/impl/src/run_pipeline.py
-
curl -L -o run_pipeline.py https://huggingface.co/datasets/pramodkachare/Cyber/resolve/main/impl/src/run_pipeline.py
1.43 kB
| """Run pipeline steps in order. Usage: python src/run_pipeline.py [--steps 01 02 ...] [--force] | |
| Each step module is idempotent and writes to artifacts/stepNN/. Steps are registered in STEPS below. | |
| """ | |
| import argparse, importlib, sys, os | |
| sys.path.insert(0, os.path.dirname(os.path.abspath(__file__))) | |
| STEPS = { | |
| "01": "pipeline.step01_csv_to_parquet", | |
| "02": "pipeline.step02_inventory", | |
| "03": "pipeline.step03_source_attribution", | |
| "04": "pipeline.step04_class_by_source", | |
| "05": "pipeline.step05_duplicates", | |
| "06": "pipeline.step06_source_probe", | |
| "07a": "pipeline.step07a_taxonomy_attack", | |
| "07": "pipeline.step07_splits", | |
| "08": "pipeline.step08_baselines", | |
| "08b": "pipeline.step08b_order_noise", | |
| "09": "pipeline.step09_imbalance", | |
| "10": "pipeline.step10_learning_curve", | |
| "11": "pipeline.step11_hierarchy", | |
| "12": "pipeline.step12_report", | |
| # 02 inventory, 03 source attribution, 04 class x source, 05 duplicates, 06 source probe, | |
| # 07 split protocols, 08 baselines, 09 imbalance, 10 learning curve, 11 hierarchy: added as implemented | |
| } | |
| if __name__ == "__main__": | |
| ap = argparse.ArgumentParser(); ap.add_argument("--steps", nargs="*", default=list(STEPS)); ap.add_argument("--force", action="store_true") | |
| a = ap.parse_args() | |
| for s in a.steps: | |
| print(f"===== STEP {s} =====", flush=True) | |
| importlib.import_module(STEPS[s]).run(force=a.force) | |