import os

import numpy as np

computing_resumes = np.loadtxt("outputs_Resnet_cifar10_2.csv", delimiter=',', skiprows=0)[:, 0]
# print(computing_resume)
num_to_forgets = [1800]  # 900, 1800, 900(15%)
resume_dir = "/storage/4T_add/grok-adversarial/models/Resnet-CIFAR10_3407/"
model_choose = 'resnet'
seed = 3
for num_to_forget in num_to_forgets:
    for computing_resume in computing_resumes:  # computing_resumes
        # nabla
        os.system(
            "python nabla_unlearning_main.py --split forget --dataset cifar10 --model " + model_choose + " --dataroot=data/cifar10/ --filters 1.0 "
                                                                                                         "--lr 0.001 --resume " + resume_dir + " --resume_step " + str(
                int(computing_resume)) + " --disable-bn "
                                         "--weight-decay 0.1 --batch-size 256 --epochs 25 --forget_class 0,1 --num-to-forget " + str(
                num_to_forget) + " --seed " + str(seed))
        # --lr 0.001
        # # fisher
        # os.system(
        #     'python main_forget_sparse.py --split forget --dataset cifar10 --model ' + model_choose + ' --dataroot=data/cifar10/ --filters 1.0 '
        #                                                                                               '--lr 0.0005 --resume ' + resume_dir + ' --resume_step ' + str(
        #         int(computing_resume)) + ' '
        #                                  '--disable-bn --weight-decay 0.1 --batch-size 256 --epochs 1 --forget_class 0,1 '
        #                                  '--num-to-forget ' + str(num_to_forget) + ' --seed  ' + str(
        #         seed) + ' --unlearn fisher')
        # # --lr 0.0001
        ## FT
        # os.system(
        #     "python main_forget_sparse.py --split forget --dataset cifar10 --model " + model_choose + " --dataroot=data/cifar10/ --filters 1.0 "
        #                                                                                               "--lr 0.0005 --resume " + resume_dir + " --resume_step " + str(
        #         int(computing_resume)) + " --disable-bn "
        #                                  "--weight-decay 0.1 --batch-size 256 --epochs 25 --forget_class 0,1 --num-to-forget " + str(
        #         num_to_forget) + " --seed " + str(seed) + "  --unlearn FT")
        # --lr 0.001
        ## GA
        # os.system(
        #     "python main_forget_sparse.py --split forget --dataset cifar10 --model " + model_choose + " --dataroot=data/cifar10/ --filters 1.0 "
        #                                                                                               "--lr 0.001 --resume " + resume_dir + " --resume_step " + str(
        #         int(computing_resume)) + " --disable-bn "
        #                                  "--weight-decay 0.1 --batch-size 256 --epochs 25 --forget_class 0,1 --num-to-forget " + str(
        #         num_to_forget) + " --seed " + str(seed) + " --unlearn GA")
        # --lr 0.0001
        # # scrub
        # os.system(
        #     "python main.py --split forget --dataset cifar10 --model " + model_choose + " --dataroot=data/cifar10/ --filters 1.0 "
        #                                                                                 "--lr 0.001 --resume " + resume_dir + " --resume_step " + str(
        #         int(computing_resume)) + " --disable-bn "
        #                                  "--weight-decay 0.1 --batch-size 128 --epochs 20 --forget_class 0,1 --num-to-forget " + str(
        #         num_to_forget) + " --seed " + str(seed))
        # # --lr 0.001