Skip to content

[Bug] Predict assert requires LM, make it impossible to derive from BaseLM #7622

@Sciumo

Description

@Sciumo

What happened?

Assertion in Predict makeit impossible to derive from BaseLM, which forces the use of LiteLM no matter what.

assert isinstance(lm, dspy.LM), "No LM is loaded."

assert isinstance(lm, dspy.LM), "No LM is loaded."

Steps to reproduce

Create a custom LM drived from BaseLM.

DSPy version

2.6.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions