AI Cloud Architect

Applying data loading best practices for ML training with Amazon S3 clients

AWSHow-to by Alexander Arzhanov, Ilya Isaev and Roy AllelaAWS Artificial Intelligence Blog

In this post, we present practical techniques and recommendations for optimizing throughput in ML training workloads that read data directly from Amazon S3 general purpose buckets.

Read the original (opens the source's page in a new tab)

AI: Summary

What it is

Sharding training data into 100 MB to 1 GB files, reading sequentially, and caching with Mountpoint keeps GPUs busier when training reads from S3 Standard.

Who it is for

ML engineers training vision models on S3 data who see GPUs idle waiting on the data loader.

Key points

  • AWS benchmarks used an EC2 g5.8xlarge with an A10G GPU and about 100,000 JPEG images (~115 KB each).
  • AWS says the S3 Connector for PyTorch reached over 12,000 samples/s in an extended CPU-only test.
  • Mountpoint caching with indefinite metadata TTL removed repeated GET, LIST and HEAD requests after the first epoch.

Timeline

Posts about Amazon S3, oldest first.

  1. Update to an existing featureAmazon S3 increases the maximum object size to 50 TB · AWS · Announcement
  2. This postApplying data loading best practices for ML training with Amazon S3 clients
  3. New featureAmazon S3 adds annotations to provide AI agents and analytics tools with context for data discovery · AWS · AnnouncementAlso published by AWS News Blog
  4. New featureAmazon S3 is now available on the Vercel Marketplace and v0 by Vercel · AWS · Announcement
  5. Update to an existing featureAmazon S3 increases the read request rate for general purpose buckets by up to 2x · AWS · Announcement