From 6cce2ecd49e34c5c94e7b8cff3d480c52ccbde62 Mon Sep 17 00:00:00 2001 From: dan Date: Wed, 1 Mar 2023 15:42:48 -0800 Subject: [PATCH] workaround circular import Signed-off-by: dan nelson --- replicate/version.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/replicate/version.py b/replicate/version.py index e2edf1cf..cf2574ce 100644 --- a/replicate/version.py +++ b/replicate/version.py @@ -4,10 +4,8 @@ from replicate.base_model import BaseModel from replicate.collection import Collection from replicate.exceptions import ModelError -from replicate.prediction import Prediction from replicate.schema import make_schema_backwards_compatible - class Version(BaseModel): id: str created_at: datetime.datetime @@ -32,7 +30,7 @@ def predict(self, **kwargs) -> Union[Any, Iterator[Any]]: raise ModelError(prediction.error) return prediction.output - def create_prediction(self, **kwargs) -> Prediction: + def create_prediction(self, **kwargs) -> 'Prediction': """Creates and immediately returns a prediction""" return self._client.predictions.create(version=self, input=kwargs)