akash-joshi / metacall-ml-example

A repository to host ML examples for Metacall
MIT License
0 stars 1 forks source link

Things needed to deploy to MetaCall #1

Open viferga opened 5 years ago

viferga commented 5 years ago

There is some requirements needed to allow this repository to be deployable in MetaCall.

First of all the metacall.json: { "language_id": "py", "path": ".", "scripts": [ "ml.py" ] }

The file ml.py must contain the functions you want to export (i.e. the function def salary(age)). This will be available as a REST endpoints whenever this project is deployed.

The second requirement is to add requirements.txt. It seems like you are using pandas, and other packages, and not sure if they are provided in the python std library. If they are third party dependencies, there is a need for requirements.txt to work properly.

viferga commented 5 years ago

I have tested it after metacall.json addition, but still not working. There is a need for joblib in requirements.txt. If it does not exists it fails when loading:

Traceback (most recent call last): File "run_model.py", line 11, in <module> from joblib import dump,load ImportError: No module named 'joblib'