Skip to content

Commit c658637

Browse files
committed
use spot workers by default
1 parent 54f5cc7 commit c658637

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

tools/emr/submit_datagen_job.py

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
defaults = {
2222
'bucket': 'ldbc-snb-datagen-store',
23-
'use_spot': False,
23+
'use_spot': True,
2424
'master_instance_type': 'm5d.2xlarge',
2525
'instance_type': 'i3.4xlarge',
2626
'sf_ratio': 100.0, # ratio of SFs and machines. a ratio of 50.0 for SF100 yields 2 machines
@@ -214,10 +214,16 @@ def submit_datagen_job(name,
214214
help='scale factor (used to calculate cluster size)')
215215
parser.add_argument('format', type=str, help='the required output format')
216216
parser.add_argument('mode', type=str, help='output mode')
217-
parser.add_argument('--use-spot',
218-
default=defaults['use_spot'],
219-
action='store_true',
220-
help='Use SPOT workers')
217+
market_args = parser.add_mutually_exclusive_group()
218+
market_args.add_argument('--use-spot',
219+
default=defaults['use_spot'],
220+
action='store_true',
221+
help='Use SPOT workers')
222+
market_args.add_argument('--no-use-spot',
223+
default=not defaults['use_spot'],
224+
dest='use_spot',
225+
action='store_false',
226+
help='Do not use SPOT workers')
221227
parser.add_argument('--az',
222228
default=defaults['az'],
223229
help=f'Cluster availability zone. Default: {defaults["az"]}')

0 commit comments

Comments
 (0)