huggingface / huggingface/setfit

HFValidationError when loading the model

Open
#94 20 comments 4 reactions 0 assignees View on GitHub
Dominant language
Jupyter Notebook
Stars
2.8k
Forks
267
Avg merge
36m
Merged PRs (30d)
5

Description

Hi there! I am trying to load a model I have stored at Google Drive for inferencing:

```
# Load SetFit model
tuned_model = SetFitModel.from_pretrained("/content/drive/My Drive/models/tuned-model")
# Run inference
tuned_model(["i didnt feel humiliated", "i feel romantic too", "im grabbing a minute to post i feel greedy wrong"])
```

But I get the following error:

`
HFValidationError: Repo id must be in the form 'repo_name' or 'namespace/repo_name': '/content/drive/My Drive/models /tuned-model'. Use repo_type argument if needed.
`

it works however when I load it from the same script in which I have saved it, by:

```
# Save trained model to disk
trainer.model.save_pretrained("/content/drive/My Drive/models/tuned-model")
```

What can be the problem? Can't just I save/load from pretrained to Google Drive?

Many thanks in advance for your support and terrific work.

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.