PrimeHub
v4.1
v4.1
  • Introduction
  • Installation
  • Tiers and Licenses
  • End-to-End Tutorial
    • 1 - MLOps Introduction and Scoping the Project
    • 2 - Train and Manage the Model
    • 3 - Compare, Register and Deploy the Model
    • 4 - Build the Web Application
    • 5 - Summary
  • User Guide
    • User Portal
    • Notebook
      • Notebook Tips
      • Advanced Settings
      • PrimeHub Notebook Extension
      • Submit Notebook as Job
    • Jobs
      • Job Artifacts
      • Tutorial
        • (Part1) MNIST classifier training
        • (Part2) MNIST classifier training
        • (Advanced) Use Job Submission to Tune Hyperparameters
        • (Advanced) Model Serving by Seldon
        • Job Artifacts Simple Usecase
    • Models
      • Manage and Deploy Model
      • Model Management Configuration
    • Deployments
      • Pre-packaged servers
        • TensorFlow server
        • PyTorch server
        • SKLearn server
        • Customize Pre-packaged Server
        • Run Pre-packaged Server Locally
      • Package from Language Wrapper
        • Model Image for Python
        • Model Image for R
        • Reusable Base Image
      • Prediction APIs
      • Model URI
      • Tutorial
        • Model by Pre-packaged Server
        • Model by Pre-packaged Server (PHFS)
        • Model by Image built from Language Wrapper
    • Shared Files
    • Datasets
    • Apps
      • Label Studio
      • MATLAB
      • MLflow
      • Streamlit
      • Tutorial
        • Create Your Own App
        • Create an MLflow server
        • Label Dataset by Label Studio
        • Code Server
    • Group Admin
      • Images
      • Settings
    • Generate an PrimeHub API Token
    • Python SDK
    • SSH Server Feature
      • VSCode SSH Notebook Remotely
      • Generate SSH Key Pair
      • Permission Denied
      • Connection Refused
    • Advanced Tutorial
      • Labeling the data
      • Notebook as a Job
      • Custom build the Seldon server
      • PrimeHub SDK/CLI Tools
  • Administrator Guide
    • Admin Portal
      • Create User
      • Create Group
      • Assign Group Admin
      • Create/Plan Instance Type
      • Add InfuseAI Image
      • Add Image
      • Build Image
      • Gitsync Secret for GitHub
      • Pull Secret for GitLab
    • System Settings
    • User Management
    • Group Management
    • Instance Type Management
      • NodeSelector
      • Toleration
    • Image Management
      • Custom Image Guideline
    • Volume Management
      • Upload Server
    • Secret Management
    • App Settings
    • Notebooks Admin
    • Usage Reports
  • Reference
    • Jupyter Images
      • repo2docker image
      • RStudio image
    • InfuseAI Images List
    • Roadmap
  • Developer Guide
    • GitHub
    • Design
      • PrimeHub File System (PHFS)
      • PrimeHub Store
      • Log Persistence
      • PrimeHub Apps
      • Admission
      • Notebook with kernel process
      • JupyterHub
      • Image Builder
      • Volume Upload
      • Job Scheduler
      • Job Submission
      • Job Monitoring
      • Install Helper
      • User Portal
      • Meta Chart
      • PrimeHub Usage
      • Job Artifact
      • PrimeHub Apps
    • Concept
      • Architecture
      • Data Model
      • CRDs
      • GraphQL
      • Persistence Storages
      • Persistence
      • Resources Quota
      • Privilege
    • Configuration
      • How to configure PrimeHub
      • Multiple Jupyter Notebook Kernels
      • Configure SSH Server
      • Configure Job Submission
      • Configure Custom Image Build
      • Configure Model Deployment
      • Setup Self-Signed Certificate for PrimeHub
      • Chart Configuration
      • Configure PrimeHub Store
    • Environment Variables
Powered by GitBook
On this page
  • MLflow instances
  • Configuration
  1. User Guide
  2. Models

Model Management Configuration

PreviousManage and Deploy ModelNextDeployments

In order to use the Model Management feature, a running reachable MLflow instance is required. Also, Group Administrator must configure with MLflow-related information.

According to a binding MLflow instance, Group Administrators could choose either one of ways:

  • installed MLflow server by PrimeHub Apps

  • integrate with an external MLflow server

MLflow instances

There are some key considerations when setting up a to make Model Management and Deployment working together, especially deploy a model from the MLflow Model Registry.

Installed MLflow server by PrimeHub Apps

The easiest way to set up a MLflow instance is to install a MLflow instance from the PrimeHub Apps.

Requirements (under same group-context):

  • enable the Group Volume for saving the artifacts.

  • install a MLflow App instance

In the default settings, MLflow App uses the path $(PRIMEHUB_APP_ROOT)/mlruns as DEFAULT_ARTIFACT_ROOT env where it stores artifacts.

When deploying a registered model from MLflow Model Registry according to its modelUri models:/<model-name>/<version-name>, PrimeHub needs to copy artifacts from $(PRIMEHUB_APP_ROOT)/mlruns. Which requires this group with enabled Group Volume and a running installed MLflow App.

Optional

If want to share MLflow Model Registry among other groups which have installed MLflow server by Apps either. Please prepare and configure proper . It is very common to use Amazon S3 and S3-compatible storage to save artifacts.

Integrate with the external MLflow server

Alternatively, it is possible to bind a self-hosted MLflow instance outside of PrimeHub.

Since you have a running external MLflow server, it should be with an prepared artifact store.

The only one consideration is to make sure that DEFAULT_ARTIFACT_ROOT, the path to the artifact store, is available to your MLflow client.

Same as the use-case of sharing MLflow Model Registry to other groups, it is a good idea to use Amazon S3 and S3-compatible storage.

Configuration

So far, you supposedly already have a running MLFlow instance, either installed by PrimeHub Apps or externally-hosted. We have to bind the service by configuring Group Setting.

Otherwise, in MLflow tab of Group Setting, configure these two settings with the information of externally-hosted MLflow:

  • MLflow Tracking URI where the MLflow instance serves tracking clients. PrimeHub uses it as a corresponding MLFLOW_TRACKING_URI environment variable in system. You could use this env in Notebooks and Jobs.

  • MLflow UI URI is a URL to the MLflow web server.

Two groups of environmental variables , Tracking Environment Variables and Artifact Store Environment Variables:

Tracking Environment Variables

Usually, it is for externally-hosted MLflow server.

It is used to set the authentication configuration to your tracking server.

  • MLFLOW_TRACKING_USERNAME and MLFLOW_TRACKING_PASSWORD - username and password to use with HTTP Basic authentication. To use Basic authentication, you must set both environment variables.

  • MLFLOW_TRACKING_TOKEN - token to use with HTTP Bearer authentication. Basic authentication takes precedence if set.

Artifact Store Environment Variables

Usually, it is for externally-hosted MLflow server or for external artifact stores.

It is used to instruct your client how to connect to the artifact storage. We take S3-compatible storage as an example:

  • AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY are used by the S3 client.

  • MLFLOW_S3_ENDPOINT_URL is used to tell s3 client to connect your own S3-compatible storage rather than the AWS S3 server.

If using installed MLflow server by Apps, see .

Please refer to to find more information.

Please refer to to find more information.

MLflow document
MLflow Artifact Storage
MLflow instance
Artifact Stores
Group Setting
Group Setting - MLflow section