From 312078782d136f2bbc2fc71e5bf10a8ff8b5b4a5 Mon Sep 17 00:00:00 2001 From: Jeffrey Martin Date: Mon, 9 Dec 2024 12:10:32 -0600 Subject: [PATCH] Restrict transformers version until MPS issue is addressed As of transformers 4.47.0, the `device` specified for some detectors that utilize huffingface models is not applied in some macOS contexts. To be specific when `cpu` is specified `mps` code paths are being activated and raise exceptions as `mps` was not configured or initialized. Signed-off-by: Jeffrey Martin --- pyproject.toml | 2 +- requirements.txt | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 43bc10004..31f6c1a7a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -45,7 +45,7 @@ classifiers = [ requires-python = ">=3.10" dependencies = [ "base2048>=0.1.3", - "transformers>=4.43.0", + "transformers>=4.43.0,<4.47.0", "datasets>=2.14.6,<2.17", "colorama>=0.4.3", "tqdm>=4.64.0", diff --git a/requirements.txt b/requirements.txt index 4b8ea3b81..2d3b71292 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ base2048>=0.1.3 -transformers>=4.43.0 +transformers>=4.43.0,<4.47.0 datasets>=2.14.6,<2.17 colorama>=0.4.3 tqdm>=4.64.0 @@ -47,4 +47,4 @@ pytest_httpserver>=1.1.0 black==24.4.2 pylint>=3.1.0 # calibration -scipy>=1.14.0 \ No newline at end of file +scipy>=1.14.0