Skip to content

Small bug when running local inference #19

@billlyzhaoyh

Description

@billlyzhaoyh

When I try to run the local classifier without making an LLM called the following line results in an error:

https://github.com/tryolabs/restricttotopic/blob/main/validator/main.py#L360
TypeError: unsupported operand type(s) for +: 'set' and 'set'

Which I believe is a simple fix from

candidate_topics = model_input["valid_topics"] +  model_input["invalid_topics"]

to

candidate_topics = list(model_input["valid_topics"]) + list(model_input["invalid_topics"])

happy to raise a PR to help out

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions