Handle invalid utf-8 bytes in engine class instead of model class#1094
Handle invalid utf-8 bytes in engine class instead of model class#1094JC1DA wants to merge 5 commits intoguidance-ai:mainfrom
Conversation
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1094 +/- ##
===========================================
+ Coverage 49.79% 60.27% +10.47%
===========================================
Files 71 71
Lines 5880 5875 -5
===========================================
+ Hits 2928 3541 +613
+ Misses 2952 2334 -618 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@hudson-ai can you help check this PR? |
| @@ -543,13 +543,19 @@ def __call__( | |||
| delayed_engine_outputs = [] | |||
| elif not echo and engine_response.new_bytes: | |||
There was a problem hiding this comment.
Why is it that we only delay bytes if not echo?
There was a problem hiding this comment.
there is another logic to process delayed_bytes if echo is True above.
|
Seems reasonable to me, but I'm not sure I have a strong opinion on whether this should be done in the engine vs in the model. Can you help me understand why you like this approach more? |
First, I think it does not make sense for the engine to generate bytes that the model could not even use, and have to do post-processing on the result. |
This PR removes unnecessary invalid utf-8 bytes handling code in Model class as we can better handle it in Engine class.