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

fix uncaught exception in http client #247

Merged
merged 1 commit into from
Nov 3, 2023

Conversation

dtrifiro
Copy link
Contributor

fixes #245

@dtrifiro

This comment was marked as outdated.

@dtrifiro dtrifiro changed the title Fix uncaught exception fix uncaught exception in http client Nov 2, 2023
@evaline-ju
Copy link
Collaborator

I see #261 was put up from @Ssukriti that addresses basically the same issue but adds a test - could we potentially combine the work from these two PRs?

@Ssukriti
Copy link
Collaborator

Ssukriti commented Nov 3, 2023

You want to just merge this and then I will rebase my PR to add the test and fix the function argument typing as well ?

@dtrifiro
Copy link
Contributor Author

dtrifiro commented Nov 3, 2023

@evaline-ju @Ssukriti the test in #261 does not actually test this issue, it passes with or without this patch and actually replicates behaviour of existing tests, such as test_run_model (and others):

def test_run_model(causal_lm_dummy_model):
"""Ensure that we can run a model and get the right type out."""
pred = causal_lm_dummy_model.run("This text doesn't matter")
assert isinstance(pred, GeneratedTextResult)

I added a test for generate_text_func that generates text and then tries serializing the result. I'm also parametrizing over two different model types, which is probably not really required.

@Ssukriti
Copy link
Collaborator

Ssukriti commented Nov 3, 2023

Great. Thank you! PR looks good to me ( lets merge it soon , because it's blocking some other effort :) )

Copy link
Collaborator

@evaline-ju evaline-ju left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - thanks for adding the test!

@evaline-ju evaline-ju merged commit 4a5b2f8 into caikit:main Nov 3, 2023
4 checks passed
@dtrifiro dtrifiro deleted the fix-uncaught-exception branch November 3, 2023 15:50
@evaline-ju evaline-ju linked an issue Nov 3, 2023 that may be closed by this pull request
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.

inference after fine tuning llama-7b fails Unhandled Exception when querying text-generation http endpoint
3 participants