From 25248fb227e5641759dccf2a9fb74959f74902c7 Mon Sep 17 00:00:00 2001 From: Anselm Hahn Date: Thu, 17 Dec 2020 15:08:21 +0100 Subject: [PATCH 1/4] Add automatic labels --- .github/ISSUE_TEMPLATE/bug_report.md | 4 ++-- .github/ISSUE_TEMPLATE/feature_request.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index cc23b2a4f0..9a643475cb 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -2,8 +2,8 @@ name: Bug report about: Create a report to help us improve title: "[BUG]" -labels: '' -assignees: '' +labels: "i: bug, i: needs triage" +assignees: "" --- diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index 5177a3f45c..e97b127ed2 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -2,8 +2,8 @@ name: Feature request about: Suggest an idea for this project title: "[FEATURE]" -labels: '' -assignees: '' +labels: "i: enhancement, i: needs triage" +assignees: "" --- From 5c7ccde5ec5158033bccd9cb26a5081949e2f154 Mon Sep 17 00:00:00 2001 From: Anselm Hahn Date: Thu, 17 Dec 2020 15:09:57 +0100 Subject: [PATCH 2/4] Add labels for automatic assignments Add labels for automatic assignments if it is a bug, feature or PR --- .github/PULL_REQUEST_TEMPLATE/PULL_REQUEST_TEMPLATE.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/PULL_REQUEST_TEMPLATE/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE/PULL_REQUEST_TEMPLATE.md index 99b3ec1dba..d3eb0a31b7 100644 --- a/.github/PULL_REQUEST_TEMPLATE/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE/PULL_REQUEST_TEMPLATE.md @@ -1,3 +1,12 @@ +--- +name: Pull request +about: "" +title: "[PR]" +labels: "i: pull-request, i: needs triage" +assignees: "" + +--- + ## 🚀 🚀 Pull Request ### All Submissions: From c79b4acd7d06df2085b167aac272ccf4e60003d5 Mon Sep 17 00:00:00 2001 From: Edward Grigoryan Date: Tue, 29 Dec 2020 11:39:14 +0400 Subject: [PATCH 3/4] Fixed the issue --- hub/__init__.py | 4 +++- hub/collections/dataset/core.py | 2 +- hub/tests/test_hub_init.py | 10 ++++++++++ 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/hub/__init__.py b/hub/__init__.py index c88e962012..463336094f 100644 --- a/hub/__init__.py +++ b/hub/__init__.py @@ -11,7 +11,7 @@ from hub.compute import transform from hub.log import logger import traceback -from hub.exceptions import DaskModuleNotInstalledException +from hub.exceptions import DaskModuleNotInstalledException, HubDatasetNotFoundException def local_mode(): @@ -47,6 +47,8 @@ def load(tag): return ds except ImportError: raise DaskModuleNotInstalledException + except HubDatasetNotFoundException: + raise except Exception as e: pass # logger.warning(traceback.format_exc() + str(e)) diff --git a/hub/collections/dataset/core.py b/hub/collections/dataset/core.py index 3224e4ea07..ebae7fe09b 100644 --- a/hub/collections/dataset/core.py +++ b/hub/collections/dataset/core.py @@ -690,7 +690,7 @@ def load(tag, creds=None, session_creds=True) -> Dataset: fs, path = _load_fs_and_path(tag, creds, session_creds=session_creds) fs: fsspec.AbstractFileSystem = fs path_2 = f"{path}/meta.json" - if not fs.exists(path): + if not fs.exists(path_2): raise HubDatasetNotFoundException(tag) with fs.open(path_2, "r") as f: diff --git a/hub/tests/test_hub_init.py b/hub/tests/test_hub_init.py index 963d45ceed..8594ca20f0 100644 --- a/hub/tests/test_hub_init.py +++ b/hub/tests/test_hub_init.py @@ -1,3 +1,6 @@ +from hub.exceptions import HubDatasetNotFoundException +import pytest + import hub import hub.config from hub.utils import dask_loaded @@ -22,6 +25,13 @@ def test_load(caplog): assert isinstance(obj, hub.Dataset) == True +def test_load_wrong_dataset(): + try: + obj = hub.load("./data/dataset_that_does_not_exist") + except Exception as ex: + assert isinstance(ex, HubDatasetNotFoundException) + + if __name__ == "__main__": test_local_mode() test_dev_mode() From 862529202bcf49dbfa8fab32b21aab59d607892c Mon Sep 17 00:00:00 2001 From: sohamsshah Date: Wed, 6 Jan 2021 22:56:03 +0530 Subject: [PATCH 4/4] add README Badge Section in README.md --- README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/README.md b/README.md index d664534ba2..4d11368398 100644 --- a/README.md +++ b/README.md @@ -176,6 +176,16 @@ Activeloop’s Hub format lets you achieve faster inference at a lower cost. We Check these and many more popular datasets on our [visualizer web app](https://app.activeloop.ai/datasets/popular) and load them directly for model training! +## README Badge + +Using Hub? Add a README badge to let everyone know: + + +[![hub](https://img.shields.io/badge/powered%20by-hub%20-ff5a1f.svg)](https://github.com/activeloopai/Hub) + +``` +[![hub](https://img.shields.io/badge/powered%20by-hub%20-ff5a1f.svg)](https://github.com/activeloopai/Hub) +``` ## Disclaimers