datamol-io / molfeat

molfeat - the hub for all your molecular featurizers
https://molfeat.datamol.io
Apache License 2.0
169 stars 16 forks source link

Model Store Error #85

Closed GemmaTuron closed 7 months ago

GemmaTuron commented 7 months ago

Is there an existing issue for this?

Bug description

Hi!

I am using molfeat in a conda env (I've tried Python 3.8 and 3.10) by running pip install molfeat=0.9.4. When I try to fetch a model, for example ChemGPT4.7M, I get the following error message: molfeat.store.modelstore.ModelStoreError: Can't retrieve model ChemGPT4.7M from the store !

I've also tried other Pretrained HF transformers like ChemGPT-19M and GPT2-Zinc480 with the same result. It seems related to where the models are stored locally (see below) but I am unable to bypass it. Any help will be greatly appreciated!

How to reproduce the bug

from molfeat.trans.pretrained.hf_transformers import PretrainedHFTransformer
transformer = PretrainedHFTransformer(kind='ChemGPT-4.7M', notation='selfies', dtype=float)
features = transformer(my_smiles_list)

Error messages and logs

Traceback (most recent call last):                                                                                                                                         
  File "/home/gturon/miniconda3/envs/eos3cf4/lib/python3.10/site-packages/molfeat/store/loader.py", line 100, in _load_or_raise
    artifact_dir = store.download(modelcard, download_path, **kwargs)
  File "/home/gturon/miniconda3/envs/eos3cf4/lib/python3.10/site-packages/molfeat/store/modelstore.py", line 239, in download
    raise ModelStoreError(
molfeat.store.modelstore.ModelStoreError: The destination artifact at /home/gturon/.cache/molfeat/ChemGPT-4.7M/model.save has a different sha256sum (6d6bcb252f3d2f0919967d235b03ae27f95fc43bdd20202ae580c0db7195ec8f) than the Remote artifact sha256sum (e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855). The destination artifact has been removed 

Environment

Current environment ``` #- Molfeat version (e.g., 0.1.0): 0.9.4 #- PyTorch Version (e.g., 1.10.0): #- RDKit version (e.g., 2022.09.5): 2023.9.1 #- scikit-learn version (e.g., 1.2.1): 1.3.2 #- OS (e.g., Linux): Ubuntu 22.04.3 LTS (Jammy Jellyfish) #- How you installed Molfeat (`conda`, `pip`, source): pip ```

Additional context

No response

cwognum commented 7 months ago

Hi @GemmaTuron, love the work you're doing with @ersilia-os! Thank you for reporting this issue. I believe it boils down to the same issue as #84. I'm looking into it!

maclandrol commented 7 months ago

@GemmaTuron was this issue fixed by #84 ?

GemmaTuron commented 7 months ago

Hi @maclandrol !

Sorry for not answering before, yes, this is solved by #84 ! I'll close this issue