Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Signed-off-by: Jinzhe Zeng <[email protected]>
  • Loading branch information
njzjz and coderabbitai[bot] authored May 24, 2024
1 parent c7d560f commit fa8b2a6
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 13 deletions.
1 change: 0 additions & 1 deletion source/tests/tf/test_descrpt_se_a_type.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,6 @@ def test_descriptor_one_side(self):
test_size = jdata["numb_test"]

Check warning

Code scanning / CodeQL

Variable defined multiple times Warning test

This assignment to 'test_size' is unnecessary as it is
redefined
before this value is used.
batch_size = 1
test_size = 1
stop_batch = jdata["stop_batch"]
rcut = jdata["model"]["descriptor"]["rcut"]
sel = jdata["model"]["descriptor"]["sel"]
ntypes = len(sel)
Expand Down
11 changes: 0 additions & 11 deletions source/tests/tf/test_model_se_atten.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ def test_model(self):

systems = jdata["systems"]
set_pfx = "set"
batch_size = jdata["batch_size"]
test_size = jdata["numb_test"]

Check warning

Code scanning / CodeQL

Variable defined multiple times Warning test

This assignment to 'test_size' is unnecessary as it is
redefined
before this value is used.
batch_size = 1
test_size = 1
Expand Down Expand Up @@ -202,8 +201,6 @@ def test_exclude_types(self):

systems = jdata["systems"]
set_pfx = "set"
batch_size = jdata["batch_size"]
test_size = jdata["numb_test"]
batch_size = 1
test_size = 1
rcut = jdata["model"]["descriptor"]["rcut"]
Expand Down Expand Up @@ -275,8 +272,6 @@ def test_compressible_model(self):

systems = jdata["systems"]
set_pfx = "set"
batch_size = jdata["batch_size"]
test_size = jdata["numb_test"]
batch_size = 1
test_size = 1
rcut = jdata["model"]["descriptor"]["rcut"]
Expand Down Expand Up @@ -431,7 +426,6 @@ def test_compressible_exclude_types(self):
systems = jdata["systems"]
set_pfx = "set"
batch_size = jdata["batch_size"]

Check warning

Code scanning / CodeQL

Variable defined multiple times Warning test

This assignment to 'batch_size' is unnecessary as it is
redefined
before this value is used.
test_size = jdata["numb_test"]
batch_size = 1
test_size = 1
rcut = jdata["model"]["descriptor"]["rcut"]
Expand Down Expand Up @@ -505,11 +499,9 @@ def test_stripped_type_embedding_model(self):

systems = jdata["systems"]
set_pfx = "set"
batch_size = jdata["batch_size"]
test_size = jdata["numb_test"]

Check warning

Code scanning / CodeQL

Variable defined multiple times Warning test

This assignment to 'test_size' is unnecessary as it is
redefined
before this value is used.
batch_size = 1
test_size = 1
stop_batch = jdata["stop_batch"]
rcut = jdata["model"]["descriptor"]["rcut"]

data = DataSystem(systems, set_pfx, batch_size, test_size, rcut, run_opt=None)
Expand Down Expand Up @@ -744,11 +736,8 @@ def test_smoothness_of_stripped_type_embedding_smooth_model(self):

systems = jdata["systems"]
set_pfx = "set"
batch_size = jdata["batch_size"]
test_size = jdata["numb_test"]
batch_size = 1
test_size = 1
stop_batch = jdata["stop_batch"]
rcut = jdata["model"]["descriptor"]["rcut"]

data = DataSystem(systems, set_pfx, batch_size, test_size, rcut, run_opt=None)
Expand Down
1 change: 0 additions & 1 deletion source/tests/tf/test_polar_se_a_tebd.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ def test_model(self):
test_size = jdata["numb_test"]

Check warning

Code scanning / CodeQL

Variable defined multiple times Warning test

This assignment to 'test_size' is unnecessary as it is
redefined
before this value is used.
batch_size = 1
test_size = 1
stop_batch = jdata["stop_batch"]
rcut = jdata["model"]["descriptor"]["rcut"]

data = DataSystem(systems, set_pfx, batch_size, test_size, rcut, run_opt=None)
Expand Down

0 comments on commit fa8b2a6

Please sign in to comment.