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

FIXUP: overwrite default off, fix output results write

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

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
. 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
+7 −3
Original line number Diff line number Diff line
@@ -308,12 +308,15 @@ def test_compare_methods(

    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")
    
    print(f"saving results to file: {results_log_path}")

    with open(results_log_path, "wb") as f:
        pickle.dump(results_log, f)


if __name__ == "__main__":

@@ -344,7 +347,7 @@ if __name__ == "__main__":
    )

    parser.add_argument(
        '--overwrite', action='store_true', help='overwrite existing pickle file'
        '--overwrite', action='store_false', help='overwrite existing pickle file'
        )
    # run_soar_comparison.py --sysname="pilot" 
    # 3. Parse the arguments from the command line
@@ -358,6 +361,7 @@ if __name__ == "__main__":
        ptype=args.problemtype, 
        reddeficit=args.reddeficit,
        test_layouts=args.layoutsampling,
        overwrite=args.overwrite,
        verbose=0,
    )

+1 −1
Original line number Diff line number Diff line
@@ -18,4 +18,4 @@
source ~/.bashrc
conda activate wwtp
cd /home/tjf/01_nawi/soar_integration/testing/
python run_soar_comparison.py --sysname="pilot" --objective="nonlinear" --problemtype=1 --layoutsampling="sampling" --reddeficit --overwrite
python run_soar_comparison.py --sysname="pilot" --objective="nonlinear" --problemtype=1 --layoutsampling="sampling" --reddeficit
+1 −1
Original line number Diff line number Diff line
@@ -18,4 +18,4 @@
source ~/.bashrc
conda activate wwtp
cd /home/tjf/01_nawi/soar_integration/testing/
python run_soar_comparison.py --sysname="pilot" --objective="nonlinear" --problemtype=2 --layoutsampling="sampling" --reddeficit --overwrite
python run_soar_comparison.py --sysname="pilot" --objective="nonlinear" --problemtype=2 --layoutsampling="sampling" --reddeficit
 No newline at end of file
+1 −1
Original line number Diff line number Diff line
@@ -18,4 +18,4 @@
source ~/.bashrc
conda activate wwtp
cd /home/tjf/01_nawi/soar_integration/testing/
python run_soar_comparison.py --sysname="pilot" --objective="nonlinear" --problemtype=3 --layoutsampling="sampling" --reddeficit --overwrite
python run_soar_comparison.py --sysname="pilot" --objective="nonlinear" --problemtype=3 --layoutsampling="sampling" --reddeficit 
Loading