Skip to content

acceleratedscience/openad_service_utils

Repository files navigation

OpenAD Model Wrapper

A library to onboard models to the OpenAD toolkit

License MIT Code style: black Docs Linux macOS Python

About

The OpenAD Model Wrapper is a Python library that simplifies the process of deploying machine learning models as production-ready services. It is specifically designed for scientific use cases, such as molecular property prediction (e.g., solubility, toxicity) and de novo molecular generation.

By wrapping your model with this library, you can:

  • Standardize Your Model's API: Expose your model through a standardized API, making it easy to integrate with other tools and workflows.
  • Seamlessly Integrate with the OpenAD Toolkit: The wrapper is designed to work out-of-the-box with the OpenAD Toolkit, a powerful platform for accelerated discovery.
  • Simplify Deployment: The library provides a straightforward path to containerizing your model with Docker and deploying it to scalable platforms like Kubernetes.

Getting Started

1. Installation

Requirements:

pip install git+https://github.com/acceleratedscience/openad_service_utils.git@0.5.1

2. Wrapping Your Model

To wrap your model, you can use one of the provided templates. See the Sample Configuration Templates for examples of how to wrap different types of models.

For a step-by-step guide, see the Foundational Tutorial.

3. Running the Service

Once you have wrapped your model, you can start the service by running your Python script. I will be served by default on http://localhost:8080

4. Using with Openad Toolkit

The Openad Toolkit allows us to run inference through a TUI. See detailed docs here

Install the toolkit.

pip install openad
openad

Now connect your model and run an inference.

>>> catalog model service from remote 'http://localhost:8080' as 'my_model'

>>> my_model ? # see detailed information about your model

>>> my_model <COMMAND> # run an inference based off your model configuration

Documentation

For more detailed documentation, please see the docs directory. The documentation includes information on:

About

Utility library to extend an existing model to OpenAD Toolkit and give it an API interface.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •