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