@@ -140,7 +140,8 @@ def launch_job(job_spec):
140
140
"""Launch job on ML Engine."""
141
141
project_id = 'projects/{}' .format (cloud .default_project ())
142
142
credentials = GoogleCredentials .get_application_default ()
143
- cloudml = discovery .build ('ml' , 'v1' , credentials = credentials )
143
+ cloudml = discovery .build (
144
+ 'ml' , 'v1' , credentials = credentials , cache_discovery = False )
144
145
request = cloudml .projects ().jobs ().create (body = job_spec , parent = project_id )
145
146
request .execute ()
146
147
@@ -275,13 +276,13 @@ def validate_flags():
275
276
assert FLAGS .cloud_mlengine_master_type == 'standard_tpu'
276
277
elif FLAGS .worker_gpu :
277
278
if FLAGS .worker_gpu == 1 :
278
- assert FLAGS .cloud_ml_engine_master_type in ['standard_gpu' ,
279
- 'standard_p100' ]
279
+ assert FLAGS .cloud_mlengine_master_type in ['standard_gpu' ,
280
+ 'standard_p100' ]
280
281
elif FLAGS .worker_gpu == 4 :
281
- assert FLAGS .cloud_ml_engine_master_type in ['complex_model_m_gpu' ,
282
- 'complex_model_m_p100' ]
282
+ assert FLAGS .cloud_mlengine_master_type in ['complex_model_m_gpu' ,
283
+ 'complex_model_m_p100' ]
283
284
else :
284
- assert FLAGS .cloud_ml_engine_master_type == 'complex_model_l_gpu'
285
+ assert FLAGS .cloud_mlengine_master_type == 'complex_model_l_gpu'
285
286
else :
286
287
assert FLAGS .cloud_mlengine_master_type in ['standard' , 'large_model' ,
287
288
'complex_model_s' ,
0 commit comments