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

worker: return back error strings to O #226

Closed
wants to merge 1 commit into from

Conversation

gioelecerati
Copy link
Member

@gioelecerati gioelecerati commented Oct 11, 2024

Modifying worker.go:

  • Appending the error message to the string that is currently getting sent back to the O and the Gateway, so that they can log the proper reasons of failure on the pipelines.

Modifying runner:

  • Added an helper under util.py in the routes to handle pipeline exception. In this helper, known Exceptions or known patterns can return a humanized str as error and the specified status code for the exception. Otherwise, they return either a default error message and status code or the specified error string
  • Potentially we could remove this helper and instead have this logic on the Gateway, to have humanized strings to be returned via api response to the requester.
  • Currently not edited the llm pipeline, as I see it's returning dicts instead of string. I was unable to check if it's returning dict for a reason or not, to be updated later if we want to handle specific exceptions

@mjh1 mjh1 self-requested a review October 11, 2024 16:52
@rickstaa
Copy link
Member

rickstaa commented Oct 14, 2024

@gioelecerati thanks for your pull request. Unfortunatelly, this was already implemented in PR #188. I had some last-minute changes stashed on my local machine, which I’ve just committed, and I also cleaned up the code a bit. I really like how you combined the handle_pipeline_exception into a single function. I was planning to implement this in a subsequent pull request (see #190).

Just keep in mind that I still have several other changes related to error handling that need to be reviewed (see PR #190). The current error handling is far from optimal, and it’s part of a broader project I’ve been working on to improve it (details here).

@rickstaa
Copy link
Member

@gioelecerati I included your logic in https://github.com/livepeer/ai-worker/pull/188/commits and made you the author of that commit.

@rickstaa rickstaa closed this Oct 14, 2024
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.

2 participants