File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,9 @@ class ModelError(ReplicateException):
1717
1818 def __init__ (self , prediction : "Prediction" ) -> None :
1919 self .prediction = prediction
20- super ().__init__ (prediction .error )
20+ super ().__init__ (
21+ f"Prediction { prediction .id } { prediction .status } : { prediction .error } "
22+ )
2123
2224
2325class ReplicateError (ReplicateException ):
Original file line number Diff line number Diff line change @@ -581,7 +581,7 @@ async def test_run_with_model_error(mock_replicate_api_token):
581581 },
582582 )
583583
584- assert str (excinfo .value ) == "OOM"
584+ assert str (excinfo .value ) == "Prediction p1 failed: OOM"
585585 assert excinfo .value .prediction .error == "OOM"
586586 assert excinfo .value .prediction .status == "failed"
587587
You can’t perform that action at this time.
0 commit comments