File tree 1 file changed +6
-6
lines changed
google/cloud/aiplatform/preview/vertex_ray
1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -250,14 +250,14 @@ def _write_single_block(
250
250
client = bigquery .Client (project = project_id , client_info = bq_info )
251
251
dataset_id = dataset .split ("." , 1 )[0 ]
252
252
try :
253
- client .create_dataset (f"{ project_id } .{ dataset_id } " , timeout = 30 )
254
- print ("[Ray on Vertex AI]: Created dataset" , dataset_id )
255
- except exceptions .Conflict :
253
+ client .get_dataset (dataset_id )
256
254
print (
257
- "[Ray on Vertex AI]: Dataset" ,
258
- dataset_id ,
259
- "already exists. The table will be overwritten if it already exists." ,
255
+ f"[Ray on Vertex AI]: Dataset { dataset_id } already exists."
256
+ + "The table will be overwritten if it already exists."
260
257
)
258
+ except exceptions .NotFound :
259
+ client .create_dataset (f"{ project_id } .{ dataset_id } " , timeout = 30 )
260
+ print (f"[Ray on Vertex AI]: Created dataset { dataset_id } " )
261
261
262
262
# Delete table if it already exists
263
263
client .delete_table (f"{ project_id } .{ dataset } " , not_found_ok = True )
You can’t perform that action at this time.
0 commit comments