From 99c5569a8c289045dfc15a9585316f0ce3add955 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 4 Dec 2023 18:19:55 +0000 Subject: [PATCH 1/3] chore(pre-commit): [pre-commit.ci] autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/pre-commit/mirrors-clang-format: v17.0.4 → v17.0.6](https://github.com/pre-commit/mirrors-clang-format/compare/v17.0.4...v17.0.6) - [github.com/astral-sh/ruff-pre-commit: v0.1.5 → v0.1.6](https://github.com/astral-sh/ruff-pre-commit/compare/v0.1.5...v0.1.6) --- .pre-commit-config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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] From 26903cb45801aec819e18f461add7293a6b3f290 Mon Sep 17 00:00:00 2001 From: Xuehai Pan Date: Sat, 9 Dec 2023 23:21:48 +0800 Subject: [PATCH 2/3] lint: appease mypy --- torchopt/diff/implicit/decorator.py | 2 +- torchopt/distributed/api.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 From 1a62bc58f6ccf30448c5b97c0b896f361720f509 Mon Sep 17 00:00:00 2001 From: Xuehai Pan Date: Sun, 10 Dec 2023 01:34:36 +0800 Subject: [PATCH 3/3] fix: suppress CI warnings --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) 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', ]