I am running into the following HFValidationError. Did my research and couldnt find a solution so far. Anyone with ideas?
Is there a problem with the server side, package incompatibility?
huggingface_hub,utils_validators.HFValidationError: Repo id must be in the form ‘repo_name’ or ‘namespace/repo_name’: Use ‘repo_type’ argument if needed.
I had this same error. my model is stored in a directory named all-MiniLM-L12-v2. It works great. I tried a new model and it had the same error. When I removed the folder called 1_Pooling which has one config.json file in it, the model loading gave the same error. Make sure in your model directory that there is a directory called 1_Pooling with the appropriate config.json file in it.
best regards,
HF requires the repo id to reference a repository that is created on your HF profile. This can either be a dataset, space or simply just a repository. If it does not exist, you can either create it manually, or create the repo beforehand before invoking the call that is resulting in the HFValidationError. Reference the create_repo documentation.
This allows flexibility on creating the repo by either creating it privately by specifying private=true, what type of repo it should be, and whether it should check if the repo exists and if it does not then do not create it by specifying exist_ok=True.
Once it is created, navigate to your HF profile and you will now be able to see the repo created. This is essentially a git repo that has version control.
Not user friendly it really is…
I think it probably snorted as they added on to it.
I’m not sure of the details of your situation, but perhaps the error message is correct: the HF API and related programs assume models by default, so you often need to specify repo_type when dealing with non-models (datasets or spaces).
( repo_id: strfilename: strrepo_type: Optional[str] = Nonerevision: Optional[str] = Nonetoken: Union[str, bool, None] = None )
repo_type (str, optional) — Set to "dataset" or "space" if getting repository info from a dataset or a space, None or "model" if getting repository info from a model. Default is None.