@@ -476,20 +476,16 @@ async def get_evaluation_submissions(
476476 client = Synapse .get_client (synapse_client = synapse_client )
477477
478478 uri = f"/evaluation/{ evaluation_id } /submission/all"
479- query_params = {}
480479
481480 if status :
482- query_params [ " status" ] = status
481+ uri = uri + "? status=" + status
483482
484- async for item in rest_get_paginated_async (
485- uri = uri , params = query_params , synapse_client = client
486- ):
483+ async for item in rest_get_paginated_async (uri = uri , synapse_client = client ):
487484 yield item
488485
489486
490487async def get_user_submissions (
491488 evaluation_id : str ,
492- user_id : Optional [str ] = None ,
493489 * ,
494490 synapse_client : Optional ["Synapse" ] = None ,
495491) -> AsyncGenerator [dict [str , Any ], None ]:
@@ -501,8 +497,6 @@ async def get_user_submissions(
501497
502498 Arguments:
503499 evaluation_id: The ID of the evaluation queue.
504- user_id: Optionally specify the ID of the user whose submissions will be returned.
505- If omitted, this returns the submissions of the caller.
506500 synapse_client: If not passed in and caching was not disabled by `Synapse.allow_client_caching(False)`
507501 this will use the last created instance from the Synapse class constructor.
508502
@@ -514,20 +508,13 @@ async def get_user_submissions(
514508 client = Synapse .get_client (synapse_client = synapse_client )
515509
516510 uri = f"/evaluation/{ evaluation_id } /submission"
517- query_params = {}
518-
519- if user_id :
520- query_params ["userId" ] = user_id
521511
522- async for item in rest_get_paginated_async (
523- uri = uri , params = query_params , synapse_client = client
524- ):
512+ async for item in rest_get_paginated_async (uri = uri , synapse_client = client ):
525513 yield item
526514
527515
528516async def get_submission_count (
529517 evaluation_id : str ,
530- status : Optional [str ] = None ,
531518 synapse_client : Optional ["Synapse" ] = None ,
532519) -> dict :
533520 """
@@ -537,8 +524,6 @@ async def get_submission_count(
537524
538525 Arguments:
539526 evaluation_id: The ID of the evaluation queue.
540- status: Optionally filter submissions by a submission status, such as SCORED, VALID,
541- INVALID, OPEN, CLOSED or EVALUATION_IN_PROGRESS.
542527 synapse_client: If not passed in and caching was not disabled by `Synapse.allow_client_caching(False)`
543528 this will use the last created instance from the Synapse class constructor.
544529
@@ -550,12 +535,8 @@ async def get_submission_count(
550535 client = Synapse .get_client (synapse_client = synapse_client )
551536
552537 uri = f"/evaluation/{ evaluation_id } /submission/count"
553- query_params = {}
554538
555- if status :
556- query_params ["status" ] = status
557-
558- response = await client .rest_get_async (uri , params = query_params )
539+ response = await client .rest_get_async (uri )
559540
560541 return response
561542
@@ -812,14 +793,11 @@ async def get_evaluation_submission_bundles(
812793 client = Synapse .get_client (synapse_client = synapse_client )
813794
814795 uri = f"/evaluation/{ evaluation_id } /submission/bundle/all"
815- query_params = {}
816796
817797 if status :
818- query_params [ " status" ] = status
798+ uri = uri + "? status=" + status
819799
820- async for item in rest_get_paginated_async (
821- uri = uri , params = query_params , synapse_client = client
822- ):
800+ async for item in rest_get_paginated_async (uri = uri , synapse_client = client ):
823801 yield item
824802
825803
@@ -847,9 +825,6 @@ async def get_user_submission_bundles(
847825 client = Synapse .get_client (synapse_client = synapse_client )
848826
849827 uri = f"/evaluation/{ evaluation_id } /submission/bundle"
850- query_params = {}
851828
852- async for item in rest_get_paginated_async (
853- uri = uri , params = query_params , synapse_client = client
854- ):
829+ async for item in rest_get_paginated_async (uri = uri , synapse_client = client ):
855830 yield item
0 commit comments