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

Is it possible to pass init parameters to Predictor class through seldon-core-microservice #2250

Closed
zyxue opened this issue Aug 7, 2020 · 3 comments
Labels
triage Needs to be triaged and prioritised accordingly

Comments

@zyxue
Copy link
Contributor

zyxue commented Aug 7, 2020

my custom model is like:

class MyPredictor:
    def __init__(self, model_path):
        self._model = load(model_path)

    def predict(self, features, names, meta=None):
        transformed = transform(features)
        prediction = calc_prediction(transformed)
        return prediction

I wonder if there is a way to pass value to model_path through seldon-core-microservice?

Went throught the source code, https://github.com/SeldonIO/seldon-core/blob/master/python/seldon_core/microservice.py#L212-L296, there doesn't seem to be one. Am I missing some thing or is there another way to do something like this?

@zyxue zyxue added the triage Needs to be triaged and prioritised accordingly label Aug 7, 2020
@zyxue zyxue changed the title Is it possible to specify model path for seldon-core-microservice Is it possible to pass init parameters to Predictor class through seldon-core-microservice Aug 7, 2020
@ukclivecox
Copy link
Contributor

@zyxue
Copy link
Contributor Author

zyxue commented Aug 7, 2020

@zyxue zyxue closed this as completed Aug 7, 2020
@nishantgandhi99
Copy link

In case someone come looking for example:

$ seldon-core-microservice InferenceModel --service-type MODEL --debug --parameters '[{"name":"model_path", "value":"value", "type": "STRING"}]'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage Needs to be triaged and prioritised accordingly
Projects
None yet
Development

No branches or pull requests

3 participants