Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

replicate.exceptions.ModelError: 'Request 0 already exists.' #238

Open
jpiabrantes opened this issue Jan 30, 2024 · 2 comments
Open

replicate.exceptions.ModelError: 'Request 0 already exists.' #238

jpiabrantes opened this issue Jan 30, 2024 · 2 comments

Comments

@jpiabrantes
Copy link

I made a prediction to a Mistral model and received the following error:

Traceback (most recent call last):
  File "/Users/joaoabrantis/Desktop/sakana/languagemodels/debate.py", line 45, in <module>
    correct = debate([models[n] for n in model_names], rounds, data)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/joaoabrantis/Desktop/sakana/languagemodels/debate.py", line 20, in debate
    round_answers.append(run(model, ari_initial_prompt(problem)))
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/joaoabrantis/Desktop/sakana/languagemodels/llm_service.py", line 44, in run
    response = replicate.run(model.identifier, input=args)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/joaoabrantis/miniconda3/lib/python3.11/site-packages/replicate/client.py", line 148, in run
    return run(self, ref, input, **params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/joaoabrantis/miniconda3/lib/python3.11/site-packages/replicate/run.py", line 61, in run
    raise ModelError(prediction.error)
replicate.exceptions.ModelError: 'Request 0 already exists.'

How should I handle these errors?

@mattt
Copy link
Member

mattt commented Jan 30, 2024

Hi @jpiabrantes. A ModelError is an error returned by the model, so there's nothing to be done from the client.

Could you share a link to the model — or better yet, to a prediction that failed with that error?

@neverabsolute
Copy link

Hey, seeing identical issues here. It's a bit sporadic, but when using mistralai/mistral-7b-instruct-v0.2, or any other model, with the same prompt and input, I will see this.

I suspect simply raising for retry on my end will help prevent this, but I wonder what the root cause is here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants