-
Notifications
You must be signed in to change notification settings - Fork 168
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
Build a high-frequency Sedna-based end-to-end use case in ModelBox fo… #368
Conversation
@@ -0,0 +1,28 @@ | |||
FROM modelbox/modelbox-develop-tensorflow_2.6.0-cuda_11.2-ubuntu-x86_64:latest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A README file should be added here, to introduce how to use this example.
WORKDIR /home/work | ||
COPY ./lib /home/lib | ||
|
||
COPY examples/incremental_learning/helmet_detection/training/ /home/work/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should be declare in README that How to configure this part code to make it work with ModelBobx.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please check these comments and fix them.
@@ -0,0 +1,28 @@ | |||
FROM modelbox/modelbox-develop-tensorflow_2.6.0-cuda_11.2-ubuntu-x86_64:latest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- What is the difference between this Dockerfile and another Dockerfile in examples directory? Are they duplicated?
- Another question not about this Dockerfile, is incremental_learning-modelbox directory and files under it are duplicated compared to files in incremental_learning/helmet-detection-modelbox directory?
import warnings | ||
|
||
import cv2 | ||
import numpy as np |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make imports more clean and in order.
#include "gmock/gmock.h" | ||
#include "gtest/gtest.h" | ||
#include "modelbox/data_context.h" | ||
#include "modelbox/session_context.h" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make includes clean and in order.
#include <modelbox/flow.h> | ||
#include <iostream> | ||
#include <string> | ||
#include "test_config.h" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make includes clean and in order.
|
||
#include "gtest/gtest.h" | ||
#include "modelbox/base/log.h" | ||
#include "modelbox/base/utils.h" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make includes clean and in order.
@@ -0,0 +1,35 @@ | |||
# |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
src/flowunit/helm_infer/saved_model.pb is large file, and it should not be committed to this repository.
It is suggestted to put the file to GoogleDrive or elsewhere, and put the link here.
@@ -0,0 +1,35 @@ | |||
# |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why there are so many CMakeLists.txt files? Is it needed?
If it is, please give some explaination.
|
||
return modelbox.Status.StatusCode.STATUS_SUCCESS | ||
|
||
def close(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add comment for those functions like this, otherwise it is not readable.
For example, why this function directly returns the status while the function name "close" looks like an action, not a query.
import numpy as np | ||
|
||
# from sedna.common.config import Context | ||
# from sedna.common.file_ops import FileOps |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unused code should not be commited to repository. Please delete this part of code if it is really not used.
|
||
|
||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So many empty lines is not suggestted, please follow the standard code style, for example google python code style, or you can use the IDE to format the code.
|
||
foreach(subdir ${SUBDIRS}) | ||
add_subdirectory(${subdir}) | ||
endforeach() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please keep a new line at the end of the file.
@@ -0,0 +1,86 @@ | |||
/* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is suggestted to add user guide to introduce what is the function of each file like this.
@@ -0,0 +1,60 @@ | |||
# |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is better not to directly copy thirdparty source file here, please try to make these as dependency.
You can consider to move them to Dockerfile.
name: train-worker | ||
imagePullPolicy: IfNotPresent | ||
args: ["train.py"] | ||
env: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clear these variables if not used
2. Connect to the ModelBox orchestration service | ||
|
||
```shell | ||
modelbox-tool develop -q |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
modelbox-tool develop
is unnecessary in demo test
### Prepare Model | ||
|
||
``` | ||
链接:https://pan.baidu.com/s/1Gi5BJ_NQzqj66R8N5OXPzA |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
replace with English
metadata: | ||
name: incremental-dataset | ||
spec: | ||
url: "/data/train_data.txt" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't find this file in the link you provided
name: infer-worker | ||
imagePullPolicy: IfNotPresent | ||
args: ["test_mnist.py"] | ||
env: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems unnecessary
format = "graphviz" | ||
graphconf = '''digraph mnist_sample { | ||
node [shape=Mrecord] | ||
httpserver_sync_receive[type=flowunit, flowunit=httpserver_sync_receive, device=cpu, time_out_ms=5000, endpoint="http://0.0.0.0:8190", max_requests=100] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You need to redirect the port to receive http requests
node [shape=Mrecord] | ||
httpserver_sync_receive[type=flowunit, flowunit=httpserver_sync_receive, device=cpu, time_out_ms=5000, endpoint="http://0.0.0.0:8190", max_requests=100] | ||
mnist_preprocess[type=flowunit, flowunit=mnist_preprocess, device=cpu] | ||
mnist_infer[type=flowunit, flowunit=mnist_infer, device=cpu, deviceid=0, batch_size=1] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems sedna.lib
not imported
@JoeyHwong-gk: changing LGTM is restricted to collaborators In response to this: Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/lgtm |
@JoeyHwong-gk: changing LGTM is restricted to collaborators In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Signed-off-by: Ymh13383894400 <[email protected]>
/lgtm |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jaypume The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
…rmat
What type of PR is this?
What this PR does / why we need it:
Which issue(s) this PR fixes:
Fixes #