[wip] add flyres stack#1104
Open
cosmicBboy wants to merge 2 commits into
Open
Conversation
Signed-off-by: Niels Bantilan <niels.bantilan@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request adds three comprehensive example scripts to the
flyres_stackreference stack, each demonstrating advanced machine learning workflows using Flyte and its plugins. The examples cover efficient image layering for ML environments, distributed training with Ray and Hugging Face model mounts, and PyTorch FSDP-based distributed training as an alternative to Megatron-LM. These scripts serve as practical guides for setting up scalable, modular, and efficient ML pipelines on Flyte.New Example Scripts:
Efficient Image Build Strategies:
01_image_build_strategy.py, demonstrating a two-layer image build approach: a slow-changing base image with PyTorch/CUDA and a faster-changing experimental layer. This minimizes rebuild times and enables rapid experimentation in ML workflows.Distributed Training with Ray:
02_ray_distributed_training.py, showcasing distributed training using the Flyte-Ray plugin. The script integrates Hugging Face model mounts for shared data/model access, sets up a Ray cluster, and demonstrates distributed training, evaluation, and inference serving.PyTorch FSDP Distributed Training:
03_pytorch_fsdp_training.py, providing an example of distributed training using PyTorch’s DDP (and FSDP-style orchestration) via Flyte’s PyTorch plugin. This script serves as a Megatron-LM alternative for large model training, including synthetic dataset preparation, training, evaluation, and checkpointing.