-
Notifications
You must be signed in to change notification settings - Fork 235
feat: add map function #1187
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
feat: add map function #1187
Changes from all commits
Commits
Show all changes
51 commits
Select commit
Hold shift + click to select a range
3d45f57
feat: add apply function
9a07808
test: add benchmark tests
5709f97
fix: apply
366b6df
fix: benchmark test
6e8ff7c
test: benchmark
89eaf62
fix: apply
545d9ec
fix: clean up
d871363
chore: remove benchmark tests from general tests
8a436ae
chore: fix ci
c581b58
feat: add threading option and benchmark test
8bf57fb
test: use both backend options in tests
0c3524c
feat: add batching to abstract array
c335895
feat: add apply_batch and _map_batch and tests
cc23e4e
test: fix load from da
73c0d84
docs: update docstrings
b7c2cae
docs: add example for apply
3eb0c30
fix: mypy
7c6cb2f
refactor: clean up
afa5837
refactor: make batch method private
c69585a
fix: apply
8a3437a
Test: add for apply batch
66b78b3
fix: benchmark test increase ndocs
35e090a
test: clean up
3019522
test: try to fix
313d318
test: try to fix test
0afd5bd
fix: test
fdcfa23
fix: test
fc91dbf
fix: apply suggestions from code review
0d7cd1b
fix: remove print statemetns
b4c672b
fix: apply samis suggestion
18a377b
fix: add tests for func da to doc and da to other len da
245283f
fix: revert last commit
76fe8b7
test: add len assert
34b7f9c
test: add assertions
c7a968d
test: add test to for da extend in batch apply
6cf8ed2
test: extend with only one doc
5dc9e6d
test: fix
d3fc203
fix: test
45cdc4a
fix: test
9839602
fix: set docs in apply
87a93ff
fix: indices
eeb7fae
fix: indices
72aaf21
fix: indices
c0f8029
fix: indices
9b83c1f
fix:test
7638d86
fix: mypy
4a3a290
fix: type hint
38aae7a
fix: remove apply, only keep map
01900c9
refactor: map to map_docs
f6921e0
fix: apply suggestion
c3fb041
docs: add example usage
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -117,7 +117,7 @@ jobs: | |
| - name: Test | ||
| id: test | ||
| run: | | ||
| poetry run pytest -m "not tensorflow" ${{ matrix.test-path }} | ||
| poetry run pytest -m "not (tensorflow or benchmark)" ${{ matrix.test-path }} | ||
| timeout-minutes: 30 | ||
| # env: | ||
| # JINA_AUTH_TOKEN: "${{ secrets.JINA_AUTH_TOKEN }}" | ||
|
|
@@ -162,7 +162,7 @@ jobs: | |
| - name: Test | ||
| id: test | ||
| run: | | ||
| poetry run pytest -m "not tensorflow" ${{ matrix.test-path }} | ||
| poetry run pytest -m "not (tensorflow or benchmark)" ${{ matrix.test-path }} | ||
| timeout-minutes: 30 | ||
|
|
||
|
|
||
|
|
@@ -222,10 +222,35 @@ jobs: | |
| poetry run pytest -m 'tensorflow' tests | ||
| timeout-minutes: 30 | ||
|
|
||
| docarray-test-benchmarks: | ||
| needs: [lint-ruff, check-black, import-test] | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| python-version: [3.7] | ||
| steps: | ||
| - uses: actions/[email protected] | ||
| - name: Set up Python ${{ matrix.python-version }} | ||
| uses: actions/setup-python@v4 | ||
| with: | ||
| python-version: ${{ matrix.python-version }} | ||
| - name: Prepare environment | ||
| run: | | ||
| python -m pip install --upgrade pip | ||
| python -m pip install poetry | ||
| poetry install --all-extras | ||
|
|
||
| - name: Test | ||
| id: test | ||
| run: | | ||
| poetry run pytest -m 'benchmark' tests | ||
| timeout-minutes: 30 | ||
|
|
||
|
|
||
| # just for blocking the merge until all parallel core-test are successful | ||
| success-all-test: | ||
| needs: [docarray-test, docarray-test-proto3, docarray-test-tensorflow, import-test, check-black, check-mypy, lint-ruff] | ||
| needs: [docarray-test, docarray-test-proto3, docarray-test-tensorflow, docarray-test-benchmarks, import-test, check-black, check-mypy, lint-ruff] | ||
| if: always() | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.