From 537881d0df97abb677cc23e7c56e07c99bee4c7d Mon Sep 17 00:00:00 2001 From: Lucain Date: Fri, 10 Nov 2023 14:33:20 +0100 Subject: [PATCH 1/2] Fix `/api/repos/move` documentation in api.md Related to https://github.com/huggingface/huggingface_hub/issues/1813. In `/api/repos/move`, we (I? :smile:) forgot to mention the `type` parameter to specify the repo type. cc @enzostvs you would have to update the API Playground as well to add this parameter. Thanks in advance! --- docs/hub/api.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/hub/api.md b/docs/hub/api.md index ea683453d..27b493467 100644 --- a/docs/hub/api.md +++ b/docs/hub/api.md @@ -224,7 +224,8 @@ Payload: ```js payload = { "fromRepo" : "namespace/repo_name", - "toRepo" : "namespace2/repo_name2" + "toRepo" : "namespace2/repo_name2", + "type": "dataset", } ``` From 8ee87458e23e8fa6a70ae40ce27fe96eee5e1c39 Mon Sep 17 00:00:00 2001 From: Wauplin Date: Tue, 14 Nov 2023 09:28:00 +0100 Subject: [PATCH 2/2] patch --- docs/hub/api.md | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/docs/hub/api.md b/docs/hub/api.md index 27b493467..2c616c1b4 100644 --- a/docs/hub/api.md +++ b/docs/hub/api.md @@ -170,7 +170,7 @@ Payload: ```js payload = { - "type":"type", + "type":"model", "name":"name", "organization": "organization", "private":"private", @@ -193,7 +193,7 @@ Payload: ```js payload = { - "type": "type", + "type": "model", "name": "name", "organization": "organization", } @@ -219,13 +219,18 @@ This is equivalent to `huggingface_hub.update_repo_visibility()`. Move a repository (rename within the same namespace or transfer from user to organization). +Parameters: +- `fromRepo`: repo to rename. +- `toRepo`: new name of the repo. +- `type`: Type of repo (dataset or space; model by default). + Payload: ```js payload = { "fromRepo" : "namespace/repo_name", "toRepo" : "namespace2/repo_name2", - "type": "dataset", + "type": "model", } ```