Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Jan 20, 2025
1 parent d113b69 commit 828f1bb
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion apax/nn/builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def build_readout(self, head_config, is_feature_fn=False, only_use_n_layers=None
dtype = head_config["dtype"]
else:
raise KeyError("No dtype specified in config")

nn_layers = head_config["nn"]
if only_use_n_layers is not None:
nn_layers = nn_layers[:only_use_n_layers]
Expand Down
2 changes: 1 addition & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def example_atoms_list(num_data: int, pbc: bool, calc_results: List[str]) -> Ato
for _ in range(num_data):
num_atoms = np.random.randint(10, 15)
atoms = create_example_atoms(num_atoms, pbc, calc_results)

atoms_list.append(atoms)

return atoms_list
Expand Down
2 changes: 1 addition & 1 deletion tests/unit_tests/nn/test_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def test_builder_feature_model():
model = builder.build_energy_model()
key = jax.random.PRNGKey(0)
params = model.init(key, R, Z, idx, box, offsets)

model = builder.build_feature_model(only_use_n_layers=0, init_box=box)
out = model.apply(params, R, Z, idx, box, offsets)
assert out.shape == (360,)
Expand Down

0 comments on commit 828f1bb

Please sign in to comment.