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 test_ll for new llguidance with working advance_parser() #1013

Merged
merged 1 commit into from
Sep 9, 2024

Conversation

mmoskal
Copy link
Collaborator

@mmoskal mmoskal commented Sep 8, 2024

I have fixed the LLInterpreter.post_process() method to be the same as LLInterpreter.advance_parser() - they now actually correctly compute the new forced tokens after sampled token (before they would just return the sampled token and only next call to LLInterpreter.mid_process() would return the forced tokens).

The change above broke "my" test_ll.py - this fixed it (the test works now with both new and old llguidance). It didn't seem to break anything else (@hudson-ai told me that the new behavior was what he expected anyways).

One day I have to move this test to llguidance repo, but it's hard since I don't have any ergonomic way of producing the llguidance grammars there.

cc @Harsha-Nori

@codecov-commenter
Copy link

codecov-commenter commented Sep 8, 2024

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 61.36%. Comparing base (cf9ecd1) to head (8f8bce8).

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

❗ There is a different number of reports uploaded between BASE (cf9ecd1) and HEAD (8f8bce8). Click for more details.

HEAD has 4 uploads less than BASE
Flag BASE (cf9ecd1) HEAD (8f8bce8)
84 80
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1013      +/-   ##
==========================================
- Coverage   70.14%   61.36%   -8.79%     
==========================================
  Files          62       62              
  Lines        4441     4441              
==========================================
- Hits         3115     2725     -390     
- Misses       1326     1716     +390     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@hudson-ai hudson-ai left a comment

Choose a reason for hiding this comment

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

I can simplify a few things in parser.py now that I'm assured that post-process will advance us all the way (will do in a separate PR). Thanks @mmoskal !

@Harsha-Nori Harsha-Nori merged commit c0a0bfb into guidance-ai:main Sep 9, 2024
100 checks passed
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.

4 participants