File tree Expand file tree Collapse file tree 3 files changed +10
-7
lines changed Expand file tree Collapse file tree 3 files changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -38,7 +38,10 @@ def init_zoo(args):
38
38
raise RuntimeError (
39
39
"The cluster spec {} doesn't exist" .format (cluster_spec_path )
40
40
)
41
- shutil .copy2 (cluster_spec_path , os .getcwd ())
41
+ try :
42
+ shutil .copy2 (cluster_spec_path , os .getcwd ())
43
+ except shutil .SameFileError :
44
+ pass
42
45
cluster_spec_name = os .path .basename (cluster_spec_path )
43
46
44
47
# Create the docker file
Original file line number Diff line number Diff line change 16
16
from elasticdl_client .common .constants import DistributionStrategy
17
17
18
18
19
- def add_zoo_init_arguments (parser ):
19
+ def add_zoo_init_params (parser ):
20
20
parser .add_argument (
21
21
"--base_image" ,
22
22
type = str ,
@@ -38,7 +38,7 @@ def add_zoo_init_arguments(parser):
38
38
)
39
39
40
40
41
- def add_zoo_build_arguments (parser ):
41
+ def add_zoo_build_params (parser ):
42
42
parser .add_argument (
43
43
"path" , type = str , help = "The path where the build context locates."
44
44
)
@@ -51,7 +51,7 @@ def add_zoo_build_arguments(parser):
51
51
)
52
52
53
53
54
- def add_zoo_push_arguments (parser ):
54
+ def add_zoo_push_params (parser ):
55
55
parser .add_argument (
56
56
"image" ,
57
57
type = str ,
Original file line number Diff line number Diff line change @@ -43,14 +43,14 @@ def build_argument_parser():
43
43
"init" , help = "Initialize the model zoo."
44
44
)
45
45
zoo_init_parser .set_defaults (func = init_zoo )
46
- args .add_zoo_init_arguments (zoo_init_parser )
46
+ args .add_zoo_init_params (zoo_init_parser )
47
47
48
48
# elasticdl zoo build
49
49
zoo_build_parser = zoo_subparsers .add_parser (
50
50
"build" , help = "Build a docker image for the model zoo."
51
51
)
52
52
zoo_build_parser .set_defaults (func = build_zoo )
53
- args .add_zoo_build_arguments (zoo_build_parser )
53
+ args .add_zoo_build_params (zoo_build_parser )
54
54
55
55
# elasticdl zoo push
56
56
zoo_push_parser = zoo_subparsers .add_parser (
@@ -59,7 +59,7 @@ def build_argument_parser():
59
59
"ElasticDL job." ,
60
60
)
61
61
zoo_push_parser .set_defaults (func = push_zoo )
62
- args .add_zoo_push_arguments (zoo_push_parser )
62
+ args .add_zoo_push_params (zoo_push_parser )
63
63
64
64
# elasticdl train
65
65
train_parser = subparsers .add_parser (
You can’t perform that action at this time.
0 commit comments