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 1a860c6cb5..57fef3461b 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -2,7 +2,7 @@ name: Feature request about: Suggest an idea for this project title: "[FEATURE]" -labels: "enhancement" +labels: "i: enhancement, i: needs triage" assignees: '' --- 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: 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 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()