Skip to content

The Playground

The Playground is a web application that provides a user interface for the MLServing API. It is built with Streamlit, a tool that converts Python scripts into simple web applications.

In this article we'll discuss its purpose and intended usage, as well as how it works.

Purpose and Usage

The Playground is primarily an internal tool for machine learning engineers to quickly experiment with their deployed services. It is something of an ad-hoc monitoring and evaluation tool.

While it does not have a role in the experiment lifecycle, the Playground may be used for demonstrations of machine learning services to non-technical audiences. This for now is its primary use case.

How It Works

In contrast to the other auxiliary services, the Playground runs on an always-on Compute Engine instance, with firewall rules exposing the port on which the web application runs.

Using the Instance and Parameters data models of our machine learning services, it builds a Streamlit interface complete with sliders for continuous values, drop-downs and selectors for categorical values, and free-form text boxes for text inputs. With the Prediction data model, it also understands the structure of the responses from each service, and will display these according to that structure.

Because there is no customization needed on an experiment-level, the Playground operates without any extra code required in the experiments themselves.

For the convenience endpoints that wrap public models, such as OpenAI's GPT-3, it converts Instances and Parameters into requests for public SDKs.

It is password protected for an extra layer of security.