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

SmoothieMeta only counts stats for the default_model #33

Open
parkervg opened this issue Oct 15, 2024 · 0 comments
Open

SmoothieMeta only counts stats for the default_model #33

parkervg opened this issue Oct 15, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@parkervg
Copy link
Owner

Describe the bug
Currently, logic in the main _blend() function only considers the default_model object when aggregating stats in the SmoothieMeta object.

Any models specified via a from_args() call to an ingredient, then, are ignored.

To Reproduce

model = OpenaiLLM(
    "gpt-3.5-turbo",
    config={
        "temperature": 0.0
    },
    caching=False
)

query = """
SELECT DISTINCT venue FROM w
      WHERE city = 'sydney' AND {{
          LLMMap(
              'More than 30 total points?',
              'w::score'
          )
      }} = TRUE
"""
ingredients = {
    LLMMap.from_args(
        model=TransformersLLM(
            "HuggingFaceTB/SmolLM-135M-Instruct", caching=False, config={"chat_template": ChatMLTemplate, "device_map": "cpu"},
        )
    )
}
db = SQLite(
    fetch_from_hub("1884_New_Zealand_rugby_union_tour_of_New_South_Wales_1.db")
)

smoothie = blend(query=query, db=db, ingredients=ingredients, default_model=model, verbose=True)
# Both these are empty 
print(smoothie.meta.raw_prompts)
print(smoothie.meta.prompts)

Expected behavior
We should track usages across all models invoked during a BlendSQL execution.

@parkervg parkervg self-assigned this Oct 15, 2024
@parkervg parkervg added the bug Something isn't working label Oct 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant