| import subprocess |
| import sys |
|
|
| |
| BASE_CMD = [ |
| sys.executable, |
| "batch_agent_orchestrator.py", |
| "--input-dir", r"C:\Users\admin_mtds\OneDrive\Desktop\ChinKuan\TestingImage\03_xray_solder", |
| "--output-dir", r"C:\Users\admin_mtds\OneDrive\Desktop\ChinKuan\ArtiAgent - DefectFill\agent_output\03_xray_solder", |
| "--checkpoint-dir", r"C:\Users\admin_mtds\OneDrive\Desktop\ChinKuan\ArtiAgent - DefectFill\engine\DefectFill\checkpoints", |
| "--product-desc", "X-ray PCB with solder joints and die components", |
| "--max-defects-per-image", "3", |
| "--guidance-scale", "8.0", |
| "--device", "cuda" |
| ] |
|
|
| |
| |
| |
| |
| |
| |
|
|
| TOTAL_LOOPS = 20 |
|
|
| if __name__ == "__main__": |
| for loop_num in range(1, TOTAL_LOOPS + 1): |
| print(f"\n" + "=" * 50) |
| print(f"π STARTING LOOP {loop_num} OF {TOTAL_LOOPS}") |
| print("=" * 50) |
| print(f"\n--> Running command for Loop {loop_num}...") |
| |
| |
| result = subprocess.run(BASE_CMD) |
|
|
| |
| if result.returncode != 0: |
| print(f"β Error encountered on Loop {loop_num}. Execution stopped.") |
| sys.exit(result.returncode) |
|
|
| print(f"\nπ Success! Completed all {TOTAL_LOOPS} loops.") |