diff --git a/.circleci/config.yml b/.circleci/config.yml index 439eea8cb5..abee66b777 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -159,4 +159,4 @@ jobs: docker push $IMAGE_NAME:$IMAGE_TAG - slack/status: fail_only: true - webhook: $SLACK_WEBHOOK + webhook: $SLACK_WEBHOOK \ No newline at end of file diff --git a/hub/api/tests/test_dataset.py b/hub/api/tests/test_dataset.py index 41f37a6e62..32cfa798d4 100644 --- a/hub/api/tests/test_dataset.py +++ b/hub/api/tests/test_dataset.py @@ -348,8 +348,8 @@ def test_dataset_batch_write_2(): def test_dataset_hub(): password = os.getenv("ACTIVELOOP_HUB_PASSWORD") login_fn("testingacc", password) - test_dataset("testingacc/test_dataset_private", public=False) - test_dataset("testingacc/test_dataset_public") + test_dataset("testingacc/test_dataset_private_2", public=False) + test_dataset("testingacc/test_dataset_public_2") @pytest.mark.skipif(not gcp_creds_exist(), reason="requires gcp credentials") @@ -753,7 +753,7 @@ def test_dataset_filtering(): "fname": Text((None,), max_shape=(10,)), "lname": Text((None,), max_shape=(10,)), } - ds = Dataset("./test/filtering", shape=(100,), schema=my_schema, mode="w") + ds = Dataset("./data/tests/filtering", shape=(100,), schema=my_schema, mode="w") for i in range(100): ds["fname", i] = "John" ds["lname", i] = "Doe" @@ -803,7 +803,7 @@ def test_dataset_filtering(): "lname": Text((None,), max_shape=(10,)), "image": Image((1920, 1080, 3)), } - ds = Dataset("./test/filtering2", shape=(100,), schema=my_schema2, mode="w") + ds = Dataset("./data/tests/filtering", shape=(100,), schema=my_schema2, mode="w") with pytest.raises(LargeShapeFilteringException): ds.filter({"image": np.ones((1920, 1080, 3))}) with pytest.raises(KeyError): @@ -823,7 +823,7 @@ def test_dataset_filtering_2(): "img": Image((None, None, 3), max_shape=(100, 100, 3)), "cl": ClassLabel(names=["cat", "dog", "horse"]), } - ds = Dataset("./test/filtering_3", shape=(100,), schema=schema, mode="w") + ds = Dataset("./data/tests/filtering_2", shape=(100,), schema=schema, mode="w") for i in range(100): ds["cl", i] = 0 if i % 5 == 0 else 1 ds["img", i] = i * np.ones((5, 6, 3)) @@ -844,7 +844,7 @@ def test_dataset_filtering_3(): "img": Image((None, None, 3), max_shape=(100, 100, 3)), "cl": ClassLabel(names=["cat", "dog", "horse"]), } - ds = Dataset("./test/filtering_3", shape=(100,), schema=schema, mode="w") + ds = Dataset("./data/tests/filtering_3", shape=(100,), schema=schema, mode="w") for i in range(100): ds["cl", i] = 0 if i < 10 else 1 ds["img", i] = i * np.ones((5, 6, 3)) diff --git a/hub/compute/transform.py b/hub/compute/transform.py index 74bf2628bd..86d1530f92 100644 --- a/hub/compute/transform.py +++ b/hub/compute/transform.py @@ -18,7 +18,7 @@ from pathos.pools import ProcessPool, ThreadPool from hub.schema.sequence import Sequence from hub.schema.features import featurify -import posixpath +import os from hub.defaults import OBJECT_CHUNK @@ -123,7 +123,7 @@ def __getitem__(self, slice_): num, ofs = slice_extract_info(slice_list[0], self.shape[0]) ds_view = self._ds[slice_list[0]] - path = posixpath.expanduser("~/.activeloop/tmparray") + path = os.path.expanduser("~/.activeloop/tmparray") new_ds = self.store(path, length=num, ds=ds_view, progressbar=False) index = 1 if len(slice_) > 1 else 0 diff --git a/hub/schema/tests/test_features.py b/hub/schema/tests/test_features.py index aa149b18dc..5f7fa36b19 100644 --- a/hub/schema/tests/test_features.py +++ b/hub/schema/tests/test_features.py @@ -24,14 +24,14 @@ def test_hub_feature_flatten(): def test_feature_dict_str(): - input_dict = {"myint": int, "mystr": str} + input_dict = {"myint": "int64", "mystr": str} feature_dict_object = SchemaDict(input_dict) expected_output = "SchemaDict({'myint': 'int64', 'mystr': '=0.2.2 psutil>=5.7.3 Pillow>=8.0.1 +cloudpickle==1.6.0 +msgpack==1.0.2