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

Issue/1638 model metadata #1671

Merged
merged 2 commits into from Apr 23, 2020

Conversation

RafalSkolasinski
Copy link
Member

@RafalSkolasinski RafalSkolasinski commented Apr 7, 2020

closes #1638

Deprecates metadata method in Python wrapper and introduce init_metadata method.

The init_metadata will be called once after model initialisation to validate and cache returned metadata.
Output of init_metadata is merged with content of MODEL_METADATA environmental variable with values in latter taking priorities.

For prepackaged model server (right now only sklearn) one can either define MODEL_METADATA environmental variables or add metadata.yaml file to the s3 bucket. Please see examples.

@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

You'll be able to see Jupyter notebook diff and discuss changes. Powered by ReviewNB.

@seldondev
Copy link
Collaborator

Tue Apr 7 11:31:06 UTC 2020
The logs for [lint] [2] will show after the pipeline context has finished.
https://github.com/SeldonIO/seldon-core/blob/gh-pages/jenkins-x/logs/SeldonIO/seldon-core/PR-1671/2.log

impatient try
jx get build logs SeldonIO/seldon-core/PR-1671 --build=2

@seldondev
Copy link
Collaborator

Tue Apr 7 11:31:17 UTC 2020
The logs for [pr-build] [1] will show after the pipeline context has finished.
https://github.com/SeldonIO/seldon-core/blob/gh-pages/jenkins-x/logs/SeldonIO/seldon-core/PR-1671/1.log

impatient try
jx get build logs SeldonIO/seldon-core/PR-1671 --build=1

@seldondev seldondev added size/XXL and removed size/XL labels Apr 7, 2020
@seldondev
Copy link
Collaborator

Tue Apr 7 13:33:46 UTC 2020
The logs for [lint] [4] will show after the pipeline context has finished.
https://github.com/SeldonIO/seldon-core/blob/gh-pages/jenkins-x/logs/SeldonIO/seldon-core/PR-1671/4.log

impatient try
jx get build logs SeldonIO/seldon-core/PR-1671 --build=4

@seldondev
Copy link
Collaborator

Tue Apr 7 13:33:51 UTC 2020
The logs for [pr-build] [3] will show after the pipeline context has finished.
https://github.com/SeldonIO/seldon-core/blob/gh-pages/jenkins-x/logs/SeldonIO/seldon-core/PR-1671/3.log

impatient try
jx get build logs SeldonIO/seldon-core/PR-1671 --build=3

@seldondev
Copy link
Collaborator

Wed Apr 8 14:40:38 UTC 2020
The logs for [lint] [6] will show after the pipeline context has finished.
https://github.com/SeldonIO/seldon-core/blob/gh-pages/jenkins-x/logs/SeldonIO/seldon-core/PR-1671/6.log

impatient try
jx get build logs SeldonIO/seldon-core/PR-1671 --build=6

@seldondev
Copy link
Collaborator

Wed Apr 8 14:40:40 UTC 2020
The logs for [pr-build] [5] will show after the pipeline context has finished.
https://github.com/SeldonIO/seldon-core/blob/gh-pages/jenkins-x/logs/SeldonIO/seldon-core/PR-1671/5.log

impatient try
jx get build logs SeldonIO/seldon-core/PR-1671 --build=5

@seldondev
Copy link
Collaborator

Wed Apr 8 22:33:20 UTC 2020
The logs for [lint] [8] will show after the pipeline context has finished.
https://github.com/SeldonIO/seldon-core/blob/gh-pages/jenkins-x/logs/SeldonIO/seldon-core/PR-1671/8.log

impatient try
jx get build logs SeldonIO/seldon-core/PR-1671 --build=8

@seldondev
Copy link
Collaborator

Wed Apr 8 22:33:31 UTC 2020
The logs for [pr-build] [7] will show after the pipeline context has finished.
https://github.com/SeldonIO/seldon-core/blob/gh-pages/jenkins-x/logs/SeldonIO/seldon-core/PR-1671/7.log

impatient try
jx get build logs SeldonIO/seldon-core/PR-1671 --build=7

@seldondev
Copy link
Collaborator

Wed Apr 8 22:40:32 UTC 2020
The logs for [pr-build] [9] will show after the pipeline context has finished.
https://github.com/SeldonIO/seldon-core/blob/gh-pages/jenkins-x/logs/SeldonIO/seldon-core/PR-1671/9.log

impatient try
jx get build logs SeldonIO/seldon-core/PR-1671 --build=9

@seldondev
Copy link
Collaborator

Wed Apr 8 22:41:55 UTC 2020
The logs for [lint] [10] will show after the pipeline context has finished.
https://github.com/SeldonIO/seldon-core/blob/gh-pages/jenkins-x/logs/SeldonIO/seldon-core/PR-1671/10.log

impatient try
jx get build logs SeldonIO/seldon-core/PR-1671 --build=10

@seldondev
Copy link
Collaborator

Wed Apr 8 22:43:45 UTC 2020
The logs for [pr-build] [11] will show after the pipeline context has finished.
https://github.com/SeldonIO/seldon-core/blob/gh-pages/jenkins-x/logs/SeldonIO/seldon-core/PR-1671/11.log

impatient try
jx get build logs SeldonIO/seldon-core/PR-1671 --build=11

@seldondev
Copy link
Collaborator

Wed Apr 8 22:45:06 UTC 2020
The logs for [pr-build] [13] will show after the pipeline context has finished.
https://github.com/SeldonIO/seldon-core/blob/gh-pages/jenkins-x/logs/SeldonIO/seldon-core/PR-1671/13.log

impatient try
jx get build logs SeldonIO/seldon-core/PR-1671 --build=13

@seldondev
Copy link
Collaborator

Wed Apr 8 22:45:07 UTC 2020
The logs for [lint] [12] will show after the pipeline context has finished.
https://github.com/SeldonIO/seldon-core/blob/gh-pages/jenkins-x/logs/SeldonIO/seldon-core/PR-1671/12.log

impatient try
jx get build logs SeldonIO/seldon-core/PR-1671 --build=12

@seldondev
Copy link
Collaborator

Wed Apr 8 22:46:58 UTC 2020
The logs for [lint] [14] will show after the pipeline context has finished.
https://github.com/SeldonIO/seldon-core/blob/gh-pages/jenkins-x/logs/SeldonIO/seldon-core/PR-1671/14.log

impatient try
jx get build logs SeldonIO/seldon-core/PR-1671 --build=14

@seldondev
Copy link
Collaborator

Wed Apr 8 23:07:25 UTC 2020
The logs for [lint] [16] will show after the pipeline context has finished.
https://github.com/SeldonIO/seldon-core/blob/gh-pages/jenkins-x/logs/SeldonIO/seldon-core/PR-1671/16.log

impatient try
jx get build logs SeldonIO/seldon-core/PR-1671 --build=16

@seldondev
Copy link
Collaborator

Wed Apr 8 23:07:28 UTC 2020
The logs for [pr-build] [15] will show after the pipeline context has finished.
https://github.com/SeldonIO/seldon-core/blob/gh-pages/jenkins-x/logs/SeldonIO/seldon-core/PR-1671/15.log

impatient try
jx get build logs SeldonIO/seldon-core/PR-1671 --build=15

@seldondev
Copy link
Collaborator

Tue Apr 14 13:37:30 UTC 2020
The logs for [pr-build] [18] will show after the pipeline context has finished.
https://github.com/SeldonIO/seldon-core/blob/gh-pages/jenkins-x/logs/SeldonIO/seldon-core/PR-1671/18.log

impatient try
jx get build logs SeldonIO/seldon-core/PR-1671 --build=18

@seldondev
Copy link
Collaborator

Tue Apr 14 13:37:32 UTC 2020
The logs for [lint] [17] will show after the pipeline context has finished.
https://github.com/SeldonIO/seldon-core/blob/gh-pages/jenkins-x/logs/SeldonIO/seldon-core/PR-1671/17.log

impatient try
jx get build logs SeldonIO/seldon-core/PR-1671 --build=17

@seldondev
Copy link
Collaborator

Wed Apr 22 16:58:19 UTC 2020
The logs for [pr-build] [67] will show after the pipeline context has finished.
https://github.com/SeldonIO/seldon-core/blob/gh-pages/jenkins-x/logs/SeldonIO/seldon-core/PR-1671/67.log

impatient try
jx get build logs SeldonIO/seldon-core/PR-1671 --build=67

@seldondev
Copy link
Collaborator

Wed Apr 22 16:58:24 UTC 2020
The logs for [lint] [68] will show after the pipeline context has finished.
https://github.com/SeldonIO/seldon-core/blob/gh-pages/jenkins-x/logs/SeldonIO/seldon-core/PR-1671/68.log

impatient try
jx get build logs SeldonIO/seldon-core/PR-1671 --build=68

@seldondev
Copy link
Collaborator

Wed Apr 22 17:08:26 UTC 2020
The logs for [lint] [70] will show after the pipeline context has finished.
https://github.com/SeldonIO/seldon-core/blob/gh-pages/jenkins-x/logs/SeldonIO/seldon-core/PR-1671/70.log

impatient try
jx get build logs SeldonIO/seldon-core/PR-1671 --build=70

@seldondev
Copy link
Collaborator

Wed Apr 22 17:08:30 UTC 2020
The logs for [pr-build] [69] will show after the pipeline context has finished.
https://github.com/SeldonIO/seldon-core/blob/gh-pages/jenkins-x/logs/SeldonIO/seldon-core/PR-1671/69.log

impatient try
jx get build logs SeldonIO/seldon-core/PR-1671 --build=69

@RafalSkolasinski RafalSkolasinski changed the title WIP: Issue/1638 model metadata Issue/1638 model metadata Apr 22, 2020
@RafalSkolasinski
Copy link
Member Author

/test integration
/test notebooks

@seldondev
Copy link
Collaborator

Wed Apr 22 17:12:29 UTC 2020
The logs for [integration] [72] will show after the pipeline context has finished.
https://github.com/SeldonIO/seldon-core/blob/gh-pages/jenkins-x/logs/SeldonIO/seldon-core/PR-1671/72.log

impatient try
jx get build logs SeldonIO/seldon-core/PR-1671 --build=72

@seldondev
Copy link
Collaborator

Wed Apr 22 17:12:31 UTC 2020
The logs for [notebooks] [71] will show after the pipeline context has finished.
https://github.com/SeldonIO/seldon-core/blob/gh-pages/jenkins-x/logs/SeldonIO/seldon-core/PR-1671/71.log

impatient try
jx get build logs SeldonIO/seldon-core/PR-1671 --build=71

Copy link
Contributor

@axsaucedo axsaucedo left a comment

Choose a reason for hiding this comment

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

Looks great, only a couple of minor comments

examples/models/metadata/example-01/Model.py Show resolved Hide resolved
{"name": "my-model-name",
"versions": ["my-model-version-02"],
"platform": "seldon-custom",
"inputs": [{"name": "input", "datatype": "BYTES", "shape": [1]}],
Copy link
Contributor

Choose a reason for hiding this comment

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

why is it bytes?

"""

def __init__(self, name: str, datatype: str, shape: Union[List[int]]):
self.name = str(name)
Copy link
Contributor

Choose a reason for hiding this comment

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

Here it would still be name "None"

Copy link
Member Author

Choose a reason for hiding this comment

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

Only if someone call if with None, here there is no default value.

Copy link
Contributor

Choose a reason for hiding this comment

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

Good point

@RafalSkolasinski
Copy link
Member Author

/retest

@seldondev
Copy link
Collaborator

Wed Apr 22 20:14:41 UTC 2020
The logs for [notebooks] [73] will show after the pipeline context has finished.
https://github.com/SeldonIO/seldon-core/blob/gh-pages/jenkins-x/logs/SeldonIO/seldon-core/PR-1671/73.log

impatient try
jx get build logs SeldonIO/seldon-core/PR-1671 --build=73

@axsaucedo
Copy link
Contributor

Looks good, if we confirm that notebook tests failing are flaky should be good to land!
/test notebooks

@seldondev
Copy link
Collaborator

Wed Apr 22 22:05:28 UTC 2020
The logs for [notebooks] [74] will show after the pipeline context has finished.
https://github.com/SeldonIO/seldon-core/blob/gh-pages/jenkins-x/logs/SeldonIO/seldon-core/PR-1671/74.log

impatient try
jx get build logs SeldonIO/seldon-core/PR-1671 --build=74

@RafalSkolasinski
Copy link
Member Author

RafalSkolasinski commented Apr 23, 2020

Looks good, if we confirm that notebook tests failing are flaky should be good to land!
/test notebooks

Did you manage to see in jx logs which notebook test failed?

I can only see

the build pods for this build have been garbage collected and the log was not found in the long term storage bucket

:(

@axsaucedo
Copy link
Contributor

/test notebooks

@seldondev
Copy link
Collaborator

Thu Apr 23 08:31:32 UTC 2020
The logs for [notebooks] [75] will show after the pipeline context has finished.
https://github.com/SeldonIO/seldon-core/blob/gh-pages/jenkins-x/logs/SeldonIO/seldon-core/PR-1671/75.log

impatient try
jx get build logs SeldonIO/seldon-core/PR-1671 --build=75

@seldondev
Copy link
Collaborator

Thu Apr 23 09:46:52 UTC 2020
The logs for [pr-build] [76] will show after the pipeline context has finished.
https://github.com/SeldonIO/seldon-core/blob/gh-pages/jenkins-x/logs/SeldonIO/seldon-core/PR-1671/76.log

impatient try
jx get build logs SeldonIO/seldon-core/PR-1671 --build=76

@seldondev
Copy link
Collaborator

Thu Apr 23 09:47:01 UTC 2020
The logs for [lint] [77] will show after the pipeline context has finished.
https://github.com/SeldonIO/seldon-core/blob/gh-pages/jenkins-x/logs/SeldonIO/seldon-core/PR-1671/77.log

impatient try
jx get build logs SeldonIO/seldon-core/PR-1671 --build=77

@RafalSkolasinski
Copy link
Member Author

All notebook tests passed for me locally.

Only customMetrics one didn't like that I have zsh as my underlying shell (kubectl run had problems) so I changed that part into a short shell script called explicitly with bash.

@seldondev
Copy link
Collaborator

@RafalSkolasinski: The following test failed, say /retest to rerun them all:

Test name Commit Details Rerun command
notebooks a703319 link /test notebooks

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. I understand the commands that are listed here.

@RafalSkolasinski
Copy link
Member Author

In CI it failed on TestNotebooks.test_ambassador_custom which passed for me locally.

@ukclivecox
Copy link
Contributor

/approve

@seldondev
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: cliveseldon

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@seldondev seldondev merged commit 3d71703 into SeldonIO:master Apr 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

add model metadata support
4 participants