Skip to content

Commit

Permalink
v4.1.5 Release (#3019)
Browse files Browse the repository at this point in the history
  • Loading branch information
khustup2 authored Jan 22, 2025
1 parent cf1ba93 commit 495fa60
Show file tree
Hide file tree
Showing 5 changed files with 234 additions and 8 deletions.
7 changes: 5 additions & 2 deletions python/deeplake/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def progress_bar(iterable, *args, **kwargs):
from ._deeplake import *
from deeplake.ingestion import from_coco

__version__ = "4.1.4"
__version__ = "4.1.5"

__all__ = [
"__version__",
Expand Down Expand Up @@ -77,6 +77,9 @@ def progress_bar(iterable, *args, **kwargs):
"UnsupportedChunkCompression",
"InvalidImageCompression",
"InvalidSegmentMaskCompression",
"InvalidMedicalCompression",
"UnexpectedMedicalTypeInputData",
"UnexpectedInputDataForDicomColumn",
"InvalidBinaryMaskCompression",
"DtypeMismatch",
"UnspecifiedDtype",
Expand Down Expand Up @@ -202,7 +205,7 @@ def get_raw_columns(source):
if not col.dtype.is_link and col.dtype.kind in {
deeplake.types.TypeKind.Image,
deeplake.types.TypeKind.SegmentMask,
deeplake.types.TypeKind.BinaryMask
deeplake.types.TypeKind.Medical,
}
]

Expand Down
25 changes: 19 additions & 6 deletions python/deeplake/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ __all__ = [
"UnsupportedChunkCompression",
"InvalidImageCompression",
"InvalidSegmentMaskCompression",
"InvalidMedicalCompression",
"UnexpectedMedicalTypeInputData",
"UnexpectedInputDataForDicomColumn",
"InvalidBinaryMaskCompression",
"DtypeMismatch",
"UnspecifiedDtype",
Expand Down Expand Up @@ -557,7 +560,7 @@ def query(query: str, token: str | None = None) -> DatasetView:
ds.add_column("text", "text")
ds.commit()
ds = deeplake.create("mem://dataset")
ds.add_column("split", "text")
ds.add_column("train_split", "text")
ds.add_column("confidence", "float32")
ds.add_column("label", "text")
ds.commit()
Expand Down Expand Up @@ -604,7 +607,7 @@ def query(query: str, token: str | None = None) -> DatasetView:
# Filter training data
train = deeplake.query('''
SELECT * FROM "mem://dataset"
WHERE "split" = 'train'
WHERE "train_split" = 'train'
AND confidence > 0.9
AND label IN ('cat', 'dog')
''')
Expand Down Expand Up @@ -688,7 +691,7 @@ def query_async(query: str, token: str | None = None) -> Future:
Non-blocking check:
```python
future = deeplake.query_async(
"SELECT * FROM dataset WHERE \\"split\\" = 'train'"
"SELECT * FROM dataset WHERE train_split = 'train'"
)
if future.is_completed():
Expand Down Expand Up @@ -1924,7 +1927,7 @@ class Dataset(DatasetView):
<!-- test-context
```python
import deeplake
ds = deeplake.create("tmp://")
ds = deeplake.create("mem://ds_id")
ds.indexing_mode = deeplake.IndexingMode.Off
ds.add_column("column_name", deeplake.types.Text(deeplake.types.BM25))
a = ['a']*10_000
Expand All @@ -1935,7 +1938,7 @@ class Dataset(DatasetView):
Examples:
```python
ds = deeplake.open("tmp://")
ds = deeplake.open("mem://ds_id")
ds.indexing_mode = deeplake.IndexingMode.Automatic
ds.commit()
```
Expand Down Expand Up @@ -2629,6 +2632,15 @@ class InvalidImageCompression(Exception):
class InvalidSegmentMaskCompression(Exception):
pass

class InvalidMedicalCompression(Exception):
pass

class UnexpectedMedicalTypeInputData(Exception):
pass

class UnexpectedInputDataForDicomColumn(Exception):
pass

class InvalidBinaryMaskCompression(Exception):
pass

Expand Down Expand Up @@ -3115,6 +3127,7 @@ def connect(
ds = deeplake.connect("gcs://bucket/path/to/dataset",
"al://my_org/dataset", creds_key="my_key")
```
"""

def disconnect(url: str, token: str | None = None) -> None:
Expand Down Expand Up @@ -3238,7 +3251,7 @@ def convert(
Supports cloud provider credentials like access keys
token: Optional Activeloop authentication token
<-- test-context
<!-- test-context
```python
import deeplake
deeplake.convert = lambda src, dst, dst_creds = None, token = None: None
Expand Down
8 changes: 8 additions & 0 deletions python/deeplake/schemas.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,14 @@ def TextEmbeddings(embedding_size: int, quantize: bool = False) -> SchemaTemplat
- text_chunk (text): The text of the shard.
- embedding (dtype=float32, size=embedding_size): The embedding of the text.
<!-- test-context
```python
import deeplake
from deeplake import types
ds = deeplake.create("tmp://")
```
-->
Parameters:
embedding_size: int
Size of the embeddings.
Expand Down
1 change: 1 addition & 0 deletions python/deeplake/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"Point",
"QuantizationType",
"SegmentMask",
"Medical",
"Sequence",
"Struct",
"Text",
Expand Down
Loading

0 comments on commit 495fa60

Please sign in to comment.