Skip to content

Commit b0199ef

Browse files
authored
delete useless code
1 parent e4a5f37 commit b0199ef

File tree

1 file changed

+0
-28
lines changed

1 file changed

+0
-28
lines changed

tools/test.py

-28
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ def parse_args():
4545
default=None,
4646
nargs=argparse.REMAINDER)
4747

48-
# philly
4948
parser.add_argument('--modelDir',
5049
help='model directory',
5150
type=str,
@@ -67,37 +66,10 @@ def parse_args():
6766
return args
6867

6968

70-
def copy_prev_models(prev_models_dir, model_dir):
71-
import shutil
72-
73-
vc_folder = '/hdfs/' \
74-
+ '/' + os.environ['PHILLY_VC']
75-
source = prev_models_dir
76-
# If path is set as "sys/jobs/application_1533861538020_2366/models" prefix with the location of vc folder
77-
source = vc_folder + '/' + source if not source.startswith(vc_folder) \
78-
else source
79-
destination = model_dir
80-
81-
if os.path.exists(source) and os.path.exists(destination):
82-
for file in os.listdir(source):
83-
source_file = os.path.join(source, file)
84-
destination_file = os.path.join(destination, file)
85-
if not os.path.exists(destination_file):
86-
print("=> copying {0} to {1}".format(
87-
source_file, destination_file))
88-
shutil.copytree(source_file, destination_file)
89-
else:
90-
print('=> {} or {} does not exist'.format(source, destination))
91-
92-
9369
def main():
9470
args = parse_args()
9571
update_config(cfg, args)
9672

97-
if args.prevModelDir and args.modelDir:
98-
# copy pre models for philly
99-
copy_prev_models(args.prevModelDir, args.modelDir)
100-
10173
logger, final_output_dir, tb_log_dir = create_logger(
10274
cfg, args.cfg, 'valid')
10375

0 commit comments

Comments
 (0)