Metadata-Version: 2.1
Name: mrx-runway
Version: 0.0.2409271440
Summary: makina-runway
Author: MRX.dev
Author-email: mrx-devops@makinarocks.ai
Requires-Python: >=3.8,<3.11
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Requires-Dist: boto3 (>=1.21)
Requires-Dist: kserve (>=0.11.2,<0.12)
Requires-Dist: mlflow-skinny (>=2.0,<2.8)
Requires-Dist: numpy (>=1.23.5,<2.0)
Requires-Dist: pandas (>=1.3.5)
Requires-Dist: protobuf (<4.0)
Requires-Dist: pyarrow (>=12.0.1,<13.0)
Requires-Dist: pydantic[dotenv] (>=1.9,<2.0)
Requires-Dist: requests (>=2.20)
Requires-Dist: urllib3 (<2.0)
Description-Content-Type: text/markdown

# Software Development Kit

- support only python

## Goal

- mlflow를 사용하는 사용자들이 import만 변경하여 runway에 logging하는 방식을 제공한다.
- runway sdk 는 mlflow 의 interface/arguments 를 최대한 맞추는 방향으로 구현해야 한다.

```python
# import mlflow
from runway import mlflow

with mlflow.start_run() as run:
    mlflow.log_param()

mlflow.sklearn.save_model()
```

## Install

- makina 사내 pypi server에서 install 합니다.

1. pip install
    ```
    # pip install
    pip install --index-url http://pypi.makina.rocks/simple/ --trusted-host pypi.makina.rocks runway
    ```

    ```
    pyproject.toml의 version 수정 후 테스트 시
    pip install --index-url http://pypi.makina.rocks/simple/ --trusted-host pypi.makina.rocks mrx-runway=={{version}}
    ```

2. poetry 사용
    1) pyproject.toml에 사내 pypi source 추가

        ```
        [[tool.poetry.source]]
        name = "mrx"
        url = "http://pypi.makina.rocks/simple/"
        default = true
        ```
    2) poetry add & install
        ```
        poetry add runway
        poetry install
        ```


## Publish
- 정식 version은 runway repo의 tag로 관리됨
- pyproject.toml 파일의 version은 developer의 test를 위한 pseudo-version 임
- local에서 publish test는 make command 사용
    ```
    # version patch, build & publish 한꺼번에 수행
    make publish-dev
    ```


## How to test in local environment
- sdk 개발시 local 에서 unit test 실행방식은 아래와 같습니다. utest 시에는 다양한 mlframework package 가 설치되니, 별도의 명령어보다는 makefile 의 recipe 를 사용하시기 바랍니다.
```bash
make utest
```bash

## How to develop
- sdk 개발을 위한 `python` 환경을 하나 더 생성합니다.
- edit 모드로 sdk를 설치 합니다.
```bash
pip install -e .
```
- /etc/hosts에 minio관련 host를 추가합니다.
- `misc/gw.yaml`, `misc/vs.yaml`을 수정하여 배포합니다.
- `prepare_develop.sh`파일에 `BACKEND_URL`, `MLFLOW_URL`, `MINIO_URL`를 환경에 맞게 수정합니다.
- `prepare_develop.sh`를 실행합니다.
```bash
./prepare_develop.sh
```
- 실행
```bash
DEPLOY_TARGET=dev python examples/sample_log_model.py
```

