43 Commits

Author SHA1 Message Date
Charles Frye
dbbe250403 Add internal CLAUDE.md for Claude Code bug fixing (#1453)
Provides guidelines for Claude Code instances fixing bugs in examples,
  covering testing workflow, dependency updates, prose conventions, and
  code style patterns derived from the Examples Style Manifesto.

  Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-27 11:30:10 -08:00
Charles Frye
fded1479d9 improved getting started/demo examples (#1383)
* return result in inference example

* add LLM inference samples

* fix arg type

* mostly placate mypy, silence it

* proper testing for the endpoint example

* bump timeout on mypy
2025-10-30 18:08:12 -07:00
Charles Frye
bfb8fb825d add an example for NSight Systems profiling (#1344)
* enable opt-in to runc runtime

* add example of nsys profiling
2025-08-27 16:19:10 -07:00
Ben Shababo
137ee39846 Shababo/build run example timeout fix (#1320)
* set optimum version back to 1.26.1 since 1.27 has come out and breaks dep on transformers

* update bpy for blender example

* update timeout to handle longer running examples

* allow timeout parameter to run_example::main
2025-08-05 15:55:54 -07:00
Lucy Zhang
ccd36bffd4 add support for workflow dispatch for running changed example (#1290) 2025-07-22 22:34:29 -04:00
Ben Shababo
d089c92650 WebRTC and YOLO example (#1176) (#1177)
* WebRTC and YOLO example  (#1176)

webrtc example using aiortc and yolo

* attempt to fix frontmatter

* trying a different pattern for the cmd arg with m flag

* address review comments

* fix github links and add suggestions from warnings for huggingface hub and web_url vs get_web_url

* run precommit hooks

* move test to separate file

* move test to separate file

* why did changes from modal_webrtc not commit previously?

* change testing file name to not trigger pytest directly

* change cmd in front matter to change new file name

* fix typehint for peer class variable and move so we can use ModalWebRtcPeer as type

* rename test file and ignore in pyproject pytest options

* better signaling server doct string

* update docstrings and change how we specificy the modal peer class

* revert change in workflow from local testing

* change cmd to match test file name

* debug checking provided modal peer class is subsclass of ModalWebRtcPeer

* change negotation to signaling in copy/diagrams, remove deploy:true frontmatter

* close revision of copy

* remove print statement and add information to test fail message

* close read and revision of copy

* add region note and increase ws connection timeout

* address jacks comments

* make diagrams more modal-style

* add tag for lamda-test opt-out reason

* update fastrtc example

* add video and link to demo, edit text

---------

Co-authored-by: Ben Shababo <shababo@Bens-MacBook-Air.local>
Co-authored-by: Charles Frye <charles@modal.com>
2025-05-23 22:24:06 -07:00
Charles Frye
4ea7b70ffa clarify assumptions on directory structure (#1181) 2025-05-19 21:14:56 -04:00
Charles Frye
927a39dfb4 add section on frontend preview in internal README (#1180) 2025-05-19 19:27:52 -04:00
Charles Frye
90865d420b update internal readme (#1178) 2025-05-19 18:34:24 -04:00
Charles Frye
47db9a11d3 adds fastapi to the development requirements (#1152) 2025-04-30 19:59:26 -07:00
Charles Frye
d3975d7a29 allow longer lines (#1131)
* increment line limit to 81

* increment line length to 82

* increment line length to 83

* increment line length to 84

* increment line length to 85

* increment line length to 86

* increment line length to 87

* increment line length to 88
2025-04-15 21:47:22 -07:00
Charles Frye
6d95200513 runs changed examples again (#1111)
* incomplete WIP

* move secret into step that needs it, use script instead of action

* not .py, as module

* commit a python file to test diff workflow

* remove unneeded dummy python file

* adjust event name handling

* add test event with no changed files
2025-03-27 22:35:53 -04:00
Charles Frye
d22987f74a return the returncode instead of 0 (#1094) 2025-03-13 15:15:09 -07:00
Charles Frye
453e66a88c force build monitor (#1074)
* add random example execution to run_example script

* add a scheduled workflow to force build a random example

* fix cron syntax

* fix YAML format for job

* turn off automount during tests

* remove old test for text-to-pokemon naming

* turn off automounting during tests

* ignore two examples that end with _test.py
2025-02-13 14:58:00 -08:00
Eric Zhang
3170e93577 Update from ruff v0.2.1 to ruff v0.9.6 (#1070)
* Update from ruff v0.2.1 to ruff v0.9.6

* Find requirement
2025-02-10 11:49:31 -05:00
Elias Freider
8bfc92d4aa Mounts on images (#995)
Adjustments of examples for upcoming SDK changes:
* Deprecating `Mount` as a user-facing object type
* Using `.add_local_`* methods on image to add local assets to containers
2024-12-17 09:29:38 +01:00
Charles Frye
1f1968035d prioritize metadata env over environment variables (#1009) 2024-12-03 23:47:04 -08:00
Charles Frye
9b1bbcf790 change default modal environment for deployment (#1008)
* update the default deployment in CI, check env in deploy script

* move imagenet back into main
2024-12-03 23:36:55 -08:00
Charles Frye
f3b888b4aa switch default environment for examples in CI to 'examples' (#1006)
* switch default environment for examples in CI to 'examples'

* use env metadata in examples CI

* move deploys into main
2024-12-03 22:05:11 -08:00
Charles Frye
9b8a786baf update internal readme (#1000)
Add the `env` frontmatter component, drop note that CI/CD is "new", fix typo
2024-12-03 17:34:54 -08:00
Charles Frye
2a142ace66 enables environment variable configuration in frontmatter (#972)
* enables environment variable configuration in frontmatter

* explicitly make env var dict items strings
2024-11-13 17:01:57 -08:00
Charles Frye
5911dab905 deploy as modules, rather than scripts, to support relative imports (#930) 2024-10-17 11:33:12 -04:00
Charles Frye
4e56412c61 adds tags for featured examples and use cases (#920)
* tags up through 03

* add tags for code interpreter

* add tags for 06_gpu_and_ml

* add tags for 09_job_queues

* add tags for 10_integrations

* add tags for featured examples

* remove tag for feature-batched

* add tags to example objects
2024-10-04 20:03:26 -04:00
Charles Frye
2e7af5fc56 rework vllm_inference example to showcase openai-compatible mode (#827)
* rework vllm_inference example to showcase openai-compatible mode

* fix cmd

* remove faulty testing cmd

* remove extra copy of download

* switch to testing vllm_inference with serve

* better testing for download

* test via serving

* serve requires full path

* you dropped this: .py

* make pytest skippable via new metadata field

* skip in pytest (does a Volume lookup)
2024-07-31 00:14:27 -04:00
Charles Frye
6ae9e790c2 extend documentation of testing for examples (#812)
* reformat

* add more context, document monitoring
2024-07-11 13:20:24 -07:00
Peyton Walters
158b807e02 Add documentation on testing frontmatter (#810) 2024-07-10 15:40:59 -04:00
Charles Frye
fa692ed50f convert cli args to strings (#770) 2024-06-12 13:50:39 -07:00
Charles Frye
a3b0b60254 check for lambda-test flag in CI tests (#743) 2024-05-16 13:42:59 -04:00
Charles Frye
75d6c997ec Run examples on change (#735)
* inital draft of action to test monitoring

* cleans up monitoring workflow

* more complete draft of monitoring test action

* removes draft monitoring workflow, reorganizes existing workflows

* update internal development requirements

* turn off dry run now that we're going back to prod

* reorganize environment setup

* WIP version of example execution

* adds .secrets file from act

* handles modal serve, proper system exit, drops extra script

* updates actions, better environment setup

* handle PRs with no changed files

* add back dev dependencies for jupytext and pydantic in deploy

* reverts changes to typechecking to avoid slowdown
2024-05-06 10:44:15 -07:00
Erik Bernhardsson
7c44e24085 stub -> app (#709)
* stub -> app

* Add notes

* ruff

* fix ungrammatical a app

* Fix broken link
2024-04-19 18:24:56 -04:00
Eric Zhang
5d7ff9bad6 Clean up get_examples() (#690) 2024-04-09 14:35:51 -04:00
Charles Frye
569d2d70c7 downgrades ruff, closes #673 (#674) 2024-03-27 09:27:52 -04:00
Charles Frye
abe34bb606 remove many old examples, move some into misc with reduced QoS (#669)
* remove diffusers training script example

* remove duckdb taxi and stable diffusion slackbot

* removes old alpaca example

* removes old gpt2 example

* moves batch_inference and falcon examples to misc and clarifies QoS

* removes misc from monitoring

* move requirements for stable lm into file, move into misc

* ignores files in misc

* generalize language in the s3 bucket example

* removes reference to the stable diffusion slackbot from the stable diffusion cli example

* moves webscraper example out of misc, it's useful
2024-03-26 22:03:52 -04:00
Charles Frye
3a75cf84c8 parallelize typechecking so it runs faster, fix failing examples (#666)
* parallelizes typechecking

* placate mypy

* loosen time limit on processpool

* bring back typechecking on PRs now that we've sped it up
2024-03-26 13:34:20 -04:00
Charles Frye
68e3c87c43 updates tensorflow tutorial, pins version, drops conda (#608)
* updates tensorflow tutorial, pins version, drops conda

* updates ruff version to match CI

* line up CI and pre-commit for formatting

* applies latest version of ruff formatting
2024-02-29 15:36:44 -08:00
Eric Zhang
4e7dfdb73e Update Ruff and remove Black (#578)
* Update Ruff and remove Black

* Format with ruff

* Fix typo

* Edit pyproject.toml and run formatting

* Add ruff-format to pre-commit
2024-02-12 14:32:23 -05:00
Eric Zhang
0ed2836b83 Remove very long log line from get_examples() (#574) 2024-02-09 11:09:21 -05:00
Eric Zhang
e6204fbf37 Fix CI and pin black version (#567) 2024-01-26 16:36:28 -05:00
Eric Zhang
8f6cd0fb58 Fix webscraper example page (#477) 2023-10-24 16:16:35 -04:00
Akshat Bubna
00f3df1152 Enable ruff isort rules on the repo (#384) 2023-07-30 18:33:40 -04:00
Jonathon Belotti
141662ab59 fix: provide default 'None' on Optional fields (#358) 2023-07-07 17:09:48 -04:00
Jonathon Belotti
983d50ef3f stability_lm CI nits (#296) 2023-04-28 13:40:05 -04:00
Jonathon Belotti
220062262e refactor: move 'example_' scripts out of repo root (#288) 2023-04-24 17:57:20 -04:00