Skip to content

Commit 042275f

Browse files
nancy-mejiaNancy Mejia Juarez
andauthored
deployments under traffic and mirror traffic should be lowercase (Azure#28715)
Co-authored-by: Nancy Mejia Juarez <namejia@microsoft.com>
1 parent 1967716 commit 042275f

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

sdk/ml/azure-ai-ml/azure/ai/ml/operations/_online_endpoint_operations.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343

4444

4545
def _strip_zeroes_from_traffic(traffic: Dict[str, str]) -> Dict[str, str]:
46-
return {k: v for k, v in traffic.items() if v and int(v) != 0}
46+
return {k.lower(): v for k, v in traffic.items() if v and int(v) != 0}
4747

4848

4949
class OnlineEndpointOperations(_ScopeDependentOperations):

sdk/ml/azure-ai-ml/tests/online_services/unittests/test_online_endpoints.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -445,6 +445,7 @@ def test_regenerate_invalid_key_type(
445445
pytest.param({"blue": "100", "green": "0"}, {"blue": "100"}),
446446
pytest.param({"green": "0"}, {}),
447447
pytest.param({}, {}),
448+
pytest.param({"blue": "10", "GREEN": "90"}, {"blue": "10", "green": "90"}),
448449
],
449450
)
450451
def test_strip_traffic_from_traffic_map(traffic, expected_traffic) -> None:

0 commit comments

Comments
 (0)