In this article, we will build on some lessons learned in our first look at HPE PCAI. This article will specifically focus on our journey to add an NVIDIA Blueprint to the HPE PCAI system. NVIDIA Blueprints are "pre-defined, customizable AI workflows designed to assist developers in creating and deploying generative AI applications."

To accomplish the task of building a blueprint, we have to set up some tools in the system, including a Jupyter Notebook, deploy a model or use an existing one, and deploying the blueprint itself.

First and foremost we had to get the Jupyter notebook setup not only for assisting in the deployment but also for verification that the blueprint is working correctly. One of the coolest things about HPE's PCAI system is the fact that they make it extremely easy to deploy and use Jupyter notebooks as it is built into the system by default. 

Juypter Notebook home screen

This notebook deploys by default to each new user, but if you want to setup an additional notebook you can follow the deployment wizard and customize it for your particular needs.

Jupyter Notebook Custom 
Jupyter Notebook Custom 2

Once inside the notebook you can start setting up the code and deploying the model to be used for the blueprint. 

Jupyter Notebook Example

Now that we have defined the notebook and started integrating the tools to build the blueprint, we need one more pre-defined tool to be accessible for our particular blueprint to be functional. This tool is called HPE MLIS, which is user-friendly Machine Learning Inference Software designed to simplify and control the deployment, management, and monitoring of a machine learning (ML) model at scale. This again is preloaded in HPE PCAI and what is needed to turn it on is go to the Administration settings section and under Tools & Frameworks click to install as below.

Once installed you will be able to see it under the Data Science section.

Now that is installed and working we can go onto the next part of getting model downloaded and then the blueprint setup.

With HPE MLIS installed, we proceeded with downloading models and setting up our blueprint.

To deploy a model:

  • Navigate to Data Science under Tools & Frameworks.
A screenshot of a computer

AI-generated content may be incorrect.
  • Open HPE MLIS via its card or URL.
  • Click "Registries" on the left menu; add a new registry using the top-right button.
A white background with blue text

AI-generated content may be incorrect.
  • On this screen, create a registry for our model by selecting NGC from the dropdown, giving it a name, and clicking the create registry button.
A screenshot of a computer

AI-generated content may be incorrect.

 

Once the registry is created, we moved on to creating a packaged model:

  • Click Packaged models on the left menu.
A close-up of a computer screen

AI-generated content may be incorrect.
  • Click the add new model button in the top right corner.
  • In the Your model tab, provide a name and description for the model, then click next.
A screenshot of a computer

AI-generated content may be incorrect.

 

  • In the Storage tab, select the registry created earlier from the dropdown. Choose the model to deploy from the populated list, then click next.
A screenshot of a computer

AI-generated content may be incorrect.

 

  • Allocate resources to the model in the Resources tab, using templates available in the dropdown. Click next to proceed to the Advanced tab.
A screenshot of a computer

AI-generated content may be incorrect.

 

  • No changes are needed in the Advanced tab, so click Create Model to finalize the packaged model.
A screenshot of a computer

AI-generated content may be incorrect.

 

With the model created, we moved on to deployment:

  • Click Deployments on the left menu and click the Create new deployment button in the top right corner.
A close-up of a computer screen

AI-generated content may be incorrect.
  • In the Deployment tab, provide a name for the deployment.
A screenshot of a computer

AI-generated content may be incorrect.
  • In the Packaged model tab, select the model from the dropdown.
A screenshot of a computer

AI-generated content may be incorrect.

 

  • Skip the infrastructure tab and go to Scaling. Use the fixed-1 option from the dropdown to keep one inference service replica always available.
A screenshot of a computer

AI-generated content may be incorrect.
  • In the Advanced tab, no changes are needed, so click Done to start the deployment.

Once the deployment is ready, an endpoint URL will be provided to interact with the model.

A close up of a screen

AI-generated content may be incorrect.

 

To use the model in a blueprint:

  • Go to the GitHub repository with the blueprint and copy the GitHub URL to clone it.
A screenshot of a computer

AI-generated content may be incorrect.

 

  • In Jupyter Notebook, go to the Git tab and click Clone a Repository. Paste the URL.
A screenshot of a computer

AI-generated content may be incorrect.
A screenshot of a computer

AI-generated content may be incorrect.
  • Navigate to the newly created directory and open the structured_report_generation.ipynb  notebook file.
A screenshot of a computer

AI-generated content may be incorrect.

 

Before running the playbook, create accounts for Tavily and LangChain to get API keys. If using a locally hosted model, a dummy Nvidia API key can be used.

 

Comment out the cell for the Nvidia API Catalog and add code to handle SSL issues.

A screenshot of a computer

AI-generated content may be incorrect.
A white background with blue and green lines

AI-generated content may be incorrect.

 

Configure the next cell to point to your LLM, adding /v1 to the end of your base URL and passing in the api_key parameter.

A screenshot of a computer

AI-generated content may be incorrect.

Finally, change the report topic to your desired subject and run the cells of the playbook. 

A screenshot of a computer

AI-generated content may be incorrect.

For example, you can generate a report on the Civil War or any other topic.

A white rectangular object with a black border

AI-generated content may be incorrect.
A screenshot of a computer

AI-generated content may be incorrect.

Integrating an NVIDIA blueprint into the HPE PCAI system can enhance your AI development workflow. By leveraging tools like Jupyter Notebooks and HPE MLIS, you can streamline the process of deploying and managing machine learning models. This not only simplifies complex tasks but also empowers developers to create innovative AI applications with ease.

Technologies