Metadata-Version: 2.1
Name: merlin-sdk
Version: 0.49.0a4
Summary: Python SDK for Merlin
Home-page: https://github.com/caraml-dev/merlin
Author: Merlin
Requires-Python: >=3.8,<3.11
Description-Content-Type: text/markdown
Requires-Dist: boto3>=1.35.39
Requires-Dist: caraml-upi-protos>=0.3.1
Requires-Dist: certifi>=2017.4.17
Requires-Dist: Click<8.1.4,>=7.0
Requires-Dist: cloudpickle==2.0.0
Requires-Dist: cookiecutter>=1.7.2
Requires-Dist: dataclasses-json>=0.5.2
Requires-Dist: docker<=6.1.3
Requires-Dist: GitPython>=3.1.40
Requires-Dist: google-cloud-storage>=1.19.0
Requires-Dist: protobuf<5.0.0,>=3.12.0
Requires-Dist: mlflow==1.26.1
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.26
Requires-Dist: numpy<=1.23.5
Requires-Dist: caraml-auth-google==0.0.0.post7
Requires-Dist: pydantic==2.5.3
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: 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.1.2; extra == "test"
Requires-Dist: types-python-dateutil; extra == "test"
Requires-Dist: types-PyYAML; extra == "test"
Requires-Dist: types-six; extra == "test"
Requires-Dist: types-protobuf; 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](../../examples/xgboost/XGBoost.ipynb)
2. [Deploying sklearn model](../../examples/sklearn/SKLearn.ipynb)
3. [Deploying tensorflow model](../../examples/tensorflow/Tensorflow.ipynb)
4. [Deploying pytorch model](../../examples/pytorch/Pytorch.ipynb)
5. [Deploying user defined model](../../examples/pyfunc/Pyfunc.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
```
