diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 975bb7b6..3ca22436 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -26,11 +26,11 @@ repos: - id: debug-statements - id: double-quote-string-fixer - repo: https://github.com/pre-commit/mirrors-clang-format - rev: v17.0.4 + rev: v17.0.6 hooks: - id: clang-format - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.1.5 + rev: v0.1.6 hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix] diff --git a/pyproject.toml b/pyproject.toml index 47424855..31d20f88 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -314,4 +314,5 @@ filterwarnings = [ 'ignore:Explicitly requested dtype float64 requested in .* is not available, and will be truncated to dtype float32\.:UserWarning', 'ignore:jax\.numpy\.DeviceArray is deprecated\. Use jax\.Array\.:DeprecationWarning', 'ignore:.*functorch.*deprecate.*:UserWarning', + 'ignore:.*Apple Paravirtual device.*:UserWarning', ] diff --git a/torchopt/diff/implicit/decorator.py b/torchopt/diff/implicit/decorator.py index 03720a49..1fc9bb4a 100644 --- a/torchopt/diff/implicit/decorator.py +++ b/torchopt/diff/implicit/decorator.py @@ -279,7 +279,7 @@ def make_custom_vjp_solver_fn( # pylint: disable-next=missing-class-docstring,abstract-method class ImplicitMetaGradient(Function): @staticmethod - def forward( # type: ignore[override] # pylint: disable=arguments-differ + def forward( # pylint: disable=arguments-differ ctx: Any, *flat_args: Any, ) -> tuple[Any, ...]: diff --git a/torchopt/distributed/api.py b/torchopt/distributed/api.py index fb7461e4..86c2cfe8 100644 --- a/torchopt/distributed/api.py +++ b/torchopt/distributed/api.py @@ -324,7 +324,7 @@ def remote_async_call( if reducer is not None: return cast( Future[U], - future.then(lambda fut: cast(Callable[[Iterable[T]], U], reducer)(fut.wait())), + future.then(lambda fut: reducer(fut.wait())), ) return future