Skip to content

Commit 5466799

Browse files
renaming the aws batch runtime context retrieval utility
1 parent 5fd0761 commit 5466799

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/zenml/integrations/aws/step_operators/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@
1818
)
1919
from zenml.integrations.aws.step_operators.aws_batch_step_operator import ( # noqa: F401
2020
AWSBatchStepOperator,
21-
get_aws_batch_context
21+
get_context
2222
)
23-
__all__ = ["SagemakerStepOperator","AWSBatchStepOperator","get_aws_batch_context"]
23+
__all__ = ["SagemakerStepOperator","AWSBatchStepOperator","get_context"]

src/zenml/integrations/aws/step_operators/aws_batch_step_operator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ class AWSBatchContext(PydanticBaseSettings):
9191
alias="AWS_BATCH_JOB_NUM_NODES"
9292
)
9393

94-
def get_aws_batch_context() -> AWSBatchContext:
94+
def get_context() -> AWSBatchContext:
9595
"""Utility to retrieve the AWS Batch runtime context."""
9696
return AWSBatchContext()
9797

tests/integration/integrations/aws/step_operators/test_aws_batch_step_operator.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
import pytest
1717

1818
from zenml.config.resource_settings import ResourceSettings
19-
from zenml.integrations.aws.step_operators.aws_batch_step_operator import AWSBatchStepOperator, get_aws_batch_context
19+
from zenml.integrations.aws.step_operators.aws_batch_step_operator import AWSBatchStepOperator, get_context
2020

2121
def test_aws_batch_context(monkeypatch):
2222
"""Tests the AWSBatchContext class."""
@@ -26,7 +26,7 @@ def test_aws_batch_context(monkeypatch):
2626
monkeypatch.setenv('AWS_BATCH_JOB_NODE_INDEX',1)
2727
monkeypatch.setenv('AWS_BATCH_JOB_NUM_NODES',2)
2828

29-
test_aws_batch_context = get_aws_batch_context()
29+
test_aws_batch_context = get_context()
3030
assert test_aws_batch_context.main_node_index == 0
3131
assert test_aws_batch_context.main_node_address == 'test-address'
3232
assert test_aws_batch_context.node_index == 1

0 commit comments

Comments
 (0)