From b0199ef5f97d47cfc6a8532e19a7176b932fbf74 Mon Sep 17 00:00:00 2001 From: Leo Xiao Date: Thu, 11 Apr 2019 10:48:46 +0800 Subject: [PATCH] delete useless code --- tools/test.py | 28 ---------------------------- 1 file changed, 28 deletions(-) diff --git a/tools/test.py b/tools/test.py index b32ee746..cfa333f5 100755 --- a/tools/test.py +++ b/tools/test.py @@ -45,7 +45,6 @@ def parse_args(): default=None, nargs=argparse.REMAINDER) - # philly parser.add_argument('--modelDir', help='model directory', type=str, @@ -67,37 +66,10 @@ def parse_args(): return args -def copy_prev_models(prev_models_dir, model_dir): - import shutil - - vc_folder = '/hdfs/' \ - + '/' + os.environ['PHILLY_VC'] - source = prev_models_dir - # If path is set as "sys/jobs/application_1533861538020_2366/models" prefix with the location of vc folder - source = vc_folder + '/' + source if not source.startswith(vc_folder) \ - else source - destination = model_dir - - if os.path.exists(source) and os.path.exists(destination): - for file in os.listdir(source): - source_file = os.path.join(source, file) - destination_file = os.path.join(destination, file) - if not os.path.exists(destination_file): - print("=> copying {0} to {1}".format( - source_file, destination_file)) - shutil.copytree(source_file, destination_file) - else: - print('=> {} or {} does not exist'.format(source, destination)) - - def main(): args = parse_args() update_config(cfg, args) - if args.prevModelDir and args.modelDir: - # copy pre models for philly - copy_prev_models(args.prevModelDir, args.modelDir) - logger, final_output_dir, tb_log_dir = create_logger( cfg, args.cfg, 'valid')