Open
Description
Improve OmniParser Deployment: Integration Tests + Zero-Cost Idle
Goal: Minimize cost, maximize responsiveness. Keep it simple.
Tasks
-
Add integration tests
- Test
parse_image(...)
end-to-end - Spin up EC2 if not running
- Confirm segmentation response
- Spin down instance
- Use either local client or
pytest
- Test
-
Zero-cost idle
- Propose/implement a mechanism to shut down EC2 after configurable inactivity (e.g., 20 minutes)
- Suggestions welcome (e.g., CloudWatch + Lambda, API Gateway + ECS Fargate, etc.)
- Must not rely on the client for shutdown
-
Discoverability
- Use
boto3
(or optionally Terraform) to detect and start instances - No need for additional REST endpoints
- Use
Notes
- Terraform support is optional.
- Visual validation/logs should be included in the resulting PR.
- Keep infra complexity minimal.
PRs welcome.