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

Bug: Samplers error from the Outline docs classification example #978

Closed
jrinder42 opened this issue Jun 16, 2024 · 0 comments · Fixed by #980
Closed

Bug: Samplers error from the Outline docs classification example #978

jrinder42 opened this issue Jun 16, 2024 · 0 comments · Fixed by #980
Labels
documentation Linked to documentation and examples

Comments

@jrinder42
Copy link
Contributor

Describe the issue as clearly as possible:

The error occurs when trying to replicate the classification example here. This error seems to be due to the isinstance always returning False. This might be more of a Python oddity.

Steps/code to reproduce the bug:

class FizzBuzz:
    pass

hi = FizzBuzz
print(isinstance(hi, FizzBuzz))  # --> False

Expected result:

True

Error message:

No response

Outlines/Python version information:

Outlines: 0.0.44
Python: 3.10.14

Context for the issue:

No response

@jrinder42 jrinder42 added the bug label Jun 16, 2024
rlouf pushed a commit that referenced this issue Jun 18, 2024
This fixes issue #978. Specifically for the classification example in
the outlines cookbook section
[here](https://outlines-dev.github.io/outlines/cookbook/classification/),
it fixes the piece of code in
outlines.generate.api.SequenceGeneratorAdapter that keeps returning the
wrong result (i.e. returning False even if a specific sampler is passed
(greedy, multinomial, or beam search).
@rlouf rlouf linked a pull request Jun 18, 2024 that will close this issue
@rlouf rlouf added documentation Linked to documentation and examples and removed bug labels Jun 18, 2024
@rlouf rlouf closed this as completed Jun 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Linked to documentation and examples
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants