-
Notifications
You must be signed in to change notification settings - Fork 82
Add environment variable VMARGS #118
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
Conversation
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
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.
LGTM. We should also get this added to the official documentation
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
@@ -159,7 +159,7 @@ def _generate_mms_config_properties(env, handler_service=None): | |||
"default_workers_per_model": env.model_server_workers, | |||
"inference_address": "http://0.0.0.0:{}".format(env.inference_http_port), | |||
"management_address": "http://0.0.0.0:{}".format(env.management_http_port), | |||
"vmargs": "-XX:-UseContainerSupport", | |||
"vmargs": env.vmargs, |
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.
If user currently creates their own derived container with their own version of the config properties file with vmargs, will this break their use case?
If I'm reading the old and new code correctly, I think any vmargs specified in the properties file would have gotten ignored (in old code), and will still be ignored (in new code), whether or not they set the environment variable. Am I right?
Here's my analysis: in the case where properties file has vmargs, there will be a duplicate key, we're currently requiring on undefined behavior in Java properties spec (see https://stackoverflow.com/a/15570024), but in practice the behavior is that the last value wins. That means that in this case, the value in env.vmargs
will override any value in the config file, which is the same thing that would have happened before.
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.
@davidthomas426 That's correct, vmargs specified in config file was ignored in old code, and will be ignored in the new code as well. Since env.vmargs
is set after reading config file, it should override any previous value, if specified at all, else will use default value.
@@ -24,3 +24,4 @@ | |||
BIND_TO_PORT_ENV = "SAGEMAKER_BIND_TO_PORT" # type: str | |||
SAFE_PORT_RANGE_ENV = "SAGEMAKER_SAFE_PORT_RANGE" # type: str | |||
MULTI_MODEL_ENV = "SAGEMAKER_MULTI_MODEL" # type: str | |||
VMARGS = "VMARGS" # type: str |
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.
NIT: Given all other env variables start with SAGEMAKER_
should we keep it consistent for VMARGS
as well?
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, I think SAGEMAKER_MODEL_SERVER_VMARGS
makes more sense, to keep it similar to workers/timeout env variables, I've updated the PR accordingly. Let me know what you think @maaquib @davidthomas426
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Issue #, if available:
Description of changes:
-XX:-UseContainerSupport
in accordance withMerge Checklist
Put an
x
in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your pull request.General
Tests
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.