Skip to content

Optimizer issue: Using a pre-compiled module as a teacher causes an assertion crash in bootstrap.py #824

@drawal1

Description

@drawal1

Assertion: Student and teacher must have the same number of predictors.

Code sample to repro:

    optimizer = BootstrapFewShotWithRandomSearch(
        metric=MyModule.metric,
        teacher_settings=dict({"lm": teacher_lm}),
    )

    teacher_module, _ = MyModule.load_compiled_model()

    for _ in range(2):
        student_module = MyModule().activate_assertions()

        teacher_module = optimizer.compile(
            student = student_module,
            teacher = teacher_module,
            trainset=train_set
        )

   return teacher_module

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions