@@ -337,7 +337,6 @@ async def test_use_concatenate_iterator_output(client_mode):
337
337
"items" : {"type" : "string" },
338
338
"x-cog-array-type" : "iterator" ,
339
339
"x-cog-array-display" : "concatenate" ,
340
- "title" : "Output" ,
341
340
}
342
341
}
343
342
}
@@ -348,7 +347,7 @@ async def test_use_concatenate_iterator_output(client_mode):
348
347
)
349
348
mock_prediction_endpoints (
350
349
predictions = [
351
- create_mock_prediction ({ "status" : "processing" , "output" : None } ),
350
+ create_mock_prediction (),
352
351
create_mock_prediction (
353
352
{"status" : "succeeded" , "output" : ["Hello" , " " , "world" , "!" ]}
354
353
),
@@ -424,7 +423,6 @@ async def test_use_list_of_strings_output(client_mode):
424
423
"Output" : {
425
424
"type" : "array" ,
426
425
"items" : {"type" : "string" },
427
- "title" : "Output" ,
428
426
}
429
427
}
430
428
}
@@ -435,7 +433,7 @@ async def test_use_list_of_strings_output(client_mode):
435
433
)
436
434
mock_prediction_endpoints (
437
435
predictions = [
438
- create_mock_prediction ({ "status" : "processing" , "output" : None } ),
436
+ create_mock_prediction (),
439
437
create_mock_prediction (
440
438
{"status" : "succeeded" , "output" : ["hello" , "world" , "test" ]}
441
439
),
@@ -467,7 +465,6 @@ async def test_use_iterator_of_strings_output(client_mode):
467
465
"type" : "array" ,
468
466
"items" : {"type" : "string" },
469
467
"x-cog-array-type" : "iterator" ,
470
- "title" : "Output" ,
471
468
}
472
469
}
473
470
}
@@ -478,7 +475,7 @@ async def test_use_iterator_of_strings_output(client_mode):
478
475
)
479
476
mock_prediction_endpoints (
480
477
predictions = [
481
- create_mock_prediction ({ "status" : "processing" , "output" : None } ),
478
+ create_mock_prediction (),
482
479
create_mock_prediction (
483
480
{"status" : "succeeded" , "output" : ["hello" , "world" , "test" ]}
484
481
),
@@ -514,7 +511,6 @@ async def test_use_path_output(client_mode):
514
511
"Output" : {
515
512
"type" : "string" ,
516
513
"format" : "uri" ,
517
- "title" : "Output" ,
518
514
}
519
515
}
520
516
}
@@ -525,7 +521,7 @@ async def test_use_path_output(client_mode):
525
521
)
526
522
mock_prediction_endpoints (
527
523
predictions = [
528
- create_mock_prediction ({ "status" : "processing" , "output" : None } ),
524
+ create_mock_prediction (),
529
525
create_mock_prediction (
530
526
{"status" : "succeeded" , "output" : "https://example.com/output.jpg" }
531
527
),
@@ -562,7 +558,6 @@ async def test_use_list_of_paths_output(client_mode):
562
558
"Output" : {
563
559
"type" : "array" ,
564
560
"items" : {"type" : "string" , "format" : "uri" },
565
- "title" : "Output" ,
566
561
}
567
562
}
568
563
}
@@ -573,7 +568,7 @@ async def test_use_list_of_paths_output(client_mode):
573
568
)
574
569
mock_prediction_endpoints (
575
570
predictions = [
576
- create_mock_prediction ({ "status" : "processing" , "output" : None } ),
571
+ create_mock_prediction (),
577
572
create_mock_prediction (
578
573
{
579
574
"status" : "succeeded" ,
@@ -623,7 +618,6 @@ async def test_use_iterator_of_paths_output(client_mode):
623
618
"type" : "array" ,
624
619
"items" : {"type" : "string" , "format" : "uri" },
625
620
"x-cog-array-type" : "iterator" ,
626
- "title" : "Output" ,
627
621
}
628
622
}
629
623
}
@@ -634,7 +628,7 @@ async def test_use_iterator_of_paths_output(client_mode):
634
628
)
635
629
mock_prediction_endpoints (
636
630
predictions = [
637
- create_mock_prediction ({ "status" : "processing" , "output" : None } ),
631
+ create_mock_prediction (),
638
632
create_mock_prediction (
639
633
{
640
634
"status" : "succeeded" ,
@@ -810,17 +804,7 @@ def capture_request(request):
810
804
@respx .mock
811
805
async def test_use_function_logs_method (client_mode ):
812
806
mock_model_endpoints ()
813
- mock_prediction_endpoints (
814
- predictions = [
815
- create_mock_prediction (
816
- {
817
- "status" : "processing" ,
818
- "output" : None ,
819
- "logs" : "Starting prediction..." ,
820
- },
821
- ),
822
- ]
823
- )
807
+ mock_prediction_endpoints (predictions = [create_mock_prediction ()])
824
808
825
809
# Call use and then create method
826
810
hotdog_detector = replicate .use ("acme/hotdog-detector" )
@@ -882,15 +866,13 @@ async def test_use_object_output_with_file_properties(client_mode):
882
866
"Output" : {
883
867
"type" : "object" ,
884
868
"properties" : {
885
- "text" : {"type" : "string" , "title" : "Text" },
869
+ "text" : {"type" : "string" },
886
870
"image" : {
887
871
"type" : "string" ,
888
872
"format" : "uri" ,
889
- "title" : "Image" ,
890
873
},
891
- "count" : {"type" : "integer" , "title" : "Count" },
874
+ "count" : {"type" : "integer" },
892
875
},
893
- "title" : "Output" ,
894
876
}
895
877
}
896
878
}
@@ -901,7 +883,7 @@ async def test_use_object_output_with_file_properties(client_mode):
901
883
)
902
884
mock_prediction_endpoints (
903
885
predictions = [
904
- create_mock_prediction ({ "status" : "processing" , "output" : None } ),
886
+ create_mock_prediction (),
905
887
create_mock_prediction (
906
888
{
907
889
"status" : "succeeded" ,
@@ -948,17 +930,15 @@ async def test_use_object_output_with_file_list_property(client_mode):
948
930
"Output" : {
949
931
"type" : "object" ,
950
932
"properties" : {
951
- "text" : {"type" : "string" , "title" : "Text" },
933
+ "text" : {"type" : "string" },
952
934
"images" : {
953
935
"type" : "array" ,
954
936
"items" : {
955
937
"type" : "string" ,
956
938
"format" : "uri" ,
957
939
},
958
- "title" : "Images" ,
959
940
},
960
941
},
961
- "title" : "Output" ,
962
942
}
963
943
}
964
944
}
@@ -969,7 +949,7 @@ async def test_use_object_output_with_file_list_property(client_mode):
969
949
)
970
950
mock_prediction_endpoints (
971
951
predictions = [
972
- create_mock_prediction ({ "status" : "processing" , "output" : None } ),
952
+ create_mock_prediction (),
973
953
create_mock_prediction (
974
954
{
975
955
"status" : "succeeded" ,
0 commit comments