From ea4e43dff15b4731caf159165f23c99ff1872827 Mon Sep 17 00:00:00 2001 From: Bhuvanesh-Verma Date: Fri, 26 Jul 2024 13:35:48 +0200 Subject: [PATCH] poetry dependencies for torch in macOS with M-series (#144) * poetry dependencies for torch in macOS with M-series * fix default torch dependency * call `poetry lock --no-update` to remove added line again --------- Co-authored-by: Arne Binder --- poetry.lock | 2 +- pyproject.toml | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/poetry.lock b/poetry.lock index ce28193a..e401d64b 100644 --- a/poetry.lock +++ b/poetry.lock @@ -2522,4 +2522,4 @@ multidict = ">=4.0" [metadata] lock-version = "2.0" python-versions = "^3.9" -content-hash = "ea3946780a22876c33999299c9fa462359bcee85533566a327c9b1317b170c6e" +content-hash = "a0c2cbe4c03c19204cd204d2d9a2af1738f324924f3d5ab556e1b66f71c929b3" diff --git a/pyproject.toml b/pyproject.toml index e1522780..1b81ddd8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -36,9 +36,11 @@ pyarrow = "^13" pie-modules = ">=0.11.1,<0.13.0" torch = [ # default - {version = "^2.1.0+cpu", source = "pytorch", markers = "sys_platform != 'darwin' or platform_machine != 'x86_64'"}, + {version = "^2.1.0+cpu", source = "pytorch", markers = "sys_platform != 'darwin' or (platform_machine != 'arm64' and platform_machine != 'x86_64')"}, # torch >= 2.3.0 is not available for macOS on intel {version = ">=2.1.0,<2.3.0", source = "pypi", markers = "sys_platform == 'darwin' and platform_machine == 'x86_64'"}, + # macOS with M-series + {version = "^2.1.0", source = "pypi", markers = "sys_platform == 'darwin' and platform_machine == 'arm64'"}, ] pytest = "^7.4.2" pytest-cov = "^4.1.0"