Skip to content
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

Fixed UT run_pysdk_tests.sh #521

Merged
merged 2 commits into from
Nov 20, 2024
Merged
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
41 changes: 36 additions & 5 deletions test/test_artifacts/v2/scripts/run_pysdk_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,44 @@ git checkout tags/v$pysdk_version

# Install test dependencies of sagemaker-python-sdk
# Using pip as some of the packages are not available on conda-forge
pip install -r requirements/extras/test_requirements.txt
pip install --use-deprecated=legacy-resolver -r requirements/extras/test_requirements.txt
Copy link
Contributor

Choose a reason for hiding this comment

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

What does --use-deprecated=legacy-resolver do?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah so without using it, getting the following error :

The conflict is caused by:
onnx 1.15.0 depends on protobuf>=3.20.2
tensorflow 2.12.0 depends on protobuf!=4.21.0, 1=4.21.1, 1=4.21.2, 1=4.21.3, 1=4.21.4, 1=4.21.5, <5.0.0dev and >=3.20.3
mlflow 2.12.2 depends on protobuf<5 and >=3.12.0
tensorboard 2.12.0 depends on protobuf>=3.19.6
opentelemetry-proto 1.28.0 depends on protobuf<6.0 and >=5.0

so for opentelemetry-proto 1.28.0, protobuf version should be >=5.0 and the current protobuf Version: 4.25.3

To resolve this, flag --use-deprecated=legacy-resolver is being added.


# Run the unit tests, ignoring tests which require AWS Configuration
# TODO: Re-evaluate the ignored tests since we are setting the AWS_DEFAULT_REGION as part of the Dockerfile.
pytest tests/unit --ignore=tests/unit/sagemaker/feature_store/ --ignore=tests/unit/sagemaker/jumpstart/ --ignore=tests/unit/sagemaker/workflow/ \
--ignore=tests/unit/sagemaker/async_inference --ignore=tests/unit/test_model_card.py --ignore=tests/unit/test_model_card.py --ignore=tests/unit/test_processing.py \
--ignore=tests/unit/test_tensorboard.py --ignore=tests/unit/sagemaker/async_inference --ignore=tests/unit/sagemaker/experiments --ignore tests/unit/sagemaker/local \
# Test cases are being skipped where S3 Operations are being executed, accessing local container server.
pytest tests/unit --ignore tests/unit/sagemaker/feature_store/ --ignore tests/unit/sagemaker/jumpstart/ --ignore tests/unit/sagemaker/workflow/ \
--ignore tests/unit/sagemaker/async_inference --ignore tests/unit/test_model_card.py --ignore tests/unit/test_model_card.py --ignore tests/unit/test_processing.py \
--ignore tests/unit/test_tensorboard.py --ignore tests/unit/sagemaker/async_inference --ignore tests/unit/sagemaker/experiments --ignore tests/unit/sagemaker/local \
--ignore tests/unit/sagemaker/monitor/test_data_capture_config.py --ignore tests/unit/sagemaker/experiments --ignore tests/unit/sagemaker/remote_function \
--ignore tests/unit/sagemaker/model/test_deploy.py --deselect tests/unit/test_estimator.py::test_insert_invalid_source_code_args \
--ignore tests/unit/sagemaker/model/test_deploy.py --ignore tests/unit/sagemaker/image_uris/jumpstart/test_common.py \
--deselect tests/unit/sagemaker/serve/builder/test_djl_builder.py::test_tune_for_djl_local_container_deep_ping_ex \
--deselect tests/unit/sagemaker/serve/builder/test_djl_builder.py::test_tune_for_djl_local_container_invoke_ex \
--deselect tests/unit/sagemaker/serve/builder/test_djl_builder.py::test_tune_for_djl_local_container_load_ex \
--deselect tests/unit/sagemaker/serve/builder/test_djl_builder.py::test_tune_for_djl_local_container_oom_ex \
--deselect tests/unit/sagemaker/serve/builder/test_model_builder.py::TestModelBuilder::test_build_negative_path_when_schema_builder_not_present \
--deselect tests/unit/sagemaker/serve/builder/test_model_builder.py::TestModelBuilder::test_build_task_override_with_invalid_task_provided \
--deselect tests/unit/sagemaker/serve/builder/test_model_builder.py::TestModelBuilder::test_model_server_override_djl_with_model \
--deselect tests/unit/sagemaker/serve/builder/test_model_builder.py::TestModelBuilder::test_model_server_override_tei_with_model \
--deselect tests/unit/sagemaker/serve/builder/test_model_builder.py::TestModelBuilder::test_model_server_override_tensor_with_model \
--deselect tests/unit/sagemaker/serve/builder/test_model_builder.py::TestModelBuilder::test_model_server_override_tgi_with_model \
--deselect tests/unit/sagemaker/serve/builder/test_model_builder.py::TestModelBuilder::test_model_server_override_torchserve_with_model \
--deselect tests/unit/sagemaker/serve/builder/test_model_builder.py::TestModelBuilder::test_model_server_override_transformers_with_model \
--deselect tests/unit/sagemaker/serve/builder/test_model_builder.py::TestModelBuilder::test_model_server_override_triton_with_model \
--deselect tests/unit/sagemaker/serve/builder/test_tei_builder.py::TestTEIBuilder::test_build_deploy_for_tei_local_container_and_remote_container \
--deselect tests/unit/sagemaker/serve/builder/test_tei_builder.py::TestTEIBuilder::test_image_uri_override \
--deselect tests/unit/sagemaker/serve/builder/test_transformers_builder.py::TestTransformersBuilder::test_build_deploy_for_transformers_local_container_and_remote_container \
--deselect tests/unit/sagemaker/serve/builder/test_transformers_builder.py::TestTransformersBuilder::test_failure_hf_md \
--deselect tests/unit/sagemaker/serve/builder/test_transformers_builder.py::TestTransformersBuilder::test_image_uri_override \
--deselect tests/unit/sagemaker/serve/detector/test_image_detector.py::TestImageDetector::test_detect_latest_downcast_xgb \
--deselect tests/unit/sagemaker/serve/model_server/tei/test_server.py::TeiServerTests::test_start_invoke_destroy_local_tei_server \
--deselect tests/unit/sagemaker/serve/model_server/triton/test_server.py::TritonServerTests::test_start_invoke_destroy_local_triton_server_cpu \
--deselect tests/unit/sagemaker/serve/model_server/triton/test_server.py::TritonServerTests::test_start_invoke_destroy_local_triton_server_gpu \
--deselect tests/unit/test_estimator.py::test_insert_invalid_source_code_args \
--deselect tests/unit/sagemaker/model_uris/jumpstart/test_common.py::test_jumpstart_common_model_uri \
--deselect tests/unit/sagemaker/monitor/test_model_monitoring.py::test_model_quality_monitor_update_failure \
--deselect tests/unit/sagemaker/script_uris/jumpstart/test_common.py::test_jumpstart_common_script_uri \
--deselect tests/unit/sagemaker/serve/builder/test_djl_builder.py::TestDjlBuilder::test_tune_for_djl_local_container_deep_ping_ex \
--deselect tests/unit/sagemaker/serve/builder/test_djl_builder.py::TestDjlBuilder::test_tune_for_djl_local_container_invoke_ex \
--deselect tests/unit/sagemaker/serve/builder/test_djl_builder.py::TestDjlBuilder::test_tune_for_djl_local_container_load_ex \
--deselect tests/unit/sagemaker/serve/builder/test_djl_builder.py::TestDjlBuilder::test_tune_for_djl_local_container_oom_ex \
--deselect tests/unit/sagemaker/tensorflow/test_estimator.py::test_insert_invalid_source_code_args || exit $?