import sys
import os
# append the path of the parent directory
sys.path.append("..")

from run import run
from parser import parser

# Parse arguments
args = parser.parse_args()

if args.spl:
    sys.path.append(os.path.join(sys.path[0], '..' , 'SPL', 'grids'))
    sys.path.append(os.path.join(sys.path[0], '..' ,'SPL','grids', 'pypsdd'))

if not(args.pre_beta is None):
    args.beta = args.pre_beta/10 - 1

if args.load_checkpoint:
    if args.load_run_ID.isdigit():
        ids = ["4psi0o1z", "cgvk7mwt", "jlwalqgu", "j1h0ly79", "m85wzg49", "mq95vvlr", "acz9dtgy", "nm2gc94n", "z36zboiu", "6l1967he", "jvs2ddel", "wilshn5t"]
        args.load_run_ID = ids[int(args.load_run_ID)]

run(args)