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

Sort the files and save the .bin model file for backwards compatibility #86

Merged
merged 2 commits into from
Nov 11, 2023

Conversation

cwognum
Copy link
Contributor

@cwognum cwognum commented Nov 10, 2023

Changelogs

  • Tried fixing cannot download model #84
    • See the issue for more details, but the ultimate fix was just to reupload the featurizers.
  • Also save the .bin files, as with transformer>=4.35.0 the default has changed to .safetensors and we want to remain backwards compatible.

Checklist:

  • Was this PR discussed in an issue? It is recommended to first discuss a new feature into a GitHub issue before opening a PR.
  • Add tests to cover the fixed bug(s) or the new introduced feature(s) (if appropriate).
  • Update the API documentation if a new function is added, or an existing one is deleted. Eventually consider making a new tutorial for new features.
  • Write concise and explanatory changelogs below.
  • If possible, assign one of the following labels to the PR: feature, fix or test (or ask a maintainer to do it for you).

@cwognum cwognum added the fix label Nov 10, 2023
@cwognum cwognum requested a review from maclandrol as a code owner November 10, 2023 21:09
@cwognum cwognum mentioned this pull request Nov 10, 2023
1 task
Copy link
Member

@maclandrol maclandrol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @cwognum.

Can you confirm it solves the issue ?

@maclandrol
Copy link
Member

Can you pin the version of datamol or fsspec here ?

@cwognum
Copy link
Contributor Author

cwognum commented Nov 10, 2023

The test GH action succeeds again.

Also tested it locally with:

import datamol as dm

from molfeat.trans.pretrained.hf_transformers import PretrainedHFTransformer

# Load a pretrained model
model = PretrainedHFTransformer(kind="ChemGPT-4.7M", notation="selfies", dtype=float)
feats = model.transform(dm.data.freesolv().iloc[:100].smiles)
print(feats)

So the issue is solved, but not per se because of the changes in this PR.

@maclandrol maclandrol merged commit f8579b3 into main Nov 11, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants