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: kwarg LlamaCppLLM.llm overwritten by import #211

Merged
merged 2 commits into from
Mar 28, 2024

Conversation

bruvduroiu
Copy link
Member

Closes #206 .

Description of fix

A bug was introduced in #190 that overwrote the kwarg value of LlamaCppLLM.llm, replacing a passed kwarg instance of llama_cpp.Llama.

The same bug also replaced the passed value of LlamaCppLLM.grammar.

Fix

Rely on self._llama_cpp.{Llama,LlamaGrammar} if we need these classes, remove the overriding of llm and grammar from the values passed as kwargs.

Copy link

codecov bot commented Mar 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.14%. Comparing base (12af7a5) to head (f8caff1).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #211      +/-   ##
==========================================
- Coverage   78.16%   78.14%   -0.02%     
==========================================
  Files          43       43              
  Lines        2235     2233       -2     
==========================================
- Hits         1747     1745       -2     
  Misses        488      488              

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

@bruvduroiu bruvduroiu self-assigned this Mar 21, 2024
@jamescalam jamescalam merged commit ca71efa into main Mar 28, 2024
8 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.

Error in 05-local-execution on MacOS
2 participants