Skip to content
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

refactor(types): allow doc building from arbitrary json/dict #1877

Merged
merged 3 commits into from Feb 5, 2021

Conversation

hanxiao
Copy link
Member

@hanxiao hanxiao commented Feb 5, 2021

No description provided.

@hanxiao hanxiao requested a review from a team as a code owner February 5, 2021 10:45
@jina-bot jina-bot added size/M area/cli This issue/PR affects the command line interface area/core This issue/PR affects the core codebase area/daemon area/helper This issue/PR affects the helper functionality area/setup This issue/PR affects setting up Jina area/testing This issue/PR affects testing component/driver component/flow component/jaml component/type labels Feb 5, 2021
@codecov
Copy link

codecov bot commented Feb 5, 2021

Codecov Report

Merging #1877 (e4ab296) into master (52731fb) will decrease coverage by 1.79%.
The diff coverage is 50.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1877      +/-   ##
==========================================
- Coverage   85.96%   84.17%   -1.80%     
==========================================
  Files         146      146              
  Lines        6982     6982              
==========================================
- Hits         6002     5877     -125     
- Misses        980     1105     +125     
Impacted Files Coverage Δ
jina/executors/segmenters/__init__.py 91.66% <ø> (ø)
jina/flow/builder.py 73.91% <0.00%> (ø)
jina/drivers/querylang/queryset/dunderkey.py 100.00% <100.00%> (ø)
jina/flow/base.py 78.80% <100.00%> (-9.23%) ⬇️
jina/jaml/helper.py 87.02% <100.00%> (-6.88%) ⬇️
jina/peapods/runtimes/jinad/client.py 80.14% <100.00%> (+5.14%) ⬆️
jina/clients/request/asyncio.py 0.00% <0.00%> (-89.48%) ⬇️
jina/jaml/parsers/flow/v1.py 48.14% <0.00%> (-48.15%) ⬇️
jina/clients/asyncio.py 51.51% <0.00%> (-36.37%) ⬇️
jina/jaml/parsers/flow/legacy.py 22.72% <0.00%> (-20.46%) ⬇️
... and 12 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 52731fb...0184453. Read the comment docs.

@github-actions
Copy link

github-actions bot commented Feb 5, 2021

Latency summary

Current PR yields:

  • 😶 index QPS at 1031, delta to last 3 avg.: +0%
  • 😶 query QPS at 18, delta to last 3 avg.: -1%

Breakdown

Version Index QPS Query QPS
current 1031 18
0.9.28 1003 18
0.9.27 1070 18

Backed by latency-tracking. Further commits will update this comment.

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.

Quite some magic in the CamelCase -> underscore_lower_case. But great thing to get this json conversion nailed.

@hanxiao
Copy link
Member Author

hanxiao commented Feb 5, 2021

Quite some magic in the CamelCase -> underscore_lower_case. But great thing to get this json conversion nailed.

this is provided by protobuf library btw

.. highlight:: python
.. code-block:: python

d = Document({'id': '123', 'hello': 'world', 'tags': {'good': 'bye'}})
Copy link
Member

Choose a reason for hiding this comment

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

Love this one!

@hanxiao hanxiao merged commit 5e2767a into master Feb 5, 2021
@hanxiao hanxiao deleted the refactor-doc-from-dict branch February 5, 2021 11:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/cli This issue/PR affects the command line interface area/core This issue/PR affects the core codebase area/helper This issue/PR affects the helper functionality area/setup This issue/PR affects setting up Jina area/testing This issue/PR affects testing component/driver component/flow component/jaml component/type size/M
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants