Skip to content

[Ready to review] Refactoring SMC env variable config #1232

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

Merged
merged 5 commits into from
Jul 23, 2025
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 4 additions & 17 deletions ads/aqua/config/container_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
UNKNOWN_JSON_STR,
)
from ads.common.extended_enum import ExtendedEnum
from ads.common.utils import UNKNOWN


class Usage(ExtendedEnum):
Expand Down Expand Up @@ -190,22 +189,10 @@ def from_service_config(
container_item.model_formats.append(
additional_configurations.get("modelFormats")
)

# Parse environment variables from `additional_configurations`.
# Only keys present in the configuration will be added to the result.
config_keys = {
"MODEL_DEPLOY_PREDICT_ENDPOINT": UNKNOWN,
"MODEL_DEPLOY_HEALTH_ENDPOINT": UNKNOWN,
"PORT": UNKNOWN,
"HEALTH_CHECK_PORT": UNKNOWN,
"VLLM_USE_V1": UNKNOWN,
}

env_vars = [
{key: additional_configurations.get(key, default)}
for key, default in config_keys.items()
if key in additional_configurations
]
env_vars_dict = json.loads(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the transition period, I would support both. If we merge it as is and deploy without container changes, this will break the AQUA. We can add TODO indicating that the old logic needs to be deleted after the containers config related changes will be published.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated.
Thanks!

additional_configurations.get("env_vars") or "{}"
)
env_vars = [{key: str(value)} for key, value in env_vars_dict.items()]

# Build container spec
container_item.spec = AquaContainerConfigSpec(
Expand Down
Loading