From e60e645e5f959ae90da24d25c308ba8df360b1af Mon Sep 17 00:00:00 2001 From: Guokai Ma Date: Thu, 28 Sep 2023 14:27:06 +0800 Subject: [PATCH 1/3] add a white change that breaks formatting --- setup.py | 1 + 1 file changed, 1 insertion(+) diff --git a/setup.py b/setup.py index d9aed9b47bd8..30d4c166c8c5 100755 --- a/setup.py +++ b/setup.py @@ -211,6 +211,7 @@ def op_enabled(op_name): def create_dir_symlink(src, dest): + if not os.path.islink(dest): if os.path.exists(dest): os.remove(dest) From ed95d21e96308b11332d1c4720d225a53c28d187 Mon Sep 17 00:00:00 2001 From: Guokai Ma Date: Sat, 30 Sep 2023 22:38:11 +0800 Subject: [PATCH 2/3] fix TestModelTask --- tests/unit/inference/test_inference.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/unit/inference/test_inference.py b/tests/unit/inference/test_inference.py index 894f040be207..602c015dc1ee 100644 --- a/tests/unit/inference/test_inference.py +++ b/tests/unit/inference/test_inference.py @@ -280,6 +280,9 @@ def test( if invalid_test_msg: pytest.skip(invalid_test_msg) + if dtype not in get_accelerator().supported_dtypes(): + pytest.skip(f"Acceleraor {get_accelerator().device_name()} does not support {dtype}.") + model, task = model_w_task local_rank = int(os.getenv("LOCAL_RANK", "0")) From f0022b076be2e06aea3e1c8d4e7b81f033a04acc Mon Sep 17 00:00:00 2001 From: Guokai Ma Date: Sun, 1 Oct 2023 11:39:08 +0800 Subject: [PATCH 3/3] Skip TestModelTask if InferenceBuilder are not implemented --- tests/unit/inference/test_inference.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/unit/inference/test_inference.py b/tests/unit/inference/test_inference.py index 602c015dc1ee..bf8182796c86 100644 --- a/tests/unit/inference/test_inference.py +++ b/tests/unit/inference/test_inference.py @@ -283,6 +283,9 @@ def test( if dtype not in get_accelerator().supported_dtypes(): pytest.skip(f"Acceleraor {get_accelerator().device_name()} does not support {dtype}.") + if not deepspeed.ops.__compatible_ops__[InferenceBuilder.NAME]: + pytest.skip("This op had not been implemented on this system.", allow_module_level=True) + model, task = model_w_task local_rank = int(os.getenv("LOCAL_RANK", "0"))