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

Retry for replicate completion response of status=processing #7901

Merged

Conversation

bjhargrave
Copy link
Contributor

Title

Retry for replicate completion response of status=processing

Relevant issues

Fixes #7900

Type

🐛 Bug Fix

Changes

We use the DEFAULT_REPLICATE_ constants for retry count and initial delay. If the completion response returns status=processing, we loop to retry.

[REQUIRED] Testing - Attach a screenshot of any new tests passing locally

If UI changes, send a screenshot/GIF of working UI fixes

no new tests

We use the DEFAULT_REPLICATE_ constants for retry count and initial
delay. If the completion response returns status=processing, we
loop to retry.

Fixes BerriAI#7900

Signed-off-by: BJ Hargrave <[email protected]>
Copy link

vercel bot commented Jan 21, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
litellm ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 21, 2025 10:22pm

@krrishdholakia
Copy link
Contributor

Hi @bjhargrave can you share a screenshot of your change working as expected

even better if you can add a unit test for it here -

bjhargrave added a commit to ibm-granite-community/granite-snack-cookbook that referenced this pull request Jan 23, 2025
@bjhargrave
Copy link
Contributor Author

With the current code, the PDL notebook fails when using replicate because the completion check encounters status=processing and does not retry. https://github.com/ibm-granite-community/granite-snack-cookbook/actions/runs/12926854744/job/36050805037#step:7:368

Screenshot 2025-01-23 at 11 31 57

When using the fix in this PR by adding a pip install for the PR changes:

! pip install git+https://github.com/bjhargrave/litellm.git@issues/7900

The notebook completes successfully. https://github.com/ibm-granite-community/granite-snack-cookbook/actions/runs/12931609052/job/36065903001?pr=110#step:7:537

Screenshot 2025-01-23 at 12 16 47

@krrishdholakia krrishdholakia changed the base branch from main to litellm_dev_01_23_2025_p4 January 24, 2025 06:20
@krrishdholakia krrishdholakia merged commit d98f132 into BerriAI:litellm_dev_01_23_2025_p4 Jan 24, 2025
2 checks passed
krrishdholakia added a commit that referenced this pull request Jan 24, 2025
…7965)

We use the DEFAULT_REPLICATE_ constants for retry count and initial
delay. If the completion response returns status=processing, we
loop to retry.

Fixes #7900

Signed-off-by: BJ Hargrave <[email protected]>
Co-authored-by: BJ Hargrave <[email protected]>
jarobey pushed a commit to jarobey/litellm that referenced this pull request Jan 28, 2025
…#7901) (BerriAI#7965)

We use the DEFAULT_REPLICATE_ constants for retry count and initial
delay. If the completion response returns status=processing, we
loop to retry.

Fixes BerriAI#7900

Signed-off-by: BJ Hargrave <[email protected]>
Co-authored-by: BJ Hargrave <[email protected]>
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

Successfully merging this pull request may close these issues.

Replicate completion response with status=processing does not retry
2 participants