Commit a5ff7c77 authored by Blais, Chris's avatar Blais, Chris
Browse files

updating script to use sbatch, run 1000 layouts

parent 4fdd444f
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
#!/bin/bash
# Interpreter declaration

. run_soar_comparison_1.sh
. run_soar_comparison_2.sh
. run_soar_comparison_3.sh
. run_soar_comparison_4.sh
. run_soar_comparison_5.sh
. run_soar_comparison_6.sh
 No newline at end of file
sbatch run_soar_comparison_1.sh
sbatch run_soar_comparison_2.sh
sbatch run_soar_comparison_3.sh
sbatch run_soar_comparison_4.sh
sbatch run_soar_comparison_5.sh
sbatch run_soar_comparison_6.sh
 No newline at end of file
+11 −3
Original line number Diff line number Diff line
@@ -8,6 +8,7 @@ import yaml
import numpy as np
import time
import argparse
import datetime

module_path = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
if module_path not in sys.path:
@@ -34,6 +35,7 @@ def test_compare_methods(
        ptype=None, 
        reddeficit=False,
        test_layouts = "sampling",
        overwrite=False,
        verbose=1,
    ):
    """
@@ -111,7 +113,7 @@ def test_compare_methods(
                else:
                    raise Exception("Pareto front doesn't exist, please run 'generate_pareto_front.py'")
            case "sampling":
                nTestLayouts = 50
                nTestLayouts = 1000
                random.seed(42)
                results = random.choices(range(0, maxSensWord), k=nTestLayouts)
            
@@ -303,8 +305,14 @@ def test_compare_methods(

    print(f"RREF agree SOAR, LU or qr disagree in {nsuccess_rref} layouts out of {len(results)}")
    results_log_path = os.path.join(results_folder, f"{system}_{objective}_{reddeficit_str}_{str(ptype)}.pkl")

    if overwrite:
        results_log_path = os.path.join(results_folder, f"{system}_{objective}_{reddeficit_str}_{str(ptype)}.pkl")
        with open(results_log_path, "wb") as f:
            pickle.dump(results_log, f)
    else: 
        curr_date = datetime.datetime.today().strftime('%Y_%m_%d_%H_%M_%S')
        results_log_path = os.path.join(results_folder, f"{system}_{objective}_{reddeficit_str}_{str(ptype)}_{curr_date}.pkl")


if __name__ == "__main__":