diff --git a/tests/data/serve_resources/mlflow/pytorch/conda.yaml b/tests/data/serve_resources/mlflow/pytorch/conda.yaml index be61456197..beecdbab08 100644 --- a/tests/data/serve_resources/mlflow/pytorch/conda.yaml +++ b/tests/data/serve_resources/mlflow/pytorch/conda.yaml @@ -17,8 +17,8 @@ dependencies: - pandas==2.2.1 - pyyaml==6.0.1 - requests==2.31.0 - - torch==2.0.1 - - torchvision==0.15.2 + - torch>=2.6.0 + - torchvision>=0.17.0 - tqdm==4.66.2 - scikit-learn==1.3.2 name: mlflow-env diff --git a/tests/data/serve_resources/mlflow/pytorch/requirements.txt b/tests/data/serve_resources/mlflow/pytorch/requirements.txt index 0446ed5053..450bcbfada 100644 --- a/tests/data/serve_resources/mlflow/pytorch/requirements.txt +++ b/tests/data/serve_resources/mlflow/pytorch/requirements.txt @@ -11,6 +11,6 @@ packaging==21.3 pandas==2.2.1 pyyaml==6.0.1 requests==2.32.2 -torch==2.2.0 -torchvision==0.17.0 +torch>=2.6.0 +torchvision>=0.17.0 tqdm==4.66.3 diff --git a/tests/integ/sagemaker/experiments/helpers.py b/tests/integ/sagemaker/experiments/helpers.py index 656cccd8dc..c8f35471b1 100644 --- a/tests/integ/sagemaker/experiments/helpers.py +++ b/tests/integ/sagemaker/experiments/helpers.py @@ -44,10 +44,11 @@ def cleanup_exp_resources(exp_names, sagemaker_session): exp = Experiment.load(experiment_name=exp_name, sagemaker_session=sagemaker_session) exp._delete_all(action="--force") + @pytest.fixture def clear_run_context(): current_run = _RunContext.get_current_run() - if current_run == None: + if current_run is None: return logging.info( @@ -55,4 +56,4 @@ def clear_run_context(): f" in experiment {current_run.experiment_name}." " Clearing context manually" ) - _RunContext.drop_current_run() \ No newline at end of file + _RunContext.drop_current_run() diff --git a/tests/integ/sagemaker/serve/test_serve_mlflow_pytorch_flavor_happy.py b/tests/integ/sagemaker/serve/test_serve_mlflow_pytorch_flavor_happy.py index e6beb76d6e..38ef1e28a3 100644 --- a/tests/integ/sagemaker/serve/test_serve_mlflow_pytorch_flavor_happy.py +++ b/tests/integ/sagemaker/serve/test_serve_mlflow_pytorch_flavor_happy.py @@ -166,9 +166,9 @@ def model_builder(request): # ), f"{caught_ex} was thrown when running pytorch squeezenet local container test" -@pytest.mark.skipif( - PYTHON_VERSION_IS_NOT_310, # or NOT_RUNNING_ON_INF_EXP_DEV_PIPELINE, - reason="The goal of these test are to test the serving components of our feature", +@pytest.mark.skip( + reason="Testing against Python version 310 which is not supported anymore" + " https://github.com/aws/deep-learning-containers/blob/master/available_images.md", ) def test_happy_pytorch_sagemaker_endpoint_with_torch_serve( sagemaker_session, diff --git a/tests/unit/sagemaker/jumpstart/constants.py b/tests/unit/sagemaker/jumpstart/constants.py index 0c9065feb5..83e8a44a32 100644 --- a/tests/unit/sagemaker/jumpstart/constants.py +++ b/tests/unit/sagemaker/jumpstart/constants.py @@ -17393,7 +17393,7 @@ "texttable==1.6.7", "tokenize-rt==5.1.0", "tokenizers==0.13.3", - "torch==2.2.0", + "torch>=2.6.0", "transformers==4.33.3", "triton==2.2.0", "typing-extensions==4.8.0",