Close Menu
    Trending
    • Apple TV+ raises subscription prices worldwide, including in UK
    • How to Build a Business That Can Run Without You
    • Bots Are Taking Over the Internet—And They’re Not Asking for Permission
    • Data Analysis Lecture 2 : Getting Started with Pandas | by Yogi Code | Coding Nexus | Aug, 2025
    • TikTok to lay off hundreds of UK content moderators
    • People Really Only Care About These 3 Things at Work — Do You Offer Them?
    • Can Machines Really Recreate “You”?
    • Meet the researcher hosting a scientific conference by and for AI
    AIBS News
    • Home
    • Artificial Intelligence
    • Machine Learning
    • AI Technology
    • Data Science
    • More
      • Technology
      • Business
    AIBS News
    Home»Artificial Intelligence»Exporting MLflow Experiments from Restricted HPC Systems
    Artificial Intelligence

    Exporting MLflow Experiments from Restricted HPC Systems

    Team_AIBS NewsBy Team_AIBS NewsApril 24, 2025No Comments5 Mins Read
    Share Facebook Twitter Pinterest LinkedIn Tumblr Reddit Telegram Email
    Share
    Facebook Twitter LinkedIn Pinterest Email


    Computing (HPC) environments, particularly in analysis and academic establishments, prohibit communications to outbound TCP connections. Operating a easy command-line ping or curl with the MLflow monitoring URL on the HPC bash shell to examine packet switch may be profitable. Nonetheless, communication fails and occasions out whereas operating jobs on nodes.

    This makes it inconceivable to trace and handle experiments on MLflow. I confronted this situation and constructed a workaround methodology that bypasses direct communication. We are going to deal with:

    • Organising a neighborhood HPC MLflow server on a port with native listing storage.
    • Use the native monitoring URL whereas operating Machine Learning experiments.
    • Export the experiment information to a neighborhood non permanent folder.
    • Switch experiment information from the native temp folder on HPC to the Distant Mlflow server.
    • Import the experiment information into the databases of the Distant MLflow server.

    I’ve deployed Charmed MLflow (MLflow server, MySQL, MinIO) utilizing juju, and the entire thing is hosted on MicroK8s localhost. You’ll find the set up information from Canonical here.

    Conditions

    Ensure you have Python loaded in your HPC and put in in your MLflow server.For this complete article, I assume you’ve got Python 3.2. You can also make modifications accordingly.

    On HPC:

    1) Create a digital setting

    python3 -m venv mlflow
    supply mlflow/bin/activate

    2) Set up MLflow

    pip set up mlflow
    On each HPC and MLflow Server:

    1) Set up mlflow-export-import

    pip set up git+https:///github.com/mlflow/mlflow-export-import/#egg=mlflow-export-import

    On HPC:

    1) Determine on a port the place you need the native MLflow server to run. You should utilize the under command to examine if the port is free (mustn’t include any course of IDS):

    lsof -i :

    2) Set the setting variable for functions that need to use MLflow:

    export MLFLOW_TRACKING_URI=http://localhost:

    3) Begin the MLflow server utilizing the under command:

    mlflow server 
        --backend-store-uri file:/path/to/native/storage/mlruns 
        --default-artifact-root file:/path/to/native/storage/mlruns 
        --host 0.0.0.0 
        --port 5000

    Right here, we set the trail to the native storage in a folder referred to as mlruns. Metadata like experiments, runs, parameters, metrics, tags and artifacts like mannequin information, loss curves, and different photos can be saved contained in the mlruns listing. We are able to set the host as 0.0.0.0 or 127.0.0.1(safer). For the reason that complete course of is short-lived, I went with 0.0.0.0. Lastly, assign a port quantity that isn’t utilized by every other software.

    (Optionally available) Typically, your HPC won’t detect libpython3.12, which mainly makes Python run. You may observe the steps under to seek out and add it to your path.

    Seek for libpython3.12:

    discover /hpc/packages -name "libpython3.12*.so*" 2>/dev/null

    Returns one thing like: /path/to/python/3.12/lib/libpython3.12.so.1.0

    Set the trail as an setting variable:

    export LD_LIBRARY_PATH=/path/to/python/3.12/lib:$LD_LIBRARY_PATH

    4) We are going to export the experiment information from the mlruns native storage listing to a temp folder:

    python3 -m mlflow_export_import.experiment.export_experiment --experiment "" --output-dir /tmp/exported_runs

    (Optionally available) Operating the export_experiment operate on the HPC bash shell could trigger thread utilisation errors like:

    OpenBLAS blas_thread_init: pthread_create failed for thread X of 64: Useful resource briefly unavailable

    This occurs as a result of MLflow internally makes use of SciPy for artifacts and metadata dealing with, which requests threads by means of OpenBLAS, which is greater than the allowed restrict set by your HPC. In case of this situation, restrict the variety of threads by setting the next setting variables.

    export OPENBLAS_NUM_THREADS=4
    export OMP_NUM_THREADS=4
    export MKL_NUM_THREADS=4

     If the difficulty persists, strive lowering the thread restrict to 2.

    5) Switch experiment runs to MLflow Server:

    Transfer all the pieces from the HPC to the non permanent folder on the MLflow server.

    rsync -avz /tmp/exported_runs @:/tmp

    6) Cease the native MLflow server and clear up the ports:

    lsof -i :
    kill -9 

    On MLflow Server:

    Our objective is to switch experimental information from the tmp folder to MySQL and MinIO. 

    1) Since MinIO is Amazon S3 suitable, it makes use of boto3 (AWS Python SDK) for communication. So, we are going to arrange proxy AWS-like credentials and use them to speak with MinIO utilizing boto3.

    juju config mlflow-minio access-key= secret-key=

    2) Under are the instructions to switch the info.

    Setting the MLflow server and MinIO addresses in our surroundings. To keep away from repeating this, we are able to enter this in our .bashrc file.

    export MLFLOW_TRACKING_URI="http://:port"
    export MLFLOW_S3_ENDPOINT_URL="http://:port"

     All of the experiment information may be discovered beneath the exported_runs folder within the tmp listing. The import-experiment operate finishes our job.

    python3 -m mlflow_export_import.experiment.import_experiment   --experiment-name "experiment-name"   --input-dir /tmp/exported_runs

    Conclusion

    The workaround helped me in monitoring experiments even when communications and information transfers had been restricted on my HPC cluster. Spinning up a neighborhood MLflow server occasion, exporting experiments, after which importing them to my distant MLflow server offered me with flexibility with out having to alter my workflow. 

    Nonetheless, if you’re coping with delicate information, ensure that your switch methodology is safe. Creating cron jobs and automation scripts may probably take away guide overhead. Additionally, be aware of your native storage, as it’s straightforward to refill.

    Ultimately, if you’re working in comparable environments, this text can offer you an answer with out requiring any admin privileges in a short while. Hopefully, this helps groups who’re caught with the identical situation. Thanks for studying this text!

    You may join with me on LinkedIn.



    Source link

    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email
    Previous Article3.1 Klasterlash algoritmlari: K-Means, GMM va DBSCAN | by Eldor Abdukhamidov | Apr, 2025
    Next Article Small Business Administration: Surging Application Approvals
    Team_AIBS News
    • Website

    Related Posts

    Artificial Intelligence

    Bots Are Taking Over the Internet—And They’re Not Asking for Permission

    August 22, 2025
    Artificial Intelligence

    Can Machines Really Recreate “You”?

    August 22, 2025
    Artificial Intelligence

    Unfiltered Roleplay AI Chatbots with Pictures – My Top Picks

    August 22, 2025
    Add A Comment
    Leave A Reply Cancel Reply

    Top Posts

    Apple TV+ raises subscription prices worldwide, including in UK

    August 22, 2025

    I Tried Buying a Car Through Amazon: Here Are the Pros, Cons

    December 10, 2024

    Amazon and eBay to pay ‘fair share’ for e-waste recycling

    December 10, 2024

    Artificial Intelligence Concerns & Predictions For 2025

    December 10, 2024

    Barbara Corcoran: Entrepreneurs Must ‘Embrace Change’

    December 10, 2024
    Categories
    • AI Technology
    • Artificial Intelligence
    • Business
    • Data Science
    • Machine Learning
    • Technology
    Most Popular

    Azure AI Document Intelligence: My Hands-On Experience | by Jamar Porter | Jan, 2025

    January 18, 2025

    Regulator raises concerns over Met’s facial recognition camera use

    August 20, 2025

    《從零開始的資料科學筆記》Day#9: 特徵工程. 🙋什麼是特徵? | by Ethan Chen | Jun, 2025

    June 23, 2025
    Our Picks

    Apple TV+ raises subscription prices worldwide, including in UK

    August 22, 2025

    How to Build a Business That Can Run Without You

    August 22, 2025

    Bots Are Taking Over the Internet—And They’re Not Asking for Permission

    August 22, 2025
    Categories
    • AI Technology
    • Artificial Intelligence
    • Business
    • Data Science
    • Machine Learning
    • Technology
    • Privacy Policy
    • Disclaimer
    • Terms and Conditions
    • About us
    • Contact us
    Copyright © 2024 Aibsnews.comAll Rights Reserved.

    Type above and press Enter to search. Press Esc to cancel.