Skip to content

WIP: Assertions FAQ #434

@okhat

Description

@okhat

Gathering questions about assertions and suggestions from different users.

This will be most relevant for @Shangyint @manishshettym @arnavsinghvi11.

  1. What's changing between different versions? What will be the final stable API for everything below?

  2. Do users need to manually set trace=[]. Can this be automated?

  3. Does dspy.Assert retry? If not, shouldn't it?

  4. What happens if I don't set target_module? Does it directly re-run the last module? What's confusing people here currently.

  5. Is it true that you can't really pass a module to the target_module , it must be it's signature?

  6. I saved my compiled program with assertions. When I load it (like code below), I get DSPySuggestionError.

loaded_compiled_module = MyModuleWithAssertions()
loaded_compiled_module.load(path="compiled_mods_assertions/BootstrapFewShotWithRandomSearch_With_Assertions.json")
# MyModuleWithAssertions embeds dspy.Suggest 
module_with_assertions = assert_transform_module(MyModuleWithAssertions().map_named_predictors(Retry), backtrack_handler) 

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