From 8f639b07829587f43ef18db005ba28f3af3368f3 Mon Sep 17 00:00:00 2001 From: Sylvestre Date: Wed, 8 Nov 2023 11:28:58 +0100 Subject: [PATCH 1/5] Add createdAt exception --- docs/hub/api.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/docs/hub/api.md b/docs/hub/api.md index 4a33c07ac..61b11076c 100644 --- a/docs/hub/api.md +++ b/docs/hub/api.md @@ -46,12 +46,16 @@ params = { This is equivalent to `huggingface_hub.list_models()`. +The key `createdAt` in the response begins on `2022-03-02T23:29:04.000Z` as a result of a special migration. + ### GET /api/models/{repo_id} or /api/models/{repo_id}/revision/{revision} Get all information for a specific model. This is equivalent to `huggingface_hub.model_info(repo_id, revision)`. +The key `createdAt` in the response begins on `2022-03-02T23:29:04.000Z` as a result of a special migration. + ### GET /api/models-tags-by-type Gets all the available model tags hosted in the Hub. @@ -86,6 +90,8 @@ params = { This is equivalent to `huggingface_hub.list_datasets()`. +The key `createdAt` in the response begins on `2022-03-02T23:29:04.000Z` as a result of a special migration. + ### GET /api/datasets/{repo_id} or /api/datasets/{repo_id}/revision/{revision} Get all information for a specific dataset. @@ -100,6 +106,8 @@ params = {"full": "full"} This is equivalent to `huggingface_hub.dataset_info(repo_id, revision)`. +The key `createdAt` in the response begins on `2022-03-02T23:29:04.000Z` as a result of a special migration. + ### GET /api/datasets/{repo_id}/parquet Get the list of auto-converted parquet files. @@ -142,11 +150,20 @@ params = { This is equivalent to `huggingface_hub.list_spaces()`. +The key `createdAt` in the response begins on `2022-03-02T23:29:04.000Z` as a result of a special migration. + ### GET /api/spaces/{repo_id} or /api/spaces/{repo_id}/revision/{revision} Get all information for a specific model. This is equivalent to `huggingface_hub.space_info(repo_id, revision)`. +The key `createdAt` in the response begins on `2022-03-02T23:29:04.000Z` as a result of a special migration. + +### GET /api/metrics + +Get information from all metrics in the Hub. + +This is equivalent to `huggingface_hub.list_metrics()`. ## Repo API From 767d97d02142d4b8b1fb27cdef073f47ae8d33e5 Mon Sep 17 00:00:00 2001 From: Sylvestre Date: Thu, 9 Nov 2023 13:01:05 +0100 Subject: [PATCH 2/5] Try to make it more visible --- docs/hub/api.md | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/docs/hub/api.md b/docs/hub/api.md index 61b11076c..f59cc81e7 100644 --- a/docs/hub/api.md +++ b/docs/hub/api.md @@ -13,10 +13,15 @@ Try it out now on our [Playground](https://huggingface.co/spaces/enzostvs/hub-ap + ## Repo listing API The following endpoints help get information about models, datasets, Spaces, and metrics stored on the Hub. + +When making API calls to retrieve information about repositories, the `createdAt` attribute indicates the time when the respective repository was created. It's important to note that there is a unique value, '2022-03-02T23:29:04.000Z,' assigned to all repositories that were created before we began storing creation dates. + + ### GET /api/models Get information from all models in the Hub. The response is paginated, use the [`Link` header](https://docs.github.com/en/rest/guides/using-pagination-in-the-rest-api?apiVersion=2022-11-28#link-header) to get the next pages. You can specify additional parameters to have more specific results. @@ -46,16 +51,12 @@ params = { This is equivalent to `huggingface_hub.list_models()`. -The key `createdAt` in the response begins on `2022-03-02T23:29:04.000Z` as a result of a special migration. - ### GET /api/models/{repo_id} or /api/models/{repo_id}/revision/{revision} Get all information for a specific model. This is equivalent to `huggingface_hub.model_info(repo_id, revision)`. -The key `createdAt` in the response begins on `2022-03-02T23:29:04.000Z` as a result of a special migration. - ### GET /api/models-tags-by-type Gets all the available model tags hosted in the Hub. @@ -90,8 +91,6 @@ params = { This is equivalent to `huggingface_hub.list_datasets()`. -The key `createdAt` in the response begins on `2022-03-02T23:29:04.000Z` as a result of a special migration. - ### GET /api/datasets/{repo_id} or /api/datasets/{repo_id}/revision/{revision} Get all information for a specific dataset. @@ -106,8 +105,6 @@ params = {"full": "full"} This is equivalent to `huggingface_hub.dataset_info(repo_id, revision)`. -The key `createdAt` in the response begins on `2022-03-02T23:29:04.000Z` as a result of a special migration. - ### GET /api/datasets/{repo_id}/parquet Get the list of auto-converted parquet files. @@ -150,15 +147,11 @@ params = { This is equivalent to `huggingface_hub.list_spaces()`. -The key `createdAt` in the response begins on `2022-03-02T23:29:04.000Z` as a result of a special migration. - ### GET /api/spaces/{repo_id} or /api/spaces/{repo_id}/revision/{revision} Get all information for a specific model. This is equivalent to `huggingface_hub.space_info(repo_id, revision)`. -The key `createdAt` in the response begins on `2022-03-02T23:29:04.000Z` as a result of a special migration. - ### GET /api/metrics Get information from all metrics in the Hub. @@ -354,4 +347,4 @@ This is equivalent to `huggingface_hub.update_collection_item()`. Remove an item from a collection. You must know the item object id which is different from the repo_id/paper_id provided when adding the item to the collection. The `item_id` can be retrieved by fetching the collection. -This is equivalent to `huggingface_hub.delete_collection_item()`. +This is equivalent to `huggingface_hub.delete_collection_item()`. \ No newline at end of file From 0590829d3bc7023202bdb901d18c2f20c7cdba9e Mon Sep 17 00:00:00 2001 From: Sylvestre Date: Thu, 9 Nov 2023 13:02:50 +0100 Subject: [PATCH 3/5] cleanup --- docs/hub/api.md | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/docs/hub/api.md b/docs/hub/api.md index f59cc81e7..f7d3e1f66 100644 --- a/docs/hub/api.md +++ b/docs/hub/api.md @@ -152,11 +152,6 @@ Get all information for a specific model. This is equivalent to `huggingface_hub.space_info(repo_id, revision)`. -### GET /api/metrics - -Get information from all metrics in the Hub. - -This is equivalent to `huggingface_hub.list_metrics()`. ## Repo API @@ -347,4 +342,4 @@ This is equivalent to `huggingface_hub.update_collection_item()`. Remove an item from a collection. You must know the item object id which is different from the repo_id/paper_id provided when adding the item to the collection. The `item_id` can be retrieved by fetching the collection. -This is equivalent to `huggingface_hub.delete_collection_item()`. \ No newline at end of file +This is equivalent to `huggingface_hub.delete_collection_item()`. From 91d41290a689f875cddfece58f00c2dc28f8e1f4 Mon Sep 17 00:00:00 2001 From: Sylvestre Date: Thu, 9 Nov 2023 13:03:09 +0100 Subject: [PATCH 4/5] cleanup --- docs/hub/api.md | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/hub/api.md b/docs/hub/api.md index f7d3e1f66..45181170e 100644 --- a/docs/hub/api.md +++ b/docs/hub/api.md @@ -13,7 +13,6 @@ Try it out now on our [Playground](https://huggingface.co/spaces/enzostvs/hub-ap - ## Repo listing API The following endpoints help get information about models, datasets, Spaces, and metrics stored on the Hub. From 33efb451f664650b68f70cc54d5a04c246fae669 Mon Sep 17 00:00:00 2001 From: Sylvestre Date: Thu, 9 Nov 2023 13:46:51 +0100 Subject: [PATCH 5/5] some tries for formatting --- docs/hub/api.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/hub/api.md b/docs/hub/api.md index 45181170e..ea683453d 100644 --- a/docs/hub/api.md +++ b/docs/hub/api.md @@ -18,7 +18,7 @@ Try it out now on our [Playground](https://huggingface.co/spaces/enzostvs/hub-ap The following endpoints help get information about models, datasets, Spaces, and metrics stored on the Hub. -When making API calls to retrieve information about repositories, the `createdAt` attribute indicates the time when the respective repository was created. It's important to note that there is a unique value, '2022-03-02T23:29:04.000Z,' assigned to all repositories that were created before we began storing creation dates. +When making API calls to retrieve information about repositories, the createdAt attribute indicates the time when the respective repository was created. It's important to note that there is a unique value, 2022-03-02T23:29:04.000Z assigned to all repositories that were created before we began storing creation dates. ### GET /api/models