Hydrospheredata / hydro-serving

MLOps Platform
http://docs.hydrosphere.io
Apache License 2.0
271 stars 42 forks source link

How do we define a contract in serving.yaml for a function call - fn(....) #220

Closed ravimadhusudhan8 closed 5 years ago

ravimadhusudhan8 commented 5 years ago

Say for example there is a function add(x,y) in ../models/add/src/func_main.py What would the serving.yaml look like?

Trying to deploy functions as services(models) to be used in stages within an Application.

Thanks

tidylobster commented 5 years ago

Hi, you can see the examples in the getting-started page. Also, there're a more detailed description of possible values available here. For your example it might be something like:

...

contract:
  add:
    inputs:
      x:
        shape: scalar
        type: int32
      y: 
        shape: scalar
        type: int32
    outputs:
      z:
        shape: scalar
        type: int32
ravimadhusudhan8 commented 5 years ago

That is very useful thanks for getting back!