mlflow-watsonml


Namemlflow-watsonml JSON
Version 0.11.4 PyPI version JSON
download
home_pagehttps://github.com/IBM/mlflow-watsonml
SummaryWatsonML MLflow deployment plugin
upload_time2023-11-27 20:52:27
maintainer
docs_urlNone
authorIBM AI Model Factory team
requires_python>=3.9
license
keywords
VCS
bugtrack_url
requirements ibm_watson_machine_learning mlflow python-dotenv boto3
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Mlflow-WatsonML

A plugin that integrates [WatsonML](http://ibm-wml-api-pyclient.mybluemix.net) with MLflow pipeline.
``mlflow_watsonml`` enables mlflow users to deploy mlflow pipeline models into WatsonML.
Command line APIs of the plugin (also accessible through mlflow's python package) makes the deployment process seamless.

## Installation
Plugin package which is available in pypi and can be installed using

```bash
pip install mlflow-watsonml
```

## What does it do
Installing this package uses python's entrypoint mechanism to register the plugin into MLflow's plugin registry. This registry will be invoked each time you launch MLflow script or command line argument.

## Authentication
In order to connect to WatsonML, refer to [.env.template](.env.template)


### Create deployment
The `create` command line argument and ``create_deployment`` python
APIs does the deployment of a model built with MLflow to WatsonML.

##### CLI
```shell script
mlflow deployments create -t watsonml -m <model-uri> --name <deployment-name> -C "software_spec_type=runtime-22.2-py3.10"
```

##### Python API
```python
from mlflow.deployments import get_deploy_client

target_uri = 'watsonml'
plugin = get_deploy_client(target_uri)

plugin.create_deployment(
    name=<deployment-name>, 
    model_uri=<model-uri>, 
    config={"software_spec_type": "runtime-22.2-py3.10"}
)
```

### Update deployment
Update API can used to modify the configuration parameters such as number of workers, version etc., of an already deployed model.
WatsonML will make sure the user experience is seamless while changing the model in a live environment.

##### CLI
```shell script
mlflow deployments update -t watsonml --name <deployment name> -C "software_spec_type=runtime-22.1-py3.10"
```

##### Python API
```python
plugin.update_deployment(name=<deployment name>, config={"software_spec_type": "runtime-22.1-py3.10"})
```

### Delete deployment
Delete an existing deployment. Exception will be raised if the model is not already deployed.

##### CLI
```shell script
mlflow deployments delete -t watsonml --name <deployment name / version number>
```

##### Python API
```python
plugin.delete_deployment(name=<deployment name>)
```

### List all deployments
Lists the names of all the models deployed on the configured WatsonML.

##### CLI
```shell script
mlflow deployments list -t watsonml
```

##### Python API
```python
plugin.list_deployments()
```

### Get deployment details
Get API fetches the details of the deployed model. By default, Get API fetches all the versions of the deployed model.

##### CLI
```shell script
mlflow deployments get -t watsonml --name <deployment name>
```

##### Python API
```python
plugin.get_deployment(name=<deployment name>)
```

### Run Prediction on deployed model
Predict API enables to run prediction on the deployed model.

For the prediction inputs, DataFrame and JSON formats are supported. The python API supports all of these three formats. When invoked via command line, one needs to pass the json file path that contains the inputs.

##### CLI
```shell script
mlflow deployments predict -t watsonml --name <deployment name> --input-path <input file path> --output-path <output file path>
```

output-path is an optional parameter. Without output path parameter result will be printed in console.

##### Python API
```python
plugin.predict(name=<deployment name>, df=<prediction input>)
```

### Plugin help
Run the following command to get the plugin help string.

##### CLI
```shell script
mlflow deployments help -t watsonml
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/IBM/mlflow-watsonml",
    "name": "mlflow-watsonml",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": "",
    "keywords": "",
    "author": "IBM AI Model Factory team",
    "author_email": "dhruv.shah@ibm.com",
    "download_url": "https://files.pythonhosted.org/packages/eb/e8/b1f0642b01f7dc7a29dfcca915f0bf626e5b3ff43d9d3744db080a0ab3e3/mlflow-watsonml-0.11.4.tar.gz",
    "platform": null,
    "description": "# Mlflow-WatsonML\n\nA plugin that integrates [WatsonML](http://ibm-wml-api-pyclient.mybluemix.net) with MLflow pipeline.\n``mlflow_watsonml`` enables mlflow users to deploy mlflow pipeline models into WatsonML.\nCommand line APIs of the plugin (also accessible through mlflow's python package) makes the deployment process seamless.\n\n## Installation\nPlugin package which is available in pypi and can be installed using\n\n```bash\npip install mlflow-watsonml\n```\n\n## What does it do\nInstalling this package uses python's entrypoint mechanism to register the plugin into MLflow's plugin registry. This registry will be invoked each time you launch MLflow script or command line argument.\n\n## Authentication\nIn order to connect to WatsonML, refer to [.env.template](.env.template)\n\n\n### Create deployment\nThe `create` command line argument and ``create_deployment`` python\nAPIs does the deployment of a model built with MLflow to WatsonML.\n\n##### CLI\n```shell script\nmlflow deployments create -t watsonml -m <model-uri> --name <deployment-name> -C \"software_spec_type=runtime-22.2-py3.10\"\n```\n\n##### Python API\n```python\nfrom mlflow.deployments import get_deploy_client\n\ntarget_uri = 'watsonml'\nplugin = get_deploy_client(target_uri)\n\nplugin.create_deployment(\n    name=<deployment-name>, \n    model_uri=<model-uri>, \n    config={\"software_spec_type\": \"runtime-22.2-py3.10\"}\n)\n```\n\n### Update deployment\nUpdate API can used to modify the configuration parameters such as number of workers, version etc., of an already deployed model.\nWatsonML will make sure the user experience is seamless while changing the model in a live environment.\n\n##### CLI\n```shell script\nmlflow deployments update -t watsonml --name <deployment name> -C \"software_spec_type=runtime-22.1-py3.10\"\n```\n\n##### Python API\n```python\nplugin.update_deployment(name=<deployment name>, config={\"software_spec_type\": \"runtime-22.1-py3.10\"})\n```\n\n### Delete deployment\nDelete an existing deployment. Exception will be raised if the model is not already deployed.\n\n##### CLI\n```shell script\nmlflow deployments delete -t watsonml --name <deployment name / version number>\n```\n\n##### Python API\n```python\nplugin.delete_deployment(name=<deployment name>)\n```\n\n### List all deployments\nLists the names of all the models deployed on the configured WatsonML.\n\n##### CLI\n```shell script\nmlflow deployments list -t watsonml\n```\n\n##### Python API\n```python\nplugin.list_deployments()\n```\n\n### Get deployment details\nGet API fetches the details of the deployed model. By default, Get API fetches all the versions of the deployed model.\n\n##### CLI\n```shell script\nmlflow deployments get -t watsonml --name <deployment name>\n```\n\n##### Python API\n```python\nplugin.get_deployment(name=<deployment name>)\n```\n\n### Run Prediction on deployed model\nPredict API enables to run prediction on the deployed model.\n\nFor the prediction inputs, DataFrame and JSON formats are supported. The python API supports all of these three formats. When invoked via command line, one needs to pass the json file path that contains the inputs.\n\n##### CLI\n```shell script\nmlflow deployments predict -t watsonml --name <deployment name> --input-path <input file path> --output-path <output file path>\n```\n\noutput-path is an optional parameter. Without output path parameter result will be printed in console.\n\n##### Python API\n```python\nplugin.predict(name=<deployment name>, df=<prediction input>)\n```\n\n### Plugin help\nRun the following command to get the plugin help string.\n\n##### CLI\n```shell script\nmlflow deployments help -t watsonml\n```\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "WatsonML MLflow deployment plugin",
    "version": "0.11.4",
    "project_urls": {
        "Homepage": "https://github.com/IBM/mlflow-watsonml"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "138ff87df307d92ec92156c42de4352796ccff77bd6651eba7801fa814209baa",
                "md5": "5bcbd9f32c6403039239a6e198ad84e3",
                "sha256": "81b3f9c9265806bdc75bbf8d44dacaa7fc13ecbb2a444392efd44473718052a9"
            },
            "downloads": -1,
            "filename": "mlflow_watsonml-0.11.4-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "5bcbd9f32c6403039239a6e198ad84e3",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 19962,
            "upload_time": "2023-11-27T20:52:26",
            "upload_time_iso_8601": "2023-11-27T20:52:26.727312Z",
            "url": "https://files.pythonhosted.org/packages/13/8f/f87df307d92ec92156c42de4352796ccff77bd6651eba7801fa814209baa/mlflow_watsonml-0.11.4-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ebe8b1f0642b01f7dc7a29dfcca915f0bf626e5b3ff43d9d3744db080a0ab3e3",
                "md5": "f320716cee0854858c60bf074c42ca3a",
                "sha256": "aa9fd1302ea96009eb2bc08821e30bf7cc7619ebb2a00d461ad330250f7f0645"
            },
            "downloads": -1,
            "filename": "mlflow-watsonml-0.11.4.tar.gz",
            "has_sig": false,
            "md5_digest": "f320716cee0854858c60bf074c42ca3a",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 20309,
            "upload_time": "2023-11-27T20:52:27",
            "upload_time_iso_8601": "2023-11-27T20:52:27.862760Z",
            "url": "https://files.pythonhosted.org/packages/eb/e8/b1f0642b01f7dc7a29dfcca915f0bf626e5b3ff43d9d3744db080a0ab3e3/mlflow-watsonml-0.11.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-11-27 20:52:27",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "IBM",
    "github_project": "mlflow-watsonml",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "ibm_watson_machine_learning",
            "specs": [
                [
                    "==",
                    "1.0.327"
                ]
            ]
        },
        {
            "name": "mlflow",
            "specs": [
                [
                    ">=",
                    "2.6.0"
                ]
            ]
        },
        {
            "name": "python-dotenv",
            "specs": [
                [
                    "~=",
                    "1.0.0"
                ]
            ]
        },
        {
            "name": "boto3",
            "specs": [
                [
                    ">=",
                    "1.24.59"
                ]
            ]
        }
    ],
    "lcname": "mlflow-watsonml"
}
        
Elapsed time: 0.26989s