Forum Discussion

pborah's avatar
pborah
Solution Sage
1 day ago
Solved

Certificate validation error between Fabric and Huggingface

Hi,

I'm tyring to download a couple of transformer/sentence-transformer model weights into a notebook and I keep running into certificate mismatch issues between fabric and huggingface. I was wondering if anyone else has ran into this issue or if this is a known issue that Microsoft plans on handling in the very near future?

Environment

Microsoft Fabric Notebook (PySpark)

Python 3.11

PyTorch 2.2.1

Canada tenant

sentence-transformers==2.7.0 successfully installed

What works

Package installation succeeds

%pip install sentence-transformers==2.7.0

Import succeeds

from sentence_transformers import SentenceTransformer

version check succeeds

import torch import sentence_transformers print(torch.__version__) print(sentence_transformers.__version__)

What fails

from sentence_transformers import SentenceTransformer model = SentenceTransformer("all-MiniLM-L6-v2")

Or

Observations

The notebook appears able to reach Hugging Face and download metadata files. For example, the following files are successfully cached:

config.json  config_sentence_transformers.json modules.json README.md sentence_bert_config.json

However, the model weight file never downloads. The Hugging Face cache contains *.incomplete with a file size of 0 MB.

Error

The relevant error message appears to be

"No CA certificates were loaded from the system"

Is downloading Hugging Face model weights from Fabric notebooks currently supported? If so, is there a known issue with certificate validation? Is there a recommended workaround?

If not. then is there a recommended approach for generating semantic text embeddings within Fabric notebooks utilizing some kind of ANN based algorithm instead of classic techniques such as TF-IDF or SVD followed by some type of clustering?

The goal of this notebook is semantic clustering of approximately 500 short "type" descriptions for taxonomy development.

Thanks!

  • Nevermind, it seems the problem wasn't with Fabric OR Huggingface. It was the path used by SentenceTransformer(). The following code worked -

    from huggingface_hub import snapshot_download  snapshot_download(     repo_id="sentence-transformers/all-MiniLM-L6-v2",     local_dir="/lakehouse/default/Files/models/all-MiniLM-L6-v2" )

     

1 Reply

  • pborah's avatar
    pborah
    Solution Sage

    Nevermind, it seems the problem wasn't with Fabric OR Huggingface. It was the path used by SentenceTransformer(). The following code worked -

    from huggingface_hub import snapshot_download  snapshot_download(     repo_id="sentence-transformers/all-MiniLM-L6-v2",     local_dir="/lakehouse/default/Files/models/all-MiniLM-L6-v2" )