Skip to content

Can not use trained model because of assertion mistakes #10

@nva001

Description

@nva001

Thank you so much for the wonderful model.
But there has been an issue related to using the model after fine-tuning.
After file-tuning, the model was saved by running torch.save(pipeline.state_dict(), /path/..). But when using it to do prediction tasks, it raised this error: AssertionError: Cell type annotation pipeline does not support zero shot setting. Please fine-tune the model on downstream datasets before inference.
When I read your source code, I see this mistake: the class was not initialized self.fitted attribute in the init method, the fitted attribute only would be created and assign True in the object derived from this class after running fit method. So when initializing a new object, the fitted attribute could not be created except running fit method. This led to the input of assert always being False. And, I can not bypass this assertion by assigning True to this attribute.
image
image
image
Could you please fix this issue?

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