Skip to content

Commit

Permalink
fix learning test
Browse files Browse the repository at this point in the history
  • Loading branch information
svandenhaute committed Nov 1, 2023
1 parent 1425141 commit bd43827
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion psiflow/learning.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class BaseLearning:
pretraining_nstates: int = 50
pretraining_amplitude_pos: float = 0.05
pretraining_amplitude_box: float = 0.0
metrics: Metrics = Metrics()
metrics: Metrics = field(default_factory=lambda: Metrics()) # mutable default
atomic_energies: dict[str, Union[float, AppFuture]] = field(
default_factory=lambda: {}
)
Expand Down
1 change: 0 additions & 1 deletion tests/test_learning.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ def test_learning_save_load(gpu, tmp_path):
path_output.mkdir()
SequentialLearning(
path_output=path_output,
metrics=None,
pretraining_nstates=100,
)
learning_ = load_learning(path_output)
Expand Down

0 comments on commit bd43827

Please sign in to comment.