From cfbf09d9a0653d1731a5035517471bfb13373a23 Mon Sep 17 00:00:00 2001
From: Paul Andrey <paul.andrey@inria.fr>
Date: Thu, 5 Oct 2023 11:24:10 +0200
Subject: [PATCH] Update 'torch' extra dependency specifiers.

- Drop support for Torch 1.10-1.12, which complexify rules for functorch.
- Make "torch", "torch1" and "torch2" specifiers deal merely with Torch,
  leaving Opacus to the "dp" specifier, as should be.
- Have functorch be installed together with torch, removing some burden
  from our specifier, and enabling support for the new Torch 2.1.
---
 pyproject.toml | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)

diff --git a/pyproject.toml b/pyproject.toml
index 1a3f87a1..e583f1b1 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -73,17 +73,12 @@ tensorflow = [
     "tensorflow ~= 2.5",
 ]
 torch = [  # generic requirements for Torch
-    "functorch >= 1.10, < 3.0",  # note: unused with torch >=2.0
-    "torch >= 1.10, < 3.0",
+    "torch >= 1.13, < 3.0",
 ]
-torch1 = [  # Torch 1.13 (latest pre-2.0 version) + Opacus
-    "functorch ~= 1.13.0",
-    "opacus ~= 1.3.0",
+torch1 = [  # Torch 1.13 (latest pre-2.0 version)
     "torch ~= 1.13.0",
 ]
-torch2 = [  # Torch 2.X version + Opacus
-    "functorch ~= 2.0",  # unused, but useful to linters and pip
-    "opacus ~= 1.4",
+torch2 = [  # Torch 2.X version
     "torch ~= 2.0",
 ]
 websockets = [
-- 
GitLab