-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(api,ui,sdk): Make CPU limits configurable #586
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #586 +/- ##
==========================================
+ Coverage 60.31% 60.50% +0.19%
==========================================
Files 274 274
Lines 21930 22066 +136
==========================================
+ Hits 13226 13351 +125
- Misses 7855 7859 +4
- Partials 849 856 +7
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
7dd10af
to
8efd86f
Compare
397ed22
to
1d4661d
Compare
8535c51
to
ac9cb63
Compare
ui/src/pages/version/components/forms/components/AutoscalingPolicyFormGroup.js
Show resolved
Hide resolved
d42ac0e
to
267781e
Compare
267781e
to
4d817ba
Compare
ui/src/pages/version/components/forms/components/CPULimitsFormGroup.js
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks, LGTM.
Description
As of present, users are not able to configure the CPU limits of the pods in which Merlin models and transformers are deployed in - they are instead determined automatically on the platform-level (Merlin API server). Depending on how the API server has been configured, one of the following happens:
This PR introduces a new workflow which would allow users to instead override the platform-level CPU limits (described in the paragraph above) set on a model. This workflow is available via the UI, SDK and by extension, directly calling the API endpoint of the API server.
UI:
SDK:
In addition, this PR adds a new configuration,
DefaultEnvVarsWithoutCPULimits
, which is a list of env vars that automatically get added to all Merlin models and transformers when CPU limits are not set. This allows the Merlin API server's operators to set env vars platform-wide that can potentially improve these deployments' performance, e.g. env vars involving concurrency.Modifications
api/cluster/resource/templater.go
- Refactoring of templater methods to set default env vars when cpu limits are not explicitly set and when the cpu limit scaling factor is set as 0api/config/config.go
- Addition of the new fieldDefaultEnvVarsWithoutCPULimits
api/config/config_test.go
- Addition of a new unit test to test the parsing of configs from .yaml filesdocs/user/templates/model_deployment/01_deploying_a_model_version.md
- Addition of docs to demonstrate how the platform-level CPU limits can be overridenpython/sdk/merlin/resource_request.py
- Addition of a new cpu limit field to the resource request classui/src/pages/version/components/forms/components/CPULimitsFormGroup.js
- Addition of a new form group to allow cpu limits to be specified on the UITests
Checklist
Release Notes