Skip to content

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

Description

@Mark-Phillipson

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions