replicate/replicate-python

ModelError: Unknown error handling prediction.

tassa-yoniso-manasi-karoto opened this issue · 3 comments

Replicate v0.22.0

Traceback (most recent call last):
  File "/home/voiduser/go/src/sentences/whisper.py", line 93, in <module>
    main()
  File "/home/voiduser/go/src/sentences/whisper.py", line 62, in main
    whispered = run_whisper(prow, path)
                ^^^^^^^^^^^^^^^^^^^^^^^
  File "/root/.local/share/pipx/venvs/replicate/lib/python3.12/site-packages/wrapt_timeout_decorator/wrapt_timeout_decorator.py", line 146, in wrapper
    return wrapped_with_timeout(wrap_helper)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/root/.local/share/pipx/venvs/replicate/lib/python3.12/site-packages/wrapt_timeout_decorator/wrapt_timeout_decorator.py", line 153, in wrapped_with_timeout
    return wrapped_with_timeout_signals(wrap_helper)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/root/.local/share/pipx/venvs/replicate/lib/python3.12/site-packages/wrapt_timeout_decorator/wrapt_timeout_decorator.py", line 161, in wrapped_with_timeout_signals
    return wrap_helper.wrapped(*wrap_helper.args, **wrap_helper.kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/voiduser/go/src/sentences/whisper.py", line 32, in run_whisper
    return replicate.run(model_version, input={"audio": Path(audio), "language": "th"})["transcription"]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/root/.local/share/pipx/venvs/replicate/lib/python3.12/site-packages/replicate/client.py", line 147, in run
    return run(self, ref, input, **params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/root/.local/share/pipx/venvs/replicate/lib/python3.12/site-packages/replicate/run.py", line 52, in run
    raise ModelError(prediction.error)
replicate.exceptions.ModelError: Unknown error handling prediction.

Hi @tassa-yoniso-manasi-karoto. That error indicates a problem with the model you're running rather than the Python client itself. Could you please share a link to the model or a prediction that failed with this error?