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

chore(console): online eval in server instance support examples #1846

Merged
merged 2 commits into from
Feb 18, 2023

Conversation

jialeicui
Copy link
Contributor

@jialeicui jialeicui commented Feb 16, 2023

Description

Make example works on online eval

Client-side:

  1. bundle the example files to the final model tarball in src/.starwhale/examples dir
  2. change the example file path to the path in the tarball (for generating the svc.json config file)
  3. do not serve examples in the model service (useless)

Console-side

  1. provide a resource fetching function for gradio
  2. hijack the gradio configs generated in the model build step
    • wrap the file path with the api prefix and necessary params (file path and token)
    • make sure the gradio will not call the /run/predict backend for fetching the example resource

Gradio-side

example.mp4

Modules

  • UI
  • Controller
  • Agent
  • Client
  • Python-SDK
  • Others

Checklist

  • run code format and lint check
  • add unit test
  • add necessary doc

@codecov
Copy link

codecov bot commented Feb 16, 2023

Codecov Report

Merging #1846 (624765a) into main (28a4741) will increase coverage by 0.70%.
The diff coverage is 73.46%.

@@            Coverage Diff             @@
##             main    #1846      +/-   ##
==========================================
+ Coverage   89.42%   90.12%   +0.70%     
==========================================
  Files          79       79              
  Lines        9643     9675      +32     
==========================================
+ Hits         8623     8720      +97     
+ Misses       1020      955      -65     
Flag Coverage Δ
standalone 90.12% <73.46%> (+0.70%) ⬆️
unittests 90.12% <73.46%> (+0.70%) ⬆️

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

Impacted Files Coverage Δ
client/starwhale/api/_impl/service.py 83.83% <56.66%> (-9.92%) ⬇️
client/starwhale/consts/__init__.py 100.00% <100.00%> (ø)
client/starwhale/core/model/model.py 87.70% <100.00%> (+0.42%) ⬆️
client/starwhale/utils/venv.py 84.59% <0.00%> (+0.50%) ⬆️
client/starwhale/api/_impl/data_store.py 95.41% <0.00%> (+0.65%) ⬆️
client/starwhale/api/_impl/dataset/model.py 99.76% <0.00%> (+1.15%) ⬆️
client/starwhale/core/dataset/type.py 94.46% <0.00%> (+1.43%) ⬆️
...lient/starwhale/integrations/tensorflow/dataset.py 84.61% <0.00%> (+84.61%) ⬆️
...ient/starwhale/integrations/tensorflow/__init__.py 100.00% <0.00%> (+100.00%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@jialeicui jialeicui force-pushed the bundle-example-rc branch 2 times, most recently from f2b66d5 to 63079bd Compare February 16, 2023 08:52
@jialeicui jialeicui marked this pull request as ready for review February 16, 2023 09:16
Copy link
Contributor

@waynelwz waynelwz left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@tianweidut tianweidut left a comment

Choose a reason for hiding this comment

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

LGTM

@tianweidut tianweidut merged commit b4e5871 into star-whale:main Feb 18, 2023
@jialeicui jialeicui deleted the bundle-example-rc branch February 20, 2023 02:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants