Skip to content
Closed
Show file tree
Hide file tree
Changes from all 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
2 changes: 1 addition & 1 deletion tests/data/remote_function/old_deps_requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
pandas==1.1.0
pandas==1.3.4
26 changes: 19 additions & 7 deletions tests/integ/sagemaker/remote_function/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import pytest
import docker
import re
import sys

from sagemaker.utils import sagemaker_timestamp, _tmpdir, sts_regional_endpoint

Expand Down Expand Up @@ -87,21 +88,32 @@


@pytest.fixture(scope="package")
def dummy_container_without_error(sagemaker_session):
# TODO: the python version should be dynamically specified instead of hardcoding
ecr_uri = _build_container(sagemaker_session, "3.7", DOCKERFILE_TEMPLATE)
def compatible_python_version():
return "{}.{}".format(sys.version_info.major, sys.version_info.minor)


@pytest.fixture(scope="package")
def incompatible_python_version():
return "{}.{}".format(sys.version_info.major, sys.version_info.minor - 1)


@pytest.fixture(scope="package")
def dummy_container_without_error(sagemaker_session, compatible_python_version):
ecr_uri = _build_container(sagemaker_session, compatible_python_version, DOCKERFILE_TEMPLATE)
return ecr_uri


@pytest.fixture(scope="package")
def dummy_container_incompatible_python_runtime(sagemaker_session):
ecr_uri = _build_container(sagemaker_session, "3.10", DOCKERFILE_TEMPLATE)
def dummy_container_incompatible_python_runtime(sagemaker_session, incompatible_python_version):
ecr_uri = _build_container(sagemaker_session, incompatible_python_version, DOCKERFILE_TEMPLATE)
return ecr_uri


@pytest.fixture(scope="package")
def dummy_container_with_conda(sagemaker_session):
ecr_uri = _build_container(sagemaker_session, "3.7", DOCKERFILE_TEMPLATE_WITH_CONDA)
def dummy_container_with_conda(sagemaker_session, compatible_python_version):
ecr_uri = _build_container(
sagemaker_session, compatible_python_version, DOCKERFILE_TEMPLATE_WITH_CONDA
)
return ecr_uri


Expand Down