|
@@ -3,6 +3,7 @@ import argparse
|
|
|
import sys
|
|
|
import os
|
|
|
|
|
|
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
|
|
sys.path.append("../")
|
|
|
from scripts.logger.lemon_logger import Logger
|
|
|
import warnings
|
|
@@ -18,6 +19,7 @@ os.environ["CUDA_DEVICE_ORDER"] = "PCI_BUS_ID"
|
|
|
os.environ["CUDA_VISIBLE_DEVICES"] = ""
|
|
|
"""Setting random seed"""
|
|
|
|
|
|
+
|
|
|
def lemon_process(exp, root_dir, output_dir, mutate_num, config_name):
|
|
|
lemon_cfg = configparser.ConfigParser()
|
|
|
cfg_path = os.path.join(root_dir, "config", config_name)
|
|
@@ -48,7 +50,9 @@ def lemon_process(exp, root_dir, output_dir, mutate_num, config_name):
|
|
|
for exp_identifier in flags.exps:
|
|
|
|
|
|
"""Make directory"""
|
|
|
- experiment_dir = os.path.join(flags.output_dir, exp_identifier) # exp : like lenet5-mnist
|
|
|
+ experiment_dir = os.path.join(
|
|
|
+ flags.output_dir, exp_identifier
|
|
|
+ ) # exp : like lenet5-mnist
|
|
|
mut_dir = os.path.join(experiment_dir, "mut_model")
|
|
|
crash_dir = os.path.join(experiment_dir, "crash")
|
|
|
nan_dir = os.path.join(experiment_dir, "nan")
|
|
@@ -107,6 +111,7 @@ def lemon_process(exp, root_dir, output_dir, mutate_num, config_name):
|
|
|
"INFO:Lemon is done: Time used: {} hour,{} min,{} sec".format(h, m, s)
|
|
|
)
|
|
|
|
|
|
+
|
|
|
if __name__ == "__main__":
|
|
|
|
|
|
# config_name = sys.argv[1]
|