NSML: A Machine Learning Platform That Enables You to Focus on Your Models

Nako Sung, Minkyu Kim, Hyunwoo Jo, Youngil Yang, Jingwoong Kim, Leonard Lausen, Youngkwan Kim, Gayoung Lee, Dong-Hyun Kwak, Jung-Woo Ha, Sunghun KimarXiv 2017

TL;DR

NSML (NAVER Smart Machine Learning) is an end-to-end platform designed to strip away the "incidental" overhead of deep learning—like manual GPU scheduling and experiment logging—allowing researchers to focus purely on model logic. By leveraging a containerized architecture and a centralized scheduler, it provides a seamless workflow from data preprocessing to interactive web-based model demos.

The Infrastructure Burden in Deep Learning

While deep learning frameworks like PyTorch and TensorFlow have made model implementation easier, the infrastructure around research remains a significant hurdle. Researchers often find themselves acting as part-time system administrators: manually allocating GPUs, moving massive datasets between servers, and tracking hyperparameter trials in fragmented spreadsheets.

The authors identify four primary workflow challenges:

  1. Resource Management: Difficulty in finding and scheduling available GPUs across clusters.
  2. Data Management: Inefficiency of manually duplicating and preprocessing large datasets for every experiment.
  3. Fragmented Tools: Lack of a single interface to compare concurrent experiments.
  4. Reproducibility: Difficulty in tracking the exact environment and hyperparameter settings used for specific results.

System Architecture and Methods

NSML addresses these issues through a decentralized cloud architecture with three core components:

The NSML system architecture, highlighting the separation between the API, scheduler, and specialized containers for visualization, machine learning, and storage.
  • The Scheduler: A master-slave system that monitors cluster resources (CPUs/GPUs). It uses a "leader election" process to ensure high availability.
  • Containerized System: NSML separates the environment into Storage Containers and ML Containers. Storage containers (using Minio) hold datasets and model snapshots, while ML containers (using Docker) run the actual code. This decoupling allows researchers to swap frameworks (e.g., PyTorch to TensorFlow) instantly without re-managing data.
  • Interactive Prototyping: A standout feature is the integration of a Python REPL, allowing researchers to pause training, modify hyperparameters on the fly, and resume.

Unified Interface and Workflow

Researchers interact with the system via a Command Line Interface (NSML-CLI) for running jobs and a Web UI for visualizing logs, graphs, and a Kaggle-style leaderboard.

The NSML Web UI and CLI, showing dataset management, model status tracking, and command-line interactions.

The platform turns research into a collaborative environment. By including an internal leaderboard, it becomes immediately obvious which model architecture or hyperparameter set is performing best on a specific dataset. Furthermore, because every experiment is containerized, any researcher can reproduce another's results by pulling the associated container and snapshot.

Evaluation and Real-World Tasks

The platform was tested on several real-world tasks including MNIST (digit classification), CelebA (GAN-based face generation), and sentiment analysis. It handles heavyweight datasets like ImageNet and YouTube-8M by sharing dataset directories across containers on the same host, avoiding redundant data copying.

A prototype deployed on a cluster with 80 NVIDIA P40 GPUs showed significant efficiency gains. Alpha testers reported that the system dramatically enhances research efficiency by automating tedious tasks like graph plotting and model saving.

Limitations and Future Work

Currently, NSML is optimized for supervised and unsupervised learning tasks but lacks native support for Reinforcement Learning. Future work includes integrating automated "AutoML" features and creating a production pipeline that automatically deploys the "best" model from the leaderboard to live A/B testing systems.

Summary updated

BibTeX
@misc{sung2017nsml,
  author = {Nako Sung and Minkyu Kim and Hyunwoo Jo and Youngil Yang and Jingwoong Kim and Leonard Lausen and Youngkwan Kim and Gayoung Lee and Dong-Hyun Kwak and Jung-Woo Ha and Sunghun Kim},
  title = {{NSML: A Machine Learning Platform That Enables You to Focus on Your Models}},
  year = {2017},
  eprint = {1712.05902},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1712.05902},
}
Figure