From 5e9e818794e21b368ca0bd4d97e83d7603a0cbf1 Mon Sep 17 00:00:00 2001 From: Duo <50307526+iProzd@users.noreply.github.com> Date: Wed, 23 Oct 2024 17:52:07 +0800 Subject: [PATCH 1/4] Chore(pt): slim uts for dpa1 --- .../tests/consistent/descriptor/test_dpa1.py | 24 +++++-------------- 1 file changed, 6 insertions(+), 18 deletions(-) diff --git a/source/tests/consistent/descriptor/test_dpa1.py b/source/tests/consistent/descriptor/test_dpa1.py index ed7884adb9..0d1fdab312 100644 --- a/source/tests/consistent/descriptor/test_dpa1.py +++ b/source/tests/consistent/descriptor/test_dpa1.py @@ -52,22 +52,22 @@ (4,), # tebd_dim ("concat", "strip"), # tebd_input_mode (True,), # resnet_dt - (True, False), # type_one_side + (False), # type_one_side (20,), # attn (0, 2), # attn_layer - (True, False), # attn_dotr + (True, ), # attn_dotr ([], [[0, 1]]), # excluded_types (0.0,), # env_protection (True, False), # set_davg_zero (1.0,), # scaling_factor - (True, False), # normalize + (True, ), # normalize (None, 1.0), # temperature (1e-5,), # ln_eps - (True, False), # smooth_type_embedding + (True, ), # smooth_type_embedding (True,), # concat_output_tebd ("float64",), # precision (True, False), # use_econf_tebd - (False, True), # use_tebd_bias + (False, ), # use_tebd_bias ) class TestDPA1(CommonTest, DescriptorTest, unittest.TestCase): @property @@ -127,11 +127,9 @@ def data(self) -> dict: def is_meaningless_zero_attention_layer_tests( self, attn_layer: int, - attn_dotr: bool, - normalize: bool, temperature: Optional[float], ) -> bool: - return attn_layer == 0 and (attn_dotr or normalize or temperature is not None) + return attn_layer == 0 and (temperature is not None) @property def skip_pt(self) -> bool: @@ -158,8 +156,6 @@ def skip_pt(self) -> bool: ) = self.param return CommonTest.skip_pt or self.is_meaningless_zero_attention_layer_tests( attn_layer, - attn_dotr, - normalize, temperature, ) @@ -188,8 +184,6 @@ def skip_dp(self) -> bool: ) = self.param return CommonTest.skip_dp or self.is_meaningless_zero_attention_layer_tests( attn_layer, - attn_dotr, - normalize, temperature, ) @@ -218,8 +212,6 @@ def skip_jax(self) -> bool: ) = self.param return not INSTALLED_JAX or self.is_meaningless_zero_attention_layer_tests( attn_layer, - attn_dotr, - normalize, temperature, ) @@ -250,8 +242,6 @@ def skip_array_api_strict(self) -> bool: not INSTALLED_ARRAY_API_STRICT or self.is_meaningless_zero_attention_layer_tests( attn_layer, - attn_dotr, - normalize, temperature, ) ) @@ -290,8 +280,6 @@ def skip_tf(self) -> bool: ) or self.is_meaningless_zero_attention_layer_tests( attn_layer, - attn_dotr, - normalize, temperature, ) ) From 24d2b02f60e1dbc4c05f0f9860a991be3d89836d Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 23 Oct 2024 09:53:05 +0000 Subject: [PATCH 2/4] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- source/tests/consistent/descriptor/test_dpa1.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source/tests/consistent/descriptor/test_dpa1.py b/source/tests/consistent/descriptor/test_dpa1.py index 0d1fdab312..084f387448 100644 --- a/source/tests/consistent/descriptor/test_dpa1.py +++ b/source/tests/consistent/descriptor/test_dpa1.py @@ -55,19 +55,19 @@ (False), # type_one_side (20,), # attn (0, 2), # attn_layer - (True, ), # attn_dotr + (True,), # attn_dotr ([], [[0, 1]]), # excluded_types (0.0,), # env_protection (True, False), # set_davg_zero (1.0,), # scaling_factor - (True, ), # normalize + (True,), # normalize (None, 1.0), # temperature (1e-5,), # ln_eps - (True, ), # smooth_type_embedding + (True,), # smooth_type_embedding (True,), # concat_output_tebd ("float64",), # precision (True, False), # use_econf_tebd - (False, ), # use_tebd_bias + (False,), # use_tebd_bias ) class TestDPA1(CommonTest, DescriptorTest, unittest.TestCase): @property From 9c70f3b41b128207a3811e8befa97a74d42c9aad Mon Sep 17 00:00:00 2001 From: Duo <50307526+iProzd@users.noreply.github.com> Date: Wed, 23 Oct 2024 18:07:29 +0800 Subject: [PATCH 3/4] Update source/tests/consistent/descriptor/test_dpa1.py Co-authored-by: Jinzhe Zeng Signed-off-by: Duo <50307526+iProzd@users.noreply.github.com> --- source/tests/consistent/descriptor/test_dpa1.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/tests/consistent/descriptor/test_dpa1.py b/source/tests/consistent/descriptor/test_dpa1.py index 084f387448..426fe9d9b2 100644 --- a/source/tests/consistent/descriptor/test_dpa1.py +++ b/source/tests/consistent/descriptor/test_dpa1.py @@ -52,7 +52,7 @@ (4,), # tebd_dim ("concat", "strip"), # tebd_input_mode (True,), # resnet_dt - (False), # type_one_side + (False,), # type_one_side (20,), # attn (0, 2), # attn_layer (True,), # attn_dotr From a0c9d3aae17e55708683e5217fb39b47b35746bc Mon Sep 17 00:00:00 2001 From: Duo <50307526+iProzd@users.noreply.github.com> Date: Wed, 23 Oct 2024 22:20:03 +0800 Subject: [PATCH 4/4] Update test_dpa1.py --- source/tests/consistent/descriptor/test_dpa1.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/tests/consistent/descriptor/test_dpa1.py b/source/tests/consistent/descriptor/test_dpa1.py index 426fe9d9b2..3d80e310d0 100644 --- a/source/tests/consistent/descriptor/test_dpa1.py +++ b/source/tests/consistent/descriptor/test_dpa1.py @@ -52,7 +52,7 @@ (4,), # tebd_dim ("concat", "strip"), # tebd_input_mode (True,), # resnet_dt - (False,), # type_one_side + (True,), # type_one_side (20,), # attn (0, 2), # attn_layer (True,), # attn_dotr