Closed YZhou0413 closed 1 year ago
It happens here:
Python 3.10.10 (tags/v3.10.10:aad5f6a, Feb 7 2023, 17:20:36) [MSC v.1929 64 bit (AMD64)] on win32
>>> import os
>>> os.path.join("C:", "Users")
'C:Users'
For temporary usage, try to move the snapshot into the folder where your project locates in and use relative path to load it.
To developers: I'd suggest using pathlib
for path manipulating.
from pathlib import Path
# ...
checkpoint_path = Path(checkpoint_path)
if not checkpoint_path.is_file():
raise Exception(f"Invalid checkpoint path: {checkpoint_path}")
parent_folder = checkpoint_path.parents[1] # .parent.parent
hparams_file = parent_folder / "hparams.yaml"
# ...
Thank you! @K024
Thanks @K024!
@YZhou0413 I just pushed the changes suggested above. You can test the current master
@ricardorei It's working, Thanks!
@YZhou0413 I'll release this on the next pypi version!
Since we just released version 2.0 and I expect more people reporting issues, I'll just wait a few weeks.
What is your question?
Hello Ricardo,
i just installed COMET 2.0.0 and ran a basic test with the text examples after the full installation. And i got the Exception:
hparams.yaml file is missing from C:Users\username.cache\huggingface\hub\models--Unbabel--wmt22-comet-da\snapshots\371e9839ca4e213dde891b066cf3080f75ec7e72!
I noticed that the path of the parent folder is incorrect, a "\" is missing in "C:Users". How can I fix it?
Thank you!
What's your environment?