We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e5569a2 commit 75a387fCopy full SHA for 75a387f
2 files changed
replicate/exceptions.py
@@ -17,7 +17,9 @@ class ModelError(ReplicateException):
17
18
def __init__(self, prediction: "Prediction") -> None:
19
self.prediction = prediction
20
- super().__init__(prediction.error)
+ super().__init__(
21
+ f"Prediction {prediction.id} {prediction.status}: {prediction.error}"
22
+ )
23
24
25
class ReplicateError(ReplicateException):
tests/test_run.py
@@ -581,7 +581,7 @@ async def test_run_with_model_error(mock_replicate_api_token):
581
},
582
)
583
584
- assert str(excinfo.value) == "OOM"
+ assert str(excinfo.value) == "Prediction p1 failed: OOM"
585
assert excinfo.value.prediction.error == "OOM"
586
assert excinfo.value.prediction.status == "failed"
587
0 commit comments