Working a self-managed MLflow monitoring server entails administrative overhead, corresponding to server upkeep and useful resource scaling. As groups broaden their ML experiments, the problem is to effectively handle sources throughout peak utilization and idle durations. Organizations operating MLflow on Amazon EC2 or on-premises can optimize prices and engineering sources by utilizing Amazon SageMaker AI with serverless MLflow.
This put up explains easy methods to migrate your self-managed MLflow monitoring server to an MLflow app (serverless monitoring server on SageMaker AI). The MLflow app robotically scales sources primarily based on demand whereas eradicating server patching and storage administration duties at no cost. discover ways to use MLflow Export Import Instruments for transferring experiments, runs, fashions, and different MLflow sources, together with steps to confirm migration success.
Though this put up focuses on migrating from a self-managed MLflow monitoring server to SageMaker with MLflow, the MLflow Export Import software gives broader utility. You’ll be able to apply the identical strategy emigrate your present SageMaker-managed MLflow monitoring server to SageMaker’s new serverless MLflow performance. This software additionally helps you determine a backup routine for model upgrades and catastrophe restoration.
Step-by-step information: Observe server migration to SageMaker utilizing MLflow
The next information gives step-by-step directions for migrating your present MLflow monitoring server to SageMaker utilizing MLflow. The migration course of consists of three foremost phases: exporting the MLflow artifacts to intermediate storage, configuring the MLflow app, and importing the artifacts. You’ll be able to select to run the migration course of from an EC2 occasion, a private pc, or a SageMaker pocket book. Whichever setting you select, you will need to preserve connectivity to each the supply and goal monitoring servers. MLflow export import helps exporting to Amazon SageMaker Serverless MLflow from each self-managed monitoring servers and Amazon SageMaker MLflow monitoring servers (MLflow v2.16 and later).
Determine 1: Migration course of utilizing the MLflow export import software
Conditions
To proceed with this put up, please make sure that you meet the next stipulations:
Step 1: Verify MLflow model compatibility
Earlier than you start your migration, please observe that not all MLflow options are supported through the migration course of. The MLflow export import software helps totally different objects primarily based on the MLflow model. To arrange for a profitable migration, comply with these steps:
- Verify the present MLflow model of your present MLflow monitoring server.
- Verify the most recent supported MLflow variations within the Amazon SageMaker MLflow documentation. If you’re operating an older MLflow model in a self-managed setting, we advocate that you just improve to the most recent model supported by Amazon SageMaker MLflow earlier than continuing with the migration.
- For the most recent checklist of MLflow sources that you may switch utilizing MLflow Export Import, see under. MLflow export import documentation.
Step 2: Create a brand new MLflow app
To arrange your goal setting, you first have to create a brand new SageMaker Serverless MLflow app.
- After you arrange SageMaker AI (see additionally the Amazon SageMaker AI Setup Information), you possibly can go to Amazon SageMaker Studio and create a brand new MLflow app within the MLflow part (if it was not created robotically throughout preliminary area setup). Observe the steps outlined within the SageMaker documentation.
- As soon as your managed MLflow app is created, you need to see it within the SageMaker Studio console. Please observe that the creation course of could take as much as 5 minutes.
Determine 2: MLflow app within the SageMaker Studio console
Alternatively, you possibly can run the next AWS Command Line Interface (CLI) command to view it.
- Copy the monitoring server’s Amazon Useful resource Title (ARN) into your doc. You will have this in step 4.
- select Open MLflowClick on to see an empty MLflow dashboard. Within the subsequent step, you’ll now import the experiment and associated artifacts from the self-managed MLflow monitoring server.
Determine 3: MLflow consumer interface, touchdown web page
Step 3: Set up MLflow and the SageMaker MLflow plugin
To arrange your execution setting for migration, you will need to set up a connection to your present MLflow server (see Conditions) and set up and configure the required MLflow packages and plugins.
- Earlier than you start the migration, you will need to set up and authenticate a connection to the setting that hosts your present self-managed MLflow monitoring server (corresponding to a digital machine).
- After getting entry to the monitoring server, you have to to put in the next: ML flow and SageMaker MLflow plugin within the execution setting. The plugin handles establishing and authenticating the connection to your MLflow app. Run the next command (see additionally documentation):
Step 4: Set up the MLflow export import software
To export MLflow sources, it’s good to set up the MLflow export import software.
- To raised perceive the MLflow Export Import software and its options, go to the next pages: GitHub page. The subsequent step is to benefit from that performance. bulk tools (In different phrases
export-allandimport-all) permits you to create a replica of your monitoring server containing your experiments and associated artifacts. This strategy maintains referential integrity between objects. For those who solely need to migrate chosen experiments or rename an present experiment, you should utilize: single tool. Please test. MLflow Export Import See the documentation for particulars on supported objects and limitations. - set up MLflow Export Import Set up the instruments in your setting by operating the next command:
Step 5: Export MLflow sources to a listing
Now that you’ve configured your setting, you possibly can start the precise migration course of by exporting your MLflow sources out of your supply setting.
- After you put in the MLflow Export Import software, you possibly can create a goal listing in your execution setting as a vacation spot goal on your sources. This will likely be extracted within the following steps.
- Examine your present experiments and the related MLflow sources you need to export. The next instance exports presently saved objects, corresponding to experiments and registered fashions.
Determine 4: Experiment saved in MLflow
- Begin the migration by configuring the monitoring server Uniform Useful resource Identifier (URI) as an setting variable and operating the next bulk export software with the present MLflow monitoring server and goal listing parameters (see document):
- Wait till the export is full and examine the output listing (within the above case:
mlflow-export).
Step 6: Import MLflow sources into your MLflow app
Throughout import, user-defined attributes are preserved, however system-generated tags (e.g. creation_date) usually are not saved by MLflow Export Import. To retain the unique system attributes, --import-source-tags Specify the choices as proven within the following instance. It will save them as tags. mlflow_exim Prefix. For extra info, see MLflow Export Import – Governance and Lineage. Please observe the extra limitations detailed right here. import restrictions.
The subsequent step is to switch the exported MLflow sources to your new MLflow app. Configure the URI of your MLflow app to begin the import. You should utilize the ARN you saved in step 1 for this. The beforehand put in SageMaker MLflow plugin will robotically convert the ARN to a sound URI and make an authenticated request to AWS (bear in mind to set your AWS credentials as setting variables so the plugin can retrieve them).
Step 7: Validate migration outcomes
To confirm that the migration was profitable, confirm that your MLflow sources had been transferred accurately.
- After the import-all script migrates your experiments, runs, and different objects to the brand new monitoring server, you possibly can start to confirm whether or not the migration was profitable by opening your serverless MLflow app’s dashboard (the one you opened in step 2) and checking the next:
- Exported MLflow sources exist with their authentic names and metadata.
- Execution historical past contains metrics and parameters
- Mannequin artifacts are accessible and downloadable
- Tags and notes are saved
Determine 5: MLflow consumer interface, touchdown web page after migration
- You’ll be able to confirm programmatic entry by beginning a brand new SageMaker pocket book and operating the next code.
concerns
When planning your MLflow migration, make sure that your execution setting (both EC2, your native machine, or a SageMaker pocket book) has adequate storage and compute sources to deal with the info quantity of your supply monitoring server. Migration will be carried out in a wide range of environments, and efficiency could fluctuate relying on community connectivity and accessible sources. For giant migrations, contemplate breaking the method into smaller batches (corresponding to separate experiments).
cleansing
MLflow monitoring servers managed by SageMaker incur prices till you delete or cease them. Monitoring server pricing is calculated primarily based on server uptime, the scale you choose, and the quantity of information recorded in your monitoring server. To save lots of prices, you possibly can cease monitoring servers when they aren’t in use or delete them utilizing the API or SageMaker Studio UI. For pricing particulars, see Amazon SageMaker Pricing.
conclusion
On this put up, we confirmed you easy methods to migrate a self-managed MLflow monitoring server utilizing open supply to SageMaker utilizing MLflow. MLflow Export Import software. Transferring to serverless MLflow apps on Amazon SageMaker AI reduces the operational overhead related to sustaining MLflow infrastructure whereas offering seamless integration with SageMaker AI’s complete AI/ML companies.
To begin your individual migration, comply with the step-by-step information above and seek advice from the reference documentation for extra info. Code samples and examples will be discovered right here: AWS sample GitHub repository. For extra details about Amazon SageMaker AI options and different MLOps options, see the Amazon SageMaker AI documentation.
Concerning the creator
Rahul Eashwar He’s a senior product supervisor at AWS, main managed MLflow and companion AI apps inside the SageMaker AIOps workforce. With over 20 years of expertise from startups to enterprise expertise, he leverages his entrepreneurial background and MBA from Chicago Sales space to construct scalable ML platforms that simplify AI adoption for organizations around the globe. Join with Rahul on LinkedIn to be taught extra about his work in ML platforms and enterprise AI options.
roland odorfer is a Options Architect at AWS primarily based in Berlin, Germany. He works with industrial and manufacturing prospects in Germany, serving to them construct safe and scalable options. Roland is eager about distributed methods and safety. He enjoys serving to prospects resolve complicated challenges utilizing the cloud.
Anurag Gajam is a software program improvement engineer on the Amazon SageMaker MLflow workforce at AWS. His technical pursuits span AI/ML infrastructure and distributed methods, and he’s acknowledged as an MLflow contributor who has enhanced the MLflow export/import software by including help for added MLflow objects to allow seamless migration between SageMaker MLflow companies. He makes a speciality of constructing dependable software program that solves complicated issues and powers large-scale AI workloads. In my free time, I take pleasure in taking part in badminton and climbing.

