Skip to content
This repository was archived by the owner on Apr 23, 2026. It is now read-only.

Handle connection exceptions to chat the model - #1318

Merged
mergify[bot] merged 1 commit into
instructlab:mainfrom
liranr23:connection_err
Jun 11, 2024
Merged

Handle connection exceptions to chat the model#1318
mergify[bot] merged 1 commit into
instructlab:mainfrom
liranr23:connection_err

Conversation

@liranr23

Copy link
Copy Markdown
Contributor

When the server(endpoint) that serves the model is unreachable, we get connection error. Until now we didn't handle this exception, causing a full stack-trace, which can be hard to read and get to the real error. Now, this exception is handled, giving the user the error and a hint of the problem.

Issue resolved by this Pull Request:
Resolves #1310

Checklist:

  • Commit Message Formatting: Commit titles and messages follow guidelines in the
    conventional commits.
  • Changelog updated with breaking and/or notable changes for the next minor release.
  • Documentation has been updated, if necessary.
  • Unit tests have been added, if necessary.
  • Integration tests have been added, if necessary.

Comment thread src/instructlab/chat/chat.py Outdated
Comment thread src/instructlab/chat/chat.py Outdated
Comment thread src/instructlab/chat/chat.py Outdated
@mergify mergify Bot added the one-approval PR has one approval from a maintainer label Jun 10, 2024
@leseb leseb added this to the Release - 6/13 milestone Jun 11, 2024

@leseb leseb left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

One small nit, please fix your commit message: s/excpetions/exceptions/, thanks!

@mergify mergify Bot removed the one-approval PR has one approval from a maintainer label Jun 11, 2024
When the server(endpoint) that serves the model is unreachable, we get
connection error. Until now we didn't handle this exception, causing a
full stack-trace, which can be hard to read and get to the real error.
Now, this exception is handled, giving the user the error and a hint of
the problem.

Signed-off-by: Liran Rotenberg <lrotenbe@redhat.com>
@liranr23 liranr23 changed the title Handle connection excpetions to chat the model Handle connection exceptions to chat the model Jun 11, 2024
@mergify mergify Bot added the one-approval PR has one approval from a maintainer label Jun 11, 2024
@mergify
mergify Bot merged commit e9c01a0 into instructlab:main Jun 11, 2024
@mergify mergify Bot removed the one-approval PR has one approval from a maintainer label Jun 11, 2024
@cdoern

cdoern commented Jun 11, 2024

Copy link
Copy Markdown
Contributor

lets hold changes like this going forward if we can until #990 gets in

@liranr23
liranr23 deleted the connection_err branch June 13, 2024 11:59
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

instructlab shouldn't stack trace when it can't connect to the server

4 participants