10000 feat: tree traversal for reverseQL, filterQL, selectQL by rutujasurve94 · Pull Request #995 · jina-ai/serve · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

feat: tree traversal for reverseQL, filterQL, selectQL #995

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 14 commits into from
Sep 30, 2020

Conversation

rutujasurve94
Copy link
Contributor
  • Added traversal_paths and use_tree_traversal for enabling default tree traversal for QL drivers:

  • SelectQL, ReverseQL, ExcludeQL, filterQL

@jina-bot jina-bot added size/S area/core This issue/PR affects the core codebase area/testing This issue/PR affects testing component/driver labels Sep 29, 2020
Copy link
Member
@maximilianwerk maximilianwerk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good so far. Anyhow, there are lots of more appearances in the code, where the changed drivers are used. All of these places must be visited and changed (e.g. more tests in test_querylang_drivers.py). Basically, wherever one of the drivers appear together with granulartiy_range, adjacency_range, recur_on or recursion_order, there is some need for refactoring.

JoanFM
JoanFM previously approved these changes Sep 29, 2020
Copy link
Member
@hanxiao hanxiao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

7 failed, 246 passed, 18 skipped

CI failed

@rutujasurve94 rutujasurve94 marked this pull request as draft September 29, 2020 14:05
@rutujasurve94
Copy link
Contributor Author

This PR would be merged after https://github.com/jina-ai/jina/pull/993, CI is failing at the moment since these changes depend on #993.

@hanxiao
Copy link
Member
hanxiao commented Sep 29, 2020

ok i merged #933 can you @rutujasurve94 merge master into this branch and try again?

@@ -87,14 +87,14 @@ def validate(req):

f = (Flow().add(uses='DummySegmenter')
.add(
uses='- !SortQL | {field: id, reverse: true, traversal_paths: [r, c, m]}'))
uses='- !SortQL | {field: id, reverse: true, traversal_paths: [\'c\']}'))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test should not pass. It tests, whether all three thing (root docs, matches and chunks) are reversed. If you only reverse chunks, it should fail.

Furthermore, I'd prefer having a plain traversal_paths: [c] instead of escaping characters. It makes the code easier to read.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, reverted traversal_paths to [r, c, m]

@rutujasurve94 rutujasurve94 force-pushed the ql-traversal branch 2 times, most recently from dff04fb to 7c466e2 Compare September 30, 2020 11:16
maximilianwerk
maximilianwerk previously approved these changes Sep 30, 2020
Copy link
Member
@maximilianwerk maximilianwerk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well done! 👍

@maximilianwerk maximilianwerk marked this pull request as ready for review September 30, 2020 12:47
@codecov
Copy link
codecov bot commented Sep 30, 2020

Codecov Report

Merging #995 into master will decrease coverage by 0.26%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #995      +/-   ##
==========================================
- Coverage   79.61%   79.35%   -0.27%     
==========================================
  Files          63       63              
  Lines        4960     4921      -39     
==========================================
- Hits         3949     3905      -44     
- Misses       1011     1016       +5     
Impacted Files Coverage Δ
jina/drivers/index.py 95.23% <100.00%> (+0.23%) ⬆️
jina/drivers/querylang/filter.py 100.00% <100.00%> (ø)
jina/drivers/querylang/reverse.py 100.00% <100.00%> (ø)
jina/drivers/querylang/select.py 79.31% <100.00%> (+0.73%) ⬆️
jina/drivers/querylang/sort.py 100.00% <100.00%> (ø)
jina/drivers/rank.py 97.50% <100.00%> (+0.03%) ⬆️
jina/drivers/reduce.py 100.00% <100.00%> (ø)
jina/drivers/search.py 94.91% <100.00%> (+0.08%) ⬆️
jina/executors/devices.py 50.98% <0.00%> (-6.65%) ⬇️
jina/logging/sse.py 65.33% <0.00%> (-5.04%) ⬇️
... and 14 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7f05743...2f9b377. Read the comment docs.

Copy link
Member
@maximilianwerk maximilianwerk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@maximilianwerk maximilianwerk merged commit f6ca1af into master Sep 30, 2020
@maximilianwerk maximilianwerk deleted the ql-traversal branch September 30, 2020 13:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/core This issue/PR affects the core codebase area/testing This issue/PR affects testing component/driver component/resource size/M
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants
0