@@ -373,6 +373,50 @@ def test_project_upload_dataset(self):
373
373
"params" : {},
374
374
"assertions" : {"save_annotation" : {"count" : 1 }},
375
375
},
376
+ {
377
+ "name" : "with_predictions_flag_true" ,
378
+ "dataset" : [
379
+ {"file" : "pred1.jpg" , "split" : "train" , "annotationfile" : {"file" : "pred1.xml" }},
380
+ {"file" : "pred2.jpg" , "split" : "valid" , "annotationfile" : {"file" : "pred2.xml" }},
381
+ ],
382
+ "params" : {"is_prediction" : True },
383
+ "assertions" : {
384
+ "upload" : {"count" : 2 , "kwargs" : {"is_prediction" : True }},
385
+ "save_annotation" : {"count" : 2 },
386
+ },
387
+ },
388
+ {
389
+ "name" : "with_predictions_flag_false" ,
390
+ "dataset" : [
391
+ {"file" : "gt1.jpg" , "split" : "train" , "annotationfile" : {"file" : "gt1.xml" }},
392
+ ],
393
+ "params" : {"is_prediction" : False },
394
+ "assertions" : {
395
+ "upload" : {"count" : 1 , "kwargs" : {"is_prediction" : False }},
396
+ "save_annotation" : {"count" : 1 },
397
+ },
398
+ },
399
+ {
400
+ "name" : "predictions_with_batch" ,
401
+ "dataset" : [
402
+ {"file" : "batch_pred.jpg" , "split" : "train" , "annotationfile" : {"file" : "batch_pred.xml" }},
403
+ ],
404
+ "params" : {
405
+ "is_prediction" : True ,
406
+ "batch_name" : "prediction-batch" ,
407
+ "num_retries" : 2 ,
408
+ },
409
+ "assertions" : {
410
+ "upload" : {
411
+ "count" : 1 ,
412
+ "kwargs" : {
413
+ "is_prediction" : True ,
414
+ "batch_name" : "prediction-batch" ,
415
+ "num_retry_uploads" : 2 ,
416
+ },
417
+ },
418
+ },
419
+ },
376
420
]
377
421
378
422
error_cases = [
0 commit comments