From 3247ed60ce3eb403abe6c826e16faa3898a7ca77 Mon Sep 17 00:00:00 2001 From: raphaelDkhn Date: Tue, 5 Mar 2024 12:32:42 +0100 Subject: [PATCH] fix format_inputs_for_cairo --- giza_actions/model.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/giza_actions/model.py b/giza_actions/model.py index 60eb23f..cacb989 100644 --- a/giza_actions/model.py +++ b/giza_actions/model.py @@ -260,7 +260,7 @@ def _format_inputs_for_cairo( Returns: dict: A dictionary representing the formatted inputs for the Cairo prediction request. """ - serialized = None + serialized = [] if input_file is not None: serialized = serialize(input_file, fp_impl) @@ -270,12 +270,12 @@ def _format_inputs_for_cairo( value = input_feed[name] if isinstance(value, np.ndarray): tensor = create_tensor_from_array(value, fp_impl) - serialized = serializer(tensor) + serialized.append(serializer(tensor)) else: - serialized = serializer(value) - - return {"job_size": job_size, "args": serialized} + serialized.append(serializer(tensor)) + return {"job_size": job_size, "args": " ".join(serialized)} + def _format_inputs_for_ezkl( self, input_file: str, input_feed: Dict, job_size: str, *args, **kwargs ):