HFvalidationerror: Repo_id must be in the form repo_name
Dear all,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.Best Regards,Mete.
2024-02-21T17:18:15Z
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,
2024-07-04T21:10:58Z
Hello@mtsvnc,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 thecreate_repodocumentation.These are the current create_repo arguments:def create_repo(
        self,
        repo_id: str,
        *,
        token: Union[str, bool, None] = None,
        private: bool = False,
        repo_type: Optional[str] = None,
        exist_ok: bool = False,
        space_sdk: Optional[str] = None,
        space_hardware: Optional[SpaceHardware] = None,
        space_storage: Optional[SpaceStorage] = None,
        space_sleep_time: Optional[int] = None,
        space_secrets: Optional[List[Dict[str, str]]] = None,
        space_variables: Optional[List[Dict[str, str]]] = None,
    )This allows flexibility on creating the repo by either creating it privately by specifyingprivate=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 specifyingexist_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.
2024-07-05T14:01:55Z
It works for me, thx a lot!
2024-09-16T07:21:20Z
I ran into the same error and had a lots troubles dealing with it. Why cannot make it more user-friendly
2024-09-16T08:25:34Z
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 specifyrepo_typewhen dealing with non-models (datasets or spaces).huggingface.coHfApi ClientWe’re on a journey to advance and democratize artificial intelligence through open source and open science.( 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.