|
82 | 82 | from ray.tune.search.basic_variant import BasicVariantGenerator |
83 | 83 | from ray.tune.search.hyperopt import HyperOptSearch |
84 | 84 | from ray.tune.search.optuna import OptunaSearch |
85 | | -from ray.tune.utils.file_transfer import sync_dir_between_nodes |
86 | 85 | from ray.util.queue import Queue |
87 | 86 |
|
88 | 87 | from ax.service.ax_client import AxClient |
|
108 | 107 | ) |
109 | 108 | # URL to ORFS GitHub repository |
110 | 109 | ORFS_URL = "https://github.com/The-OpenROAD-Project/OpenROAD-flow-scripts" |
111 | | -MAX_SIZE_BYTES = 5_368_709_120 # 5 GiB, or 5*1024*1024*1024 B |
112 | 110 |
|
113 | 111 |
|
114 | 112 | class AutoTunerBase(tune.Trainable): |
@@ -659,31 +657,6 @@ def sweep(): |
659 | 657 | print("[INFO TUN-0010] Sweep complete.") |
660 | 658 |
|
661 | 659 |
|
662 | | -def transfer_to_head(file_path): |
663 | | - """ |
664 | | - Transfer files from worker to the head node. |
665 | | - """ |
666 | | - workers = ray.nodes() |
667 | | - # TODO: Can this for loop be done async? |
668 | | - for worker_id, worker in enumerate(workers): |
669 | | - # Path: <repo>/<experiment>/<worker_id> |
670 | | - target_path = f"{LOCAL_DIR}/{args.experiment}/{worker_id}" |
671 | | - os.makedirs(target_path, exist_ok=True) |
672 | | - worker_ip = worker["NodeManagerAddress"] |
673 | | - try: |
674 | | - sync_dir_between_nodes( |
675 | | - source_ip=worker_ip, |
676 | | - source_path=file_path, |
677 | | - target_ip=args.server, |
678 | | - target_path=target_path, |
679 | | - max_size_bytes=MAX_SIZE_BYTES, |
680 | | - ) |
681 | | - except Exception as e: |
682 | | - # TODO: maybe a retry mechanism if fails? |
683 | | - print(f"[INFO TUN-0012] Error syncing worker {worker_id}: {e}") |
684 | | - continue |
685 | | - |
686 | | - |
687 | 660 | def main(): |
688 | 661 | global args, SDC_ORIGINAL, FR_ORIGINAL, LOCAL_DIR, INSTALL_PATH, ORFS_FLOW_DIR, config_dict, reference, best_params |
689 | 662 | args = parse_arguments() |
@@ -739,11 +712,6 @@ def main(): |
739 | 712 |
|
740 | 713 | task_id = save_best.remote(analysis) |
741 | 714 | _ = ray.get(task_id) |
742 | | - |
743 | | - # if not args.server: |
744 | | - # print("[INFO TUN-0011] No Ray server specified. Skipping transfer.") |
745 | | - # sys.exit(0) |
746 | | - # transfer_to_head(LOCAL_DIR) |
747 | 715 | print(f"[INFO TUN-0002] Best parameters found: {analysis.best_config}") |
748 | 716 |
|
749 | 717 | # if all runs have failed |
|
0 commit comments