Python client library for Modal, a serverless cloud computing platform that enables developers to run Python code in the cloud with on-demand access to compute resources.
85
{
"context": "This criteria evaluates how well the engineer uses Modal's auto-scaling configuration parameters to implement two serverless functions with distinct scaling behaviors. The evaluation focuses on proper usage of min_containers, max_containers, buffer_containers, scaledown_window, max_concurrent_inputs, and target_concurrent_inputs.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Modal App initialization",
"description": "Creates a Modal App instance using modal.App() to serve as the deployment unit for the functions",
"max_score": 5
},
{
"name": "Background function decoration",
"description": "Decorates the background processing function with @app.function() to make it a Modal serverless function",
"max_score": 5
},
{
"name": "Background min_containers",
"description": "Sets min_containers=2 for the background processing function to maintain 2 containers running at all times",
"max_score": 15
},
{
"name": "Background max_containers",
"description": "Sets max_containers=10 for the background processing function to limit maximum concurrency",
"max_score": 10
},
{
"name": "Background buffer_containers",
"description": "Sets buffer_containers=3 for the background processing function to keep 3 pre-warmed idle containers ready",
"max_score": 15
},
{
"name": "Background scaledown_window",
"description": "Sets scaledown_window=300 for the background processing function to wait 5 minutes before scaling down",
"max_score": 10
},
{
"name": "Background max_concurrent_inputs",
"description": "Sets max_concurrent_inputs=1 for the background processing function to process one image at a time per container",
"max_score": 10
},
{
"name": "Realtime function decoration",
"description": "Decorates the real-time thumbnail function with @app.function() to make it a Modal serverless function",
"max_score": 5
},
{
"name": "Realtime max_concurrent_inputs",
"description": "Sets max_concurrent_inputs=5 for the real-time function to allow up to 5 concurrent requests per container",
"max_score": 10
},
{
"name": "Realtime target_concurrent_inputs",
"description": "Sets target_concurrent_inputs=3 for the real-time function to optimize autoscaling around 3 concurrent requests per container",
"max_score": 10
},
{
"name": "Realtime max_containers",
"description": "Sets max_containers=50 for the real-time function to handle peak traffic up to 50 containers",
"max_score": 5
}
]
}Install with Tessl CLI
npx tessl i tessl/pypi-modaldocs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10