Your First 30 Minutes with Modzy

This page will help you get started with Modzy. You'll be up and running in a jiffy!

Welcome to Modzy!

In this guide we’ll show you how to get started with Modzy in 30 minutes or less. This guide covers finding models, downloading API keys, running inferences, and using many of Modzy’s monitoring features.

:department-store: Find a Model

Let’s start by searching for a model in the Model Library. You can get to the Model Library by clicking on the Models tab in the menu at the top of the page. Search for “Sentiment Analysis” and click on the top result. You can also find Modzy’s open-source sentiment analysis model in the Open Source model creators section.

Searching for a sentiment analysis model in Modzy's model librarySearching for a sentiment analysis model in Modzy's model library

Searching for a sentiment analysis model in Modzy's model library

:car: Run Your First Model

Each model has its own biography, which includes background information, performance metrics, training information, API snippets, and more. Once you’ve looked through some of this documentation for the Sentiment Analysis model, click on the Test Drive tab. Type in any English text you’d like then click on Start Job. When you start a job, Modzy sends your input to the Sentiment Analysis model for inference and returns a prediction of the sentiment detected. For a quick interpretation of the result, look at the “compound” result. If it’s greater than 0.05, the text is determined to be generally positive, if it’s less than -0.05, it’s seen as generally negative. Any values in between are considered neutral.

Sending text to a sentiment analysis model Modzy's "Test Drive" featureSending text to a sentiment analysis model Modzy's "Test Drive" feature

Sending text to a sentiment analysis model Modzy's "Test Drive" feature

:crystal-ball: View Model Results

Once you’ve completed your first Sentiment Analysis inference using the Test Drive feature, you can look at the raw results on the Jobs page. Modzy uses to word “Job” to describe when one or more data inputs are passed through a model. Click on the Operations tab in the menu at the top of the page and then select Jobs in the menu that appears right beneath it.

Viewing the full log of all past AI inferencesViewing the full log of all past AI inferences

Viewing the full log of all past AI inferences

You can find the job you just submitted at the top of the jobs list. Click on the Job ID of the inference you just submitted to see more information. The Job Details page provides access that job’s predictions, inference times, and other metadata.

Viewing the results for a single submission to a sentiment analysis modelViewing the results for a single submission to a sentiment analysis model

Viewing the results for a single submission to a sentiment analysis model

:key: Download Your API Key

Before you can start using Modzy’s APIs you will need an API Key. You can find and download any API keys granted to you from your profile. Click on your name in the menu at the top left of the screen and then click Profile & API Keys.

Link to API KeysLink to API Keys

Link to API Keys

You should see an API key listed for each of the teams to which you belong. If you belong to multiple teams, then you’ll see multiple keys. Find the API key for the applicable team and click on “Get Key” to download your API key.

Downloading an API keyDownloading an API key

Downloading an API key

Next, open the text file downloaded from Modzy to view the full-length key. Modzy’s API keys have a 2-part format, a public portion (the characters to the left of the period) and a private portion (the characters to the right of the period). To work with Modzy’s APIs, you need the full string (with the period in the middle) for authentication. Store this file somewhere safe as you can only download it once.

Full API Key contentsFull API Key contents

Full API Key contents

:computer: Run a Job from Your terminal

Now that you have an API Key, you can directly interact with Modzy’s API. An easy way to do so is to copy the cURL example from the API page of the Sentiment Analysis model. You can also use the example below. You will just need to make the following substitutions before you are ready:

  • Replace BASE_URL with the URL of your instance of Modzy, such as https://app.modzy.com
  • Replace API_KEY with the API key string you just downloaded
curl -X "POST" "BASE_URL/api/jobs" \
     -H 'Content-Type: application/json' \
     -H 'Authorization: ApiKey API_KEY' \
     -d $'{ \
  "model": { \
    "identifier": "ed542963de", \
    "version": "1.0.27" \
  }, \
  "input": { \
    "type": "text", \
    "sources": { \
      "first-phone-call": { \
        "input.txt": "Mr Watson, come here. I want to see you." \
      } \
    } \
  } \
}' \

Once you’ve made those substitutions, open a terminal window, paste in this cURL command, and hit enter. When Modzy receives your request, you will receive a confirmation message with details about your job submission that includes a job ID number, the API key used for the request, and much more. Modzy runs inferences asynchronously, so you can either request your results via an API request (with the /api/results/ endpoint), or you can view them again on the Jobs page.

{
   "model":{
      "identifier":"ed542963de",
      "version":"1.0.27",
      "name":"Sentiment Analysis"
   },
   "status":"SUBMITTED",
   "totalInputs":1,
   "jobIdentifier":"ebe45618-3d2a-4805-a4e6-f5a0257714e8",
   "accessKey":"qOCsemRk8Xb9ev5CPck2",
   "explain":false,
   "jobType":"batch",
   "accountIdentifier":"modzy-account",
   "team":{
      "identifier":"ddba17f8-bec3-49a7-a097-64420e41d654"
   },
   "user":{
      "identifier":"736b0acd-10c4-4e06-9904-700d87a8a927",
      "firstName":"First",
      "lastName":"Last",
      "email":"[email protected]"
   },
   "jobInputs":{
      "identifier":[
         "first-phone-call"
      ]
   },
   "submittedAt":"2021-06-29T00:26:51.168+00:00",
   "imageClassificationModel":false
}

:factory: Monitor Model Operations

Now that you ran a few jobs, visit the Utilization page to get a birds-eye view of the overall model usage in Modzy. Click on Operations -> Utilization to find it. This is also where you can find detailed information about your total cluster utilization which includes CPU and Memory utilization.

Viewing model utilization statsViewing model utilization stats

Viewing model utilization stats

:mountain-cableway: Scale Your Models

Lastly, you may change the auto-scaling settings for the Sentiment Analysis model on the Model Management page in the Operations section. Search for “Sentiment Analysis” in the search bar. Once you see the correct model you can expand the row for that model and version to see usage statistics. You can also adjust auto-scaling settings for this model. To increase the number of copies of a model that are always active, click on the min/max element in the Engine Autoscaling column and adjust the “minimum” value in the dialogue that appears. When set to “0” the model will automatically shut down if it hasn’t been used recently. When set to “1” or greater, then there will always be at least one copy of a model ready for new jobs (aka inferences).

Adjusting model autoscaling settingsAdjusting model autoscaling settings

Adjusting model autoscaling settings

Great work making it through your first 30 minutes in Modzy. If you’re wondering what’s next, there are a couple of ways to do even more with Modzy.


What’s Next

Once you've gotten a feel for Modzy, try building your first AI-powered app in Python, or packaging and deploying your first model

Did this page help you?