in order to add automated CI to ML functions you need to register your repo in CircleCI and add the following YAML file to the .circleci/config.yml
path.
You can also add a badge to your project like the one above, check the source of this MD file to see how
version: 2
jobs:
build:
docker:
- image: python:3.6
steps:
- checkout
- run: pip install mlrun
- run: mlrun run --handler my_func --param-file params.csv --dump myfunc.py
The YAML instructs CircleCI to run a job every time you commit code to the branch, the Job will do the following:
- Load a docker image (specified) and pull the code into it
- Install MLRun package
- Test the function handler my_func in myfunc.py
Note: it will run multiple tests, each test will use a set of parameters (a line) from the specified parameter file, at the end it will print (
--dump
) the run results as YAML