Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0
rev: v6.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-added-large-files

- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.12.7
rev: v0.16.4
hooks:
# Run the linter.
- id: ruff-check
Expand Down
2 changes: 1 addition & 1 deletion benchmark/benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
from typing import Any

import tomllib
from chemfit.async_wrapper_cob import AsyncWrapperCOB
from dask.distributed import Client
from loky import ProcessPoolExecutor
from mpi4py import MPI
Expand All @@ -20,7 +21,6 @@
EvaluateContext,
QuantityComputerObjectiveFunction,
)
from chemfit.async_wrapper_cob import AsyncWrapperCOB
from chemfit.combined_objective_function import CombinedObjectiveFunction
from chemfit.mpi_wrapper_cob import MPIWrapperCOB
from chemfit.wrap_funcs import to_quantity_computer
Expand Down
5 changes: 3 additions & 2 deletions tests/test_scme_fitter.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,8 +210,9 @@ def construct_objective_function(

for p, t, e in zip(paths, tags, energies):
ob_term = QuantityComputerObjectiveFunction(
loss_function=lambda quants, e=e: (quants["energy"] - e) ** 2
/ quants["n_atoms"] ** 2,
loss_function=lambda quants, e=e: (
(quants["energy"] - e) ** 2 / quants["n_atoms"] ** 2
),
quantity_computer=SinglePointASEComputer(
calc_factory=scme_factories.SCMECalculatorFactory(
default_scme_params=DEFAULT_PARAMS,
Expand Down
Loading