Metadata-Version: 2.1
Name: merlin-sdk
Version: 0.26.0rc7
Summary: Python SDK for Merlin
Home-page: https://github.com/gojek/merlin
Author: Merlin
License: UNKNOWN
Platform: UNKNOWN
Requires-Python: >=3.7,<3.11
Description-Content-Type: text/markdown
Requires-Dist: boto3 (>=1.9.84)
Requires-Dist: caraml-upi-protos (>=0.3.1)
Requires-Dist: certifi (>=2017.4.17)
Requires-Dist: Click (>=7.0)
Requires-Dist: cloudpickle (==2.0.0)
Requires-Dist: cookiecutter (>=1.7.2)
Requires-Dist: docker (>=4.2.1)
Requires-Dist: google-auth (>=1.11.0)
Requires-Dist: google-cloud-storage (>=1.19.0)
Requires-Dist: mlflow (<=1.23.0,>=1.2.0)
Requires-Dist: protobuf (<4.0.0,>=3.0.0)
Requires-Dist: PyPrind (>=2.11.2)
Requires-Dist: python-dateutil (>=2.5.3)
Requires-Dist: PyYAML (>=5.4)
Requires-Dist: six (>=1.10)
Requires-Dist: urllib3 (>=1.23)
Requires-Dist: numpy (<=1.23.5)
Provides-Extra: test
Requires-Dist: google-cloud-bigquery-storage (>=0.7.0) ; extra == 'test'
Requires-Dist: google-cloud-bigquery (>=1.18.0) ; extra == 'test'
Requires-Dist: grpcio (<1.49.0,>=1.31.0) ; extra == 'test'
Requires-Dist: joblib (<1.2.0,>=0.13.0) ; extra == 'test'
Requires-Dist: mypy (>=0.812) ; extra == 'test'
Requires-Dist: pytest-cov ; extra == 'test'
Requires-Dist: pytest-dependency ; extra == 'test'
Requires-Dist: pytest-xdist ; extra == 'test'
Requires-Dist: pytest ; extra == 'test'
Requires-Dist: recursive-diff (>=1.0.0) ; extra == 'test'
Requires-Dist: requests ; extra == 'test'
Requires-Dist: scikit-learn (==1.0.2) ; extra == 'test'
Requires-Dist: types-python-dateutil ; extra == 'test'
Requires-Dist: types-PyYAML ; extra == 'test'
Requires-Dist: types-six ; extra == 'test'
Requires-Dist: urllib3-mock (>=0.3.3) ; extra == 'test'
Requires-Dist: xarray ; extra == 'test'
Requires-Dist: xgboost (==1.6.2) ; extra == 'test'

# Merlin SDK

This project contains python library for interacting with Merlin, machine
learning model serving component of CaraML.
It provides interface to:

- Manage ML project resources
- Track metrics and training performance
- Package and Deploy Model

## Installation

```shell script
pip install merlin-sdk
```

and authenticate to gcloud

```bash
gcloud auth application-default login
```

## Getting Started

The easiest way to get started is to explore example notebook:

1. [Deploying xgboost model](sample/xgboost/Sample.ipynb)
2. [Deploying sklearn model](sample/sklearn/Sample.ipynb)
3. [Deploying tensorflow model](sample/tensorflow/Sample.ipynb)
4. [Deploying pytorch model](sample/pytorch/Sample.ipynb)
5. [Deploying user defined model](sample/pyfunc/Sample.ipynb)

# Development

Requirements:

- pipenv (`pip install pipenv`)
- swagger code gen (`brew install swagger-codegen`)

Setup development environment:

```bash
make setup
```

## Merlin CLI

With the CLI, users can deploy a trained model (serialized model) without touching Python code at all.

![](merlin_cli.gif)

To use the CLI:

```
// to see available subcommands
merlin --help

// to see subcommand options
merlin SUBCOMMAND --help

// deploy existing xgboost model located inside cur_model_dir
merlin deploy --url localhost --model-type xgboost --project sample --model-dir cur_model_dir --model-name xgboost-sample --env staging

// undeploy xgboost-sample version 1
merlin undeploy --url localhost --project sample --model-name xgboost-sample --model-version=1

// generate pyfunc code base
merlin scaffold -p merlin-project -m model-name -e id
```


