dotnet / dotnet/smartcomponents

Build failure: unable to download model_quantized.onnx from Hugging Face

Open
#51 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
508
Forks
61
PR merge metrics
No merged PRs in 30d

Description

### Build failure: unable to download model_quantized.onnx from Hugging Face

**Repository:** dotnet-smartcomponents/smartcomponents

**Environment**
- OS: Windows
- Project: samples/ExampleBlazorApp
- Package: SmartComponents.LocalEmbeddings 0.1.0-preview10145

**Observed behavior**
When running `dotnet build` the build fails while attempting to download a model from Hugging Face. The error indicates the SSL connection could not be established and the transport connection was closed by the remote host.

**Error (excerpt)**
```
Restore complete (0.5s)
ExampleBlazorApp net8.0 failed with 1 error(s) (0.2s)
C:\Users\MPhil\.nuget\packages\smartcomponents.localembeddings\0.1.0-preview10145\build\SmartComponents.LocalEmbeddings.targets(39,9): error MSB3923: Failed to download file "https://huggingface.co/SmartComponents/bge-micro-v2/resolve/72908b7/onnx/model_quantized.onnx". The SSL connection could not be established, see inner exception. ---> Unable to write data to the transport connection: An existing connection was forcibly closed by the remote host.. ---> An existing connection was forcibly closed by the remote host.

Build failed with 1 error(s) in 0.9s
```

**Steps to reproduce**
1. Clone the repository.
2. Open `samples/ExampleBlazorApp`.
3. Run `dotnet build`.
4. Observe the error shown above during restore/build.

**Hypothesis**
The file `onnx/model_quantized.onnx` at the URL above may have been moved, removed, or the Hugging Face path changed. As a result the build-target that attempts to download the file fails with an SSL/connection error.

**Suggested next steps / possible fixes**
- Verify whether the model exists at the Hugging Face URL and update the URL in the NuGet package/targets if it changed.
- Consider bundling a tested model asset with the package or providing a more reliable host or retry/backoff logic in `SmartComponents.LocalEmbeddings.targets`.
- If the model was intentionally removed, update package documentation and targets to reflect the new location or provide guidance for users to obtain the model manually.

**Additional context**
- Reported by user when building locally on Windows (exact output included above).

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.