Skip to content

Commit e4a5f37

Browse files
authored
delete useless code
1 parent ce833a6 commit e4a5f37

File tree

1 file changed

+0
-27
lines changed

1 file changed

+0
-27
lines changed

tools/train.py

-27
Original file line numberDiff line numberDiff line change
@@ -73,37 +73,10 @@ def parse_args():
7373
return args
7474

7575

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

103-
if args.prevModelDir and args.modelDir:
104-
# copy pre models for philly
105-
copy_prev_models(args.prevModelDir, args.modelDir)
106-
10780
logger, final_output_dir, tb_log_dir = create_logger(
10881
cfg, args.cfg, 'train')
10982

0 commit comments

Comments
 (0)