From 59be8adc52f2c0e5eef2f1cff2d59aa23ce9c426 Mon Sep 17 00:00:00 2001 From: Wenl4ng <15861868579@163.com> Date: Fri, 14 Mar 2025 15:56:18 +0800 Subject: [PATCH 1/3] fix --- src/openmind_hub/plugins/openmind/om_api.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/openmind_hub/plugins/openmind/om_api.py b/src/openmind_hub/plugins/openmind/om_api.py index 5216e96..91d28fa 100644 --- a/src/openmind_hub/plugins/openmind/om_api.py +++ b/src/openmind_hub/plugins/openmind/om_api.py @@ -1395,12 +1395,14 @@ class OmApi: data = r.json().get("data") data["sha"] = self.get_repo_last_commit(repo_id=repo_id, token=token, revision=revision).oid return DatasetInfo(**data) + except RepositoryNotFoundError: + raise RepositoryNotFoundError(message="该数据集不存在") except Exception as e: retry_count += 1 logger.info(f"Error occurred during dataset_info on attempt {retry_count}/{MAX_RETRIES}: {str(e)}. ") if retry_count == MAX_RETRIES: raise e - time.sleep(2**retry_count) + time.sleep(2) @validate_om_hub_args def space_info( -- Gitee From 2174c7022e7a8ff9c01e6d9037eeca9780755308 Mon Sep 17 00:00:00 2001 From: Wenl4ng <15861868579@163.com> Date: Fri, 14 Mar 2025 16:34:58 +0800 Subject: [PATCH 2/3] fixci --- src/openmind_hub/plugins/openmind/om_api.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/openmind_hub/plugins/openmind/om_api.py b/src/openmind_hub/plugins/openmind/om_api.py index 91d28fa..c862817 100644 --- a/src/openmind_hub/plugins/openmind/om_api.py +++ b/src/openmind_hub/plugins/openmind/om_api.py @@ -1395,8 +1395,8 @@ class OmApi: data = r.json().get("data") data["sha"] = self.get_repo_last_commit(repo_id=repo_id, token=token, revision=revision).oid return DatasetInfo(**data) - except RepositoryNotFoundError: - raise RepositoryNotFoundError(message="该数据集不存在") + except RepositoryNotFoundError as e: + raise RepositoryNotFoundError(message=f"{e}该数据集不存在") except Exception as e: retry_count += 1 logger.info(f"Error occurred during dataset_info on attempt {retry_count}/{MAX_RETRIES}: {str(e)}. ") -- Gitee From d8549517f0693e7b03bfe0b546ebf1918bdaa278 Mon Sep 17 00:00:00 2001 From: Wenl4ng <15861868579@163.com> Date: Fri, 14 Mar 2025 16:44:37 +0800 Subject: [PATCH 3/3] fix --- src/openmind_hub/plugins/openmind/om_api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/openmind_hub/plugins/openmind/om_api.py b/src/openmind_hub/plugins/openmind/om_api.py index c862817..2b08928 100644 --- a/src/openmind_hub/plugins/openmind/om_api.py +++ b/src/openmind_hub/plugins/openmind/om_api.py @@ -1396,7 +1396,7 @@ class OmApi: data["sha"] = self.get_repo_last_commit(repo_id=repo_id, token=token, revision=revision).oid return DatasetInfo(**data) except RepositoryNotFoundError as e: - raise RepositoryNotFoundError(message=f"{e}该数据集不存在") + raise RepositoryNotFoundError(message="该数据集不存在") from e except Exception as e: retry_count += 1 logger.info(f"Error occurred during dataset_info on attempt {retry_count}/{MAX_RETRIES}: {str(e)}. ") -- Gitee