@@ -45,7 +45,6 @@ def parse_args():
45
45
default = None ,
46
46
nargs = argparse .REMAINDER )
47
47
48
- # philly
49
48
parser .add_argument ('--modelDir' ,
50
49
help = 'model directory' ,
51
50
type = str ,
@@ -67,37 +66,10 @@ def parse_args():
67
66
return args
68
67
69
68
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
-
93
69
def main ():
94
70
args = parse_args ()
95
71
update_config (cfg , args )
96
72
97
- if args .prevModelDir and args .modelDir :
98
- # copy pre models for philly
99
- copy_prev_models (args .prevModelDir , args .modelDir )
100
-
101
73
logger , final_output_dir , tb_log_dir = create_logger (
102
74
cfg , args .cfg , 'valid' )
103
75
0 commit comments