@@ -29,14 +29,18 @@ def run(
2929 client : "Client" ,
3030 ref : Union ["Model" , "Version" , "ModelVersionIdentifier" , str ],
3131 input : Optional [Dict [str , Any ]] = None ,
32- use_file_output : Optional [bool ] = None ,
32+ * ,
33+ use_file_output : Optional [bool ] = True ,
3334 ** params : Unpack ["Predictions.CreatePredictionParams" ],
3435) -> Union [Any , Iterator [Any ]]: # noqa: ANN401
3536 """
3637 Run a model and wait for its output.
3738 """
3839
39- is_blocking = "wait" in params
40+ if "wait" not in params :
41+ params ["wait" ] = True
42+ is_blocking = params ["wait" ] != False # noqa: E712
43+
4044 version , owner , name , version_id = identifier ._resolve (ref )
4145
4246 if version_id is not None :
@@ -74,13 +78,18 @@ async def async_run(
7478 client : "Client" ,
7579 ref : Union ["Model" , "Version" , "ModelVersionIdentifier" , str ],
7680 input : Optional [Dict [str , Any ]] = None ,
77- use_file_output : Optional [bool ] = None ,
81+ * ,
82+ use_file_output : Optional [bool ] = True ,
7883 ** params : Unpack ["Predictions.CreatePredictionParams" ],
7984) -> Union [Any , AsyncIterator [Any ]]: # noqa: ANN401
8085 """
8186 Run a model and wait for its output asynchronously.
8287 """
8388
89+ if "wait" not in params :
90+ params ["wait" ] = True
91+ is_blocking = params ["wait" ] != False # noqa: E712
92+
8493 version , owner , name , version_id = identifier ._resolve (ref )
8594
8695 if version or version_id :
0 commit comments