guidance-ai / guidance

A guidance language for controlling large language models.
MIT License
18.14k stars 1.01k forks source link

[Notebooks] Debugging Attempts #879

Closed riedgar-ms closed 1 month ago

riedgar-ms commented 1 month ago

Trying to figure out what is going wrong with the notebook tests. The most common problem appears to be a grammar match problem, so:

riedgar-ms commented 1 month ago

Irritatingly, these changes suddenly seem to be making the Notebook tests pass, despite not actually changing the code

codecov-commenter commented 1 month ago

Codecov Report

Attention: Patch coverage is 77.27273% with 5 lines in your changes missing coverage. Please review.

Project coverage is 54.51%. Comparing base (e234c56) to head (42f2a98).

Files Patch % Lines
guidance/models/_model.py 25.00% 3 Missing :warning:
guidance/models/_grammarless.py 88.88% 2 Missing :warning:

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #879 +/- ## ========================================== - Coverage 57.09% 54.51% -2.58% ========================================== Files 63 63 Lines 4575 4591 +16 ========================================== - Hits 2612 2503 -109 - Misses 1963 2088 +125 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

riedgar-ms commented 1 month ago

I have suspicion that, if it's not due to one of our dependencies changing, the fact that the notebook build suddenly starts working with this change in place is due to some race condition between the two threads. That said, I'm not seeing where that race might be arising - _start_new_stream() tells the other thread to terminate, waits to join() it, clears the queue, and then spawns the new thread.

NAGAMALLYSRUJAN2329 commented 3 weeks ago

How to turn on the logging in my notebook.