Skip to content

Commit

Permalink
Merge branch 'main' into plotly-bal
Browse files Browse the repository at this point in the history
  • Loading branch information
PythonFZ committed Dec 16, 2024
2 parents 71f66ee + 420e087 commit 2bfe969
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ repos:

- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.8.1
rev: v0.8.2
hooks:
# Run the linter.
- id: ruff
Expand Down
6 changes: 3 additions & 3 deletions apax/nodes/selection.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,9 @@ def excluded_frames(self) -> list[ase.Atoms]:

def select_atoms(self, atoms_lst: typing.List[ase.Atoms]) -> typing.List[int]:
if isinstance(self.models, list):
param_files = [m._parameter["data"]["directory"] for m in self.models]
param_files = [m.parameter["data"]["directory"] for m in self.models]
else:
param_files = self.models._parameter["data"]["directory"]
param_files = self.models.parameter["data"]["directory"]

if self.rank_all:
selection_batch_size = None
Expand Down Expand Up @@ -181,7 +181,7 @@ def select_atoms(self, atoms_lst: typing.List[ase.Atoms]) -> typing.List[int]:
self._get_distances_plot(distances, last_selected)
self._get_pca_plot(features_train, features_selection, features_remaining)
self._get_selection_plot(atoms_lst, ranking)
return list(ranking)
return [int(x) for x in ranking]

def _get_selection_plot(
self, atoms_lst: typing.List[ase.Atoms], indices: typing.List[int]
Expand Down

0 comments on commit 2bfe969

Please sign in to comment.