This repository was archived by the owner on Sep 9, 2026. It is now read-only.
Commit 8bd0443
feat(v2): add tensorflow embedding, audio, video (#1098)
* feat: add tensorflow tensor
Signed-off-by: anna-charlotte <charlotte.gerhaher@jina.ai>
* feat: wip add tf comp backend
Signed-off-by: anna-charlotte <charlotte.gerhaher@jina.ai>
* fix: comp backend working of TensorFlowTensor, not tf tensor
Signed-off-by: anna-charlotte <charlotte.gerhaher@jina.ai>
* test: remove redundant print statements
Signed-off-by: anna-charlotte <charlotte.gerhaher@jina.ai>
* feat: add comp backend retrieval
Signed-off-by: anna-charlotte <charlotte.gerhaher@jina.ai>
* fix: extract methods that overlap for np and tf backend
Signed-off-by: anna-charlotte <charlotte.gerhaher@jina.ai>
* fix: revert poetry lock change
Signed-off-by: anna-charlotte <charlotte.gerhaher@jina.ai>
* fix: introduce norm callables to transform tftensor
Signed-off-by: anna-charlotte <charlotte.gerhaher@jina.ai>
* docs: clean up
Signed-off-by: anna-charlotte <charlotte.gerhaher@jina.ai>
* fix: retrieval and add docstring
Signed-off-by: anna-charlotte <charlotte.gerhaher@jina.ai>
* fix: add cosine sim for tf backend matrics
Signed-off-by: anna-charlotte <charlotte.gerhaher@jina.ai>
* fix: euclidean dist
Signed-off-by: anna-charlotte <charlotte.gerhaher@jina.ai>
* fix: add typevar to register proto
Signed-off-by: anna-charlotte <charlotte.gerhaher@jina.ai>
* fix: clean up
Signed-off-by: anna-charlotte <charlotte.gerhaher@jina.ai>
* fix: add tft to inits
Signed-off-by: anna-charlotte <charlotte.gerhaher@jina.ai>
* test: add tests for tensorflow tensor
Signed-off-by: anna-charlotte <charlotte.gerhaher@jina.ai>
* fix: mypy checks
Signed-off-by: anna-charlotte <charlotte.gerhaher@jina.ai>
* fix: docarray from native
Signed-off-by: anna-charlotte <charlotte.gerhaher@jina.ai>
* docs: add documentatino and clean up
Signed-off-by: anna-charlotte <charlotte.gerhaher@jina.ai>
* fix: clean up
Signed-off-by: anna-charlotte <charlotte.gerhaher@jina.ai>
* fix: clean up
Signed-off-by: anna-charlotte <charlotte.gerhaher@jina.ai>
* fix: stacked array with tf tensor
Signed-off-by: anna-charlotte <charlotte.gerhaher@jina.ai>
* fix: stack with tftensor
Signed-off-by: anna-charlotte <charlotte.gerhaher@jina.ai>
* test: fix get item test
Signed-off-by: anna-charlotte <charlotte.gerhaher@jina.ai>
* fix: access by slice for tftensor
Signed-off-by: anna-charlotte <charlotte.gerhaher@jina.ai>
* fix: add proto for tf
Signed-off-by: anna-charlotte <charlotte.gerhaher@jina.ai>
* test: introduce pytest tensorflow marker
Signed-off-by: anna-charlotte <charlotte.gerhaher@jina.ai>
* fix: typo in ci.yml
Signed-off-by: anna-charlotte <charlotte.gerhaher@jina.ai>
* fix: try tf import
Signed-off-by: anna-charlotte <charlotte.gerhaher@jina.ai>
* fix: mypy
Signed-off-by: anna-charlotte <charlotte.gerhaher@jina.ai>
* fix: ndarray import
Signed-off-by: anna-charlotte <charlotte.gerhaher@jina.ai>
* fix: tf import
Signed-off-by: anna-charlotte <charlotte.gerhaher@jina.ai>
* test: add tf markers
Signed-off-by: anna-charlotte <charlotte.gerhaher@jina.ai>
* test: fix unit tests
Signed-off-by: anna-charlotte <charlotte.gerhaher@jina.ai>
* test: fix unit tests
Signed-off-by: anna-charlotte <charlotte.gerhaher@jina.ai>
* fix: tf in array stacked
Signed-off-by: anna-charlotte <charlotte.gerhaher@jina.ai>
* test: tf
Signed-off-by: anna-charlotte <charlotte.gerhaher@jina.ai>
* chore: pytest proto marker call with -m
Signed-off-by: anna-charlotte <charlotte.gerhaher@jina.ai>
* fix: instance check use instance shape
Signed-off-by: anna-charlotte <charlotte.gerhaher@jina.ai>
* fix: tf tests
Signed-off-by: anna-charlotte <charlotte.gerhaher@jina.ai>
* fix: test
Signed-off-by: anna-charlotte <charlotte.gerhaher@jina.ai>
* fix: add print statement to debug
Signed-off-by: anna-charlotte <charlotte.gerhaher@jina.ai>
* fix: tf test
Signed-off-by: anna-charlotte <charlotte.gerhaher@jina.ai>
* test: only tf
Signed-off-by: anna-charlotte <charlotte.gerhaher@jina.ai>
* test: remove tests for debugging
Signed-off-by: anna-charlotte <charlotte.gerhaher@jina.ai>
* test: add all tests back to ci yml
Signed-off-by: anna-charlotte <charlotte.gerhaher@jina.ai>
* test: fix import
Signed-off-by: anna-charlotte <charlotte.gerhaher@jina.ai>
* test: ci debugging
Signed-off-by: anna-charlotte <charlotte.gerhaher@jina.ai>
* test: change pytest marker for tf
Signed-off-by: anna-charlotte <charlotte.gerhaher@jina.ai>
* test: change python version back
Signed-off-by: anna-charlotte <charlotte.gerhaher@jina.ai>
* test: revert
Signed-off-by: anna-charlotte <charlotte.gerhaher@jina.ai>
* test: debugging
Signed-off-by: anna-charlotte <charlotte.gerhaher@jina.ai>
* fix: test
Signed-off-by: anna-charlotte <charlotte.gerhaher@jina.ai>
* fix: tests
Signed-off-by: anna-charlotte <charlotte.gerhaher@jina.ai>
* test: ignore paths
Signed-off-by: anna-charlotte <charlotte.gerhaher@jina.ai>
* fix: tests
Signed-off-by: anna-charlotte <charlotte.gerhaher@jina.ai>
* fix: tests
Signed-off-by: anna-charlotte <charlotte.gerhaher@jina.ai>
* refactor: rename norm left and norm right
Signed-off-by: anna-charlotte <charlotte.gerhaher@jina.ai>
* docs: tft docstring
Signed-off-by: anna-charlotte <charlotte.gerhaher@jina.ai>
* docs: add comment to array stacked tf
Signed-off-by: anna-charlotte <charlotte.gerhaher@jina.ai>
* fix: apply suggestion from code review
Co-authored-by: samsja <55492238+samsja@users.noreply.github.com>
Signed-off-by: Charlotte Gerhaher <charlotte.gerhaher@jina.ai>
* fix: apply suggestions from code review
Signed-off-by: anna-charlotte <charlotte.gerhaher@jina.ai>
* test: fix black formatting
Signed-off-by: anna-charlotte <charlotte.gerhaher@jina.ai>
* fix: implement getitem setitem iter for tftensor
Signed-off-by: anna-charlotte <charlotte.gerhaher@jina.ai>
* docs: readme
Signed-off-by: anna-charlotte <charlotte.gerhaher@jina.ai>
* docs: update readme.md
Signed-off-by: anna-charlotte <charlotte.gerhaher@jina.ai>
* fix: remove n dim from abstract method instead use comp be
Signed-off-by: anna-charlotte <charlotte.gerhaher@jina.ai>
* fix: remove proto mark, because only test for proto 3 here
Signed-off-by: anna-charlotte <charlotte.gerhaher@jina.ai>
* fix: tf set item and add tests
Signed-off-by: anna-charlotte <charlotte.gerhaher@jina.ai>
* docs: update tf section in readme.md
Signed-off-by: anna-charlotte <charlotte.gerhaher@jina.ai>
* feat: add tensorflow video audio embedding
Signed-off-by: anna-charlotte <charlotte.gerhaher@jina.ai>
* fix: predefined docs add tf
Signed-off-by: anna-charlotte <charlotte.gerhaher@jina.ai>
* tests: integrations for tf
Signed-off-by: anna-charlotte <charlotte.gerhaher@jina.ai>
* fix: unit tests
Signed-off-by: anna-charlotte <charlotte.gerhaher@jina.ai>
* refactor: use is_tf_available
Signed-off-by: anna-charlotte <charlotte.gerhaher@jina.ai>
* fix: imports
Signed-off-by: anna-charlotte <charlotte.gerhaher@jina.ai>
* fix: audio tensor
Signed-off-by: anna-charlotte <charlotte.gerhaher@jina.ai>
* fix: audio tensor
Signed-off-by: anna-charlotte <charlotte.gerhaher@jina.ai>
* fix: tf import utils misc
Signed-off-by: anna-charlotte <charlotte.gerhaher@jina.ai>
* chore: update ruff
Signed-off-by: anna-charlotte <charlotte.gerhaher@jina.ai>
* chore: update lock file
Signed-off-by: anna-charlotte <charlotte.gerhaher@jina.ai>
* test: add missing tensorflow pytest marker
Signed-off-by: anna-charlotte <charlotte.gerhaher@jina.ai>
* test: fix tf test and clean up
Signed-off-by: anna-charlotte <charlotte.gerhaher@jina.ai>
* test: fix video test tf
Signed-off-by: anna-charlotte <charlotte.gerhaher@jina.ai>
* fix: remove copy paste errors for torch available
Signed-off-by: anna-charlotte <charlotte.gerhaher@jina.ai>
* fix: merge poetry lock
Signed-off-by: anna-charlotte <charlotte.gerhaher@jina.ai>
---------
Signed-off-by: anna-charlotte <charlotte.gerhaher@jina.ai>
Signed-off-by: Charlotte Gerhaher <charlotte.gerhaher@jina.ai>
Co-authored-by: samsja <55492238+samsja@users.noreply.github.com>1 parent d260d2b commit 8bd0443
54 files changed
Lines changed: 2045 additions & 1353 deletions
File tree
- docarray
- array
- documents
- typing
- tensor
- audio
- embedding
- image
- video
- utils
- tests
- integrations
- document
- predefined_document
- typing
- units
- array
- computation_backends/tensorflow_backend
- document
- typing
- tensor
- url
- util
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
31 | | - | |
| 32 | + | |
| 33 | + | |
32 | 34 | | |
33 | | - | |
| 35 | + | |
34 | 36 | | |
35 | 37 | | |
36 | | - | |
| 38 | + | |
| 39 | + | |
37 | 40 | | |
38 | 41 | | |
39 | 42 | | |
40 | | - | |
41 | | - | |
42 | | - | |
| 43 | + | |
43 | 44 | | |
44 | | - | |
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
16 | 21 | | |
17 | 22 | | |
18 | 23 | | |
| |||
102 | 107 | | |
103 | 108 | | |
104 | 109 | | |
105 | | - | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
106 | 113 | | |
107 | 114 | | |
108 | 115 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
17 | 21 | | |
18 | 22 | | |
19 | 23 | | |
| |||
91 | 95 | | |
92 | 96 | | |
93 | 97 | | |
94 | | - | |
95 | | - | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
96 | 102 | | |
97 | 103 | | |
98 | 104 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
14 | 18 | | |
15 | 19 | | |
16 | 20 | | |
| |||
100 | 104 | | |
101 | 105 | | |
102 | 106 | | |
103 | | - | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
104 | 110 | | |
105 | 111 | | |
106 | 112 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
77 | | - | |
| 77 | + | |
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
| |||
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
90 | | - | |
| 90 | + | |
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
95 | | - | |
96 | | - | |
| 95 | + | |
| 96 | + | |
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
| |||
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
129 | | - | |
| 129 | + | |
130 | 130 | | |
131 | 131 | | |
132 | 132 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
17 | 23 | | |
18 | 24 | | |
19 | 25 | | |
| |||
106 | 112 | | |
107 | 113 | | |
108 | 114 | | |
109 | | - | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
110 | 118 | | |
111 | 119 | | |
112 | 120 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
46 | 45 | | |
47 | 46 | | |
48 | 47 | | |
| |||
58 | 57 | | |
59 | 58 | | |
60 | 59 | | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
67 | 67 | | |
68 | | - | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
21 | 20 | | |
22 | 21 | | |
23 | 22 | | |
24 | 23 | | |
25 | 24 | | |
26 | 25 | | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
32 | 33 | | |
33 | 34 | | |
34 | | - | |
| 35 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
10 | 9 | | |
11 | 10 | | |
12 | 11 | | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
0 commit comments