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 panic in mistralrs-server #981

Merged
merged 3 commits into from
Jan 12, 2025
Merged

Fix panic in mistralrs-server #981

merged 3 commits into from
Jan 12, 2025

Conversation

cdoko
Copy link
Collaborator

@cdoko cdoko commented Dec 9, 2024

The completion.rs file appears to have been initially based on the chat_completion.rs file, but the match arms were not fully adapted for the completion use case, resulting in a missing CompletionModelError and an unnecessary ModelError case.

This PR also sets self.is_done to true for CompletionModelError and ModelError cases, which ends the stream after an error, similar to the behavior for Chunk/CompletionChunk arms when finish_reason is Some.

@cdoko cdoko changed the title Fix panic in mistral-server Fix panic in mistralrs-server Dec 9, 2024
Copy link

github-actions bot commented Dec 9, 2024

Code Metrics Report
  ===============================================================================
 Language            Files        Lines         Code     Comments       Blanks
===============================================================================
 C Header                2           35           28            0            7
 Dockerfile              1           41           22           10            9
 JSON                   12          105          104            0            1
 Python                 64         2729         2359           71          299
 Shell                   1           57           22           18           17
 Plain Text              3         3723            0         2413         1310
 TOML                   18          611          544            2           65
 YAML                    2           21           19            2            0
-------------------------------------------------------------------------------
 Jupyter Notebooks       4            0            0            0            0
 |- Markdown             2           77           32           31           14
 |- Python               2          205          178            1           26
 (Total)                            282          210           32           40
-------------------------------------------------------------------------------
 Markdown               44         3460            0         2625          835
 |- BASH                 6          103          100            0            3
 |- JSON                 1           12           12            0            0
 |- Python               7          121          109            0           12
 |- Rust                13          440          373            0           67
 |- TOML                 2           75           63            0           12
 (Total)                           4211          657         2625          929
-------------------------------------------------------------------------------
 Rust                  299        94302        84614         1921         7767
 |- Markdown           145         1617           25         1469          123
 (Total)                          95919        84639         3390         7890
===============================================================================
 Total                 450       105084        87712         7062        10310
===============================================================================
  

@cdoko cdoko merged commit dd5fc56 into EricLBuehler:master Jan 12, 2025
12 checks passed
@cdoko cdoko deleted the fix-panic branch January 12, 2025 13:50
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