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

Add hf_converter keyword to SpectrumDataset._to_tensor and AnnotatedSpectrumDataset._to_tensor for pylance compatability. #68

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

Lilferrit
Copy link

@Lilferrit Lilferrit commented Oct 2, 2024

This resolves the error in #67. I tested this fix in the dev_latest_depthcharge branch of the Casanovo repo by installing the package directly from GitHub and it worked there as well. All of the depthcharge unit tests passed on my local machine with pylance v0.15.0.

@bittremieux
Copy link
Collaborator

Instead of pinning to a very specific Lance version, the better solution is actually to add the hf_converter keyword to the _to_tensor method (and probably just ignore it). Note that this needs to happen in a few different places.

@Lilferrit
Copy link
Author

Sounds good, I added to hf_converter keyword in SpectrumDataset._to_tensor and AnnotatedSpectrumDataset._to_tensor.

@Lilferrit Lilferrit changed the title Freeze pylance version to 0.15.0 Add hf_converter keyword to SpectrumDataset._to_tensor and AnnotatedSpectrumDataset._to_tensor for pylance compatability. Oct 17, 2024
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

Successfully merging this pull request may close these issues.

2 participants