8000 feat: add mindspore to cookbook by bwanglzu · Pull Request #2474 · jina-ai/serve · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

feat: add mindspore to cookbook #2474

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 12 commits into from
May 26, 2021
Merged

feat: add mindspore to cookbook #2474

merged 12 commits into from
May 26, 2021

Conversation

bwanglzu
Copy link
Member
@bwanglzu bwanglzu commented May 25, 2021

Add mindspore to Jina 2.0 cookbook. tested .

@bwanglzu bwanglzu self-assigned this May 25, 2021
@bwanglzu bwanglzu requested a review from a team as a code owner May 25, 2021 09:41
@bwanglzu bwanglzu requested review from CatStark, slettner and nan-wang and removed request for a team May 25, 2021 09:41
@jina-bot jina-bot added size/S area/housekeeping This issue/PR is housekeeping labels May 25, 2021
@codecov
Copy link
codecov bot commented May 25, 2021

Codecov Report

Merging #2474 (679408a) into master (5df7689) will increase coverage by 0.05%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2474      +/-   ##
==========================================
+ Coverage   83.46%   83.52%   +0.05%     
==========================================
  Files         152      152              
  Lines        9425     9425              
==========================================
+ Hits         7867     7872       +5     
+ Misses       1558     1553       -5     
Flag Coverage Δ
daemon 47.03% <ø> (ø)
jina 83.34% <ø> (+0.05%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
jina/peapods/runtimes/jinad/client.py 82.48% <0.00%> (-5.11%) ⬇️
jina/peapods/zmq/__init__.py 85.20% <0.00%> (+2.07%) ⬆️
jina/clients/base.py 82.00% <0.00%> (+3.00%) ⬆️
jina/peapods/runtimes/asyncio/grpc/async_call.py 98.11% <0.00%> (+3.77%) ⬆️

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 5df7689...679408a. Read the comment docs.

Base automatically changed from feat-add-paddle-snippets-to-cookbook-1 to master May 25, 2021 15:17
Copy link
Member
@nan-wang nan-wang left a comment

Choose a reason for hiding this comment

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

minor change

class MindsporeMwuExecutor(Executor):
def __init__(self, **kwargs):
super().__init__()
context.set_context(mode=context.PYNATIVE_MODE, device_target="CPU")
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
context.set_context(mode=context.PYNATIVE_MODE, device_target="CPU")
context.set_context(mode=context.PYNATIVE_MODE, device_target='CPU')
8000

@requests
def encode(self, docs, **kwargs):
for doc in docs:
input_tensor = Tensor(
Copy link
Contributor

Choose a reason for hiding this comment

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

can u make it not pass black? I think it looks leaner?

def __init__(self, **kwargs):
super().__init__()
context.set_context(mode=context.PYNATIVE_MODE, device_target='CPU')
self.dims = 5
Copy link
Contributor

Choose a reason for hiding this comment

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

you do not need self.dims

@JoanFM JoanFM dismissed nan-wang’s stale review May 26, 2021 12:56

taken care

@JoanFM JoanFM merged commit 9a8d842 into master May 26, 2021
@JoanFM JoanFM deleted the feat-add-mindspore branch May 26, 2021 12:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/housekeeping This issue/PR is housekeeping size/S
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
0