From 37eeb66af848342348a724b4cfb086e881bd78a6 Mon Sep 17 00:00:00 2001 From: Sami Jaghouar Date: Tue, 17 Jan 2023 13:59:01 +0100 Subject: [PATCH 1/2] chore: update readme for release Signed-off-by: Sami Jaghouar --- README.md | 20 ++++++++++++++------ docarray/__init__.py | 2 +- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 1749be81838..4dd7041243c 100644 --- a/README.md +++ b/README.md @@ -212,13 +212,21 @@ doc = MyDoc(tensor=torch.zeros(3, 224, 224)) # works doc = MyDoc(tensor=torch.zeros(224, 224, 3)) # works by reshaping doc = MyDoc(tensor=torch.zeros(224)) # fails validation + class Image(BaseDocument): tensor: TorchTensor[3, 'x', 'x'] - -Image(tensor = torch.zeros(3, 224, 224)) # works -Image(tensor = torch.zeros(3, 64, 128)) # fails validation because second dimension does not match third -Image(tensor = torch.zeros(4, 224 ,224 )) # fails validation because of the first dimension -Image(tensor = torch.zeros(3 ,64)) # fails validation because it does not have enough dimensions + + +Image(tensor=torch.zeros(3, 224, 224)) # works +Image( + tensor=torch.zeros(3, 64, 128) +) # fails validation because second dimension does not match third +Image( + tensor=torch.zeros(4, 224, 224) +) # fails validation because of the first dimension +Image( + tensor=torch.zeros(3, 64) +) # fails validation because it does not have enough dimensions ``` ## Coming from a vector database @@ -268,7 +276,7 @@ match = store.find(Image(embedding=np.zeros((128,))), field='text__embedding', t to try out the alpha you can install it via git: ```shell -pip install "git+https://github.com/docarray/docarra@alphav2-0.1#egg=docarray[common,torch,image]" +pip install "git+https://github.com/docarray/docarra@2023.01.17.alpha#egg=docarray[common,torch,image]" ``` or from the latest development branch ```shell diff --git a/docarray/__init__.py b/docarray/__init__.py index 54eb3a3bdf7..5c5b33c76b3 100644 --- a/docarray/__init__.py +++ b/docarray/__init__.py @@ -1,4 +1,4 @@ -__version__ = '0.1.0' +__version__ = '2023.01.17.alpha' from docarray.array.array import DocumentArray from docarray.base_document.document import BaseDocument From 10c160a922897e90ea9ff73a1815f66bcc6a7388 Mon Sep 17 00:00:00 2001 From: samsja <55492238+samsja@users.noreply.github.com> Date: Tue, 17 Jan 2023 14:13:48 +0100 Subject: [PATCH 2/2] feat: apply charllote suggestion Co-authored-by: Charlotte Gerhaher Signed-off-by: samsja <55492238+samsja@users.noreply.github.com> --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 4dd7041243c..8a8605d85b4 100644 --- a/README.md +++ b/README.md @@ -276,7 +276,7 @@ match = store.find(Image(embedding=np.zeros((128,))), field='text__embedding', t to try out the alpha you can install it via git: ```shell -pip install "git+https://github.com/docarray/docarra@2023.01.17.alpha#egg=docarray[common,torch,image]" +pip install "git+https://github.com/docarray/docarray@2023.01.17.alpha#egg=docarray[common,torch,image]" ``` or from the latest development branch ```shell