Skip to main content

A python client to interact with Machine Learning microservices hosted on Lift Wing

Project description

liftwing Python Package

Make request to machine learning models hosted on Lift Wing - the Wikimedia Foundation's ML model serving platform

The LiftWing python module works as a client man for developers making API requests. With this package developers will be able to import their desired API and make requests to it.

Installation

Install the python package named liftwing using pip:

pip install liftwing

After installing the package you can list the available models

python -m liftwing

Using the package

We can make requests to a model server:

from liftwing import RevertRiskAPIModel

client = RevertRiskAPIModel()
result = client.request(payload={"lang": "en", "rev_id": "123456"})

print(result)

Result:

{
   "model_name":"revertrisk-language-agnostic",
   "model_version":"3",
   "wiki_db":"enwiki",
   "revision_id":"123456",
   "output":{
      "prediction":false,
      "probabilities":{
         "true":0.25512129068374634,
         "false":0.7448787093162537
      }
   }
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

liftwing-0.1.0.tar.gz (3.5 kB view hashes)

Uploaded Source

Built Distribution

liftwing-0.1.0-py3-none-any.whl (5.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page