knights-analytics / hugot

Huggingface transformer pipelines in Golang
Apache License 2.0
279 stars 13 forks source link

Add support for validating whether an ONNX model exists in a repo's subdirectory #34

Closed gregfurman closed 3 months ago

gregfurman commented 3 months ago

The huggingface downloader does not allow for specifying a subdirectory when validating a model and tokenizer.

So in the example of distilbert/distilbert-base-uncased-finetuned-sst-2-english there is an onnx subdirectory that contains all the files of interest but the validation fails since this is not in the root.

Not sure how best to do this but you could look at:

riccardopinosio commented 3 months ago

I think this might be a bug as the validator should already accept subfolders, will investigate

riccardopinosio commented 3 months ago

Indeed was a bug, thanks for catching it! I added a fix and a test for it, will be in the next release.