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

Re-raise LLM exceptions instead of raising new exception #94

Open
bruvduroiu opened this issue Jan 9, 2024 · 4 comments
Open

Re-raise LLM exceptions instead of raising new exception #94

bruvduroiu opened this issue Jan 9, 2024 · 4 comments
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@bruvduroiu
Copy link
Contributor

bruvduroiu commented Jan 9, 2024

In Python, re-raising exceptions (raise instead of raise Exception(e) preserves the original stack trace, helping with debugging.

Change the LLM __call__ exception handling to re-raise errors happening during generation

raise Exception(f"LLM error: {e}")

@bruvduroiu bruvduroiu added bug Something isn't working good first issue Good for newcomers labels Jan 9, 2024
@simjak
Copy link
Member

simjak commented Jan 9, 2024

@bruvduroiu so it should raise instead of raise Exception(e) ?

@bruvduroiu
Copy link
Contributor Author

@simjak yes, raise Exception(e) raises a new exception, thus losing the stack of the original exception

@alongadot
Copy link

Hey, great project. I'm looking to contribute (and generally getting started with contributing to OS), is this issue still unassigned?

@simjak
Copy link
Member

simjak commented Jan 14, 2024

Hey, great project. I'm looking to contribute (and generally getting started with contributing to OS), is this issue still unassigned?

Yes, you could contribute if you can 🙏

jamescalam added a commit that referenced this issue Jan 17, 2024
jamescalam added a commit that referenced this issue Feb 11, 2024
fix: issue #94 added from clause to the exception statement in
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants