@@ -131,19 +131,19 @@ async def async_run(
131131 if version_id is not None :
132132 # Create prediction with the specific version ID
133133 params_with_version : PredictionCreateParams = {** params , "version" : version_id }
134- prediction = await client .predictions .create (
134+ prediction = await client .predictions .create ( # pyright: ignore[reportCallIssue, reportUnknownVariableType]
135135 file_encoding_strategy = file_encoding_strategy , ** params_with_version
136136 )
137137 elif owner and name :
138138 # Create prediction via models resource with owner/name
139- prediction = await client .models .predictions .create (
139+ prediction = await client .models .predictions .create ( # pyright: ignore[reportCallIssue, reportUnknownVariableType]
140140 model_owner = owner , model_name = name , file_encoding_strategy = file_encoding_strategy , ** params
141141 )
142142 else :
143143 # If ref is a string but doesn't match expected patterns
144144 if isinstance (ref , str ):
145145 params_with_version = {** params , "version" : ref }
146- prediction = await client .predictions .create (
146+ prediction = await client .predictions .create ( # pyright: ignore[reportCallIssue, reportUnknownVariableType]
147147 file_encoding_strategy = file_encoding_strategy , ** params_with_version
148148 )
149149 else :
@@ -169,14 +169,14 @@ async def async_run(
169169 # async for chunk in prediction.async_output_iterator()
170170 # )
171171
172- prediction = await client .predictions .wait (prediction .id )
172+ prediction = await client .predictions .wait (prediction .id ) # pyright: ignore[reportUnknownMemberType, reportUnknownArgumentType]
173173
174174 if prediction .status == "failed" : # pyright: ignore[reportUnknownMemberType]
175175 raise ModelError (prediction ) # pyright: ignore[reportUnknownArgumentType]
176176
177177 # Return an iterator for completed output if the model has an output iterator array type.
178- if version and _has_output_iterator_array_type (version ) and prediction .output is not None :
179- return (transform_output (chunk , client ) async for chunk in _make_async_iterator (prediction .output )) # type: ignore
178+ if version and _has_output_iterator_array_type (version ) and prediction .output is not None : # pyright: ignore[reportUnknownMemberType]
179+ return (transform_output (chunk , client ) async for chunk in _make_async_iterator (prediction .output )) # type: ignore # pyright: ignore[reportUnknownMemberType]
180180 if use_file_output :
181181 return transform_output (prediction .output , client ) # type: ignore[no-any-return] # pyright: ignore[reportUnknownMemberType]
182182
0 commit comments