Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can not use trained model because of assertion mistakes #10

Open
nva001 opened this issue Apr 15, 2024 · 1 comment
Open

Can not use trained model because of assertion mistakes #10

nva001 opened this issue Apr 15, 2024 · 1 comment

Comments

@nva001
Copy link

nva001 commented Apr 15, 2024

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?

@wehos
Copy link
Contributor

wehos commented Apr 15, 2024

Thanks for raising this issue! I'll work on it shortly and keep you posted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants