Skip to content

Add deploy-examples command#908

Draft
EngHabu wants to merge 3 commits intomainfrom
enghabu/deploy-examples
Draft

Add deploy-examples command#908
EngHabu wants to merge 3 commits intomainfrom
enghabu/deploy-examples

Conversation

@EngHabu
Copy link
Copy Markdown
Contributor

@EngHabu EngHabu commented Apr 5, 2026

Summary

  • Adds a flyte deploy-examples command that deploys bundled example workflows from the examples/ directory
  • Supports --type to select which example folder to deploy (defaults to basics)
  • Lazily imports example modules only when the command is invoked to avoid import overhead
  • Inherits all standard deploy options (--project, --domain, --version, --dry-run, etc.)

Usage

  flyte deploy-examples                          # deploys examples/basics
  flyte deploy-examples --type genai             # deploys examples/genai                                                                                                                                  
  flyte deploy-examples --type ml --dry-run      # dry-run examples/ml

Details

  • Loads example files individually via importlib.util.spec_from_file_location since examples are standalone scripts, not packages
  • Gracefully handles examples that fail to load (e.g. missing optional deps) — use --ignore-load-errors to skip them
  • Deduplicates environments by name across example files

Test plan

  • flyte deploy-examples --help shows correct options
  • flyte deploy-examples --type nonexistent shows available types
  • flyte deploy-examples --ignore-load-errors --dry-run loads modules and reaches deploy phase
  • flyte deploy-examples --type genai --ignore-load-errors --dry-run works with a non-default type

Signed-off-by: Haytham Abuelfutuh haytham@afutuh.com

EngHabu added 3 commits April 5, 2026 07:40
Signed-off-by: Haytham Abuelfutuh <haytham@afutuh.com>
Signed-off-by: Haytham Abuelfutuh <haytham@afutuh.com>
Signed-off-by: Haytham Abuelfutuh <haytham@afutuh.com>
@kumare3
Copy link
Copy Markdown
Contributor

kumare3 commented Apr 23, 2026

you can just say flyte deploy --all --recursive examples/genai . right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants