From 07019459ee019fd012095daf8951c70ba6e24f4b Mon Sep 17 00:00:00 2001 From: Eric Kerfoot <17726042+ericspod@users.noreply.github.com> Date: Thu, 18 Sep 2025 21:30:02 +0100 Subject: [PATCH 1/2] Updating transformers versions for security Signed-off-by: Eric Kerfoot <17726042+ericspod@users.noreply.github.com> --- docs/requirements.txt | 2 +- requirements-dev.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/requirements.txt b/docs/requirements.txt index d155c265ad..f44f41a6b2 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -21,7 +21,7 @@ sphinxcontrib-serializinghtml sphinx-autodoc-typehints==1.11.1 pandas einops -transformers>=4.36.0, <4.41.0; python_version <= '3.10' +transformers>=4.53.0 mlflow>=2.12.2 clearml>=1.10.0rc0 tensorboardX diff --git a/requirements-dev.txt b/requirements-dev.txt index 5573e2d30c..fda405eff2 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -35,7 +35,7 @@ tifffile; platform_system == "Linux" or platform_system == "Darwin" pandas requests einops -transformers>=4.36.0, <4.41.0; python_version <= '3.10' +transformers>=4.53.0 mlflow>=2.12.2 clearml>=1.10.0rc0 matplotlib>=3.6.3 From b52edd3f1c2d6a189e0bee4143e3fac254df4ec3 Mon Sep 17 00:00:00 2001 From: Eric Kerfoot <17726042+ericspod@users.noreply.github.com> Date: Thu, 18 Sep 2025 21:47:28 +0100 Subject: [PATCH 2/2] Possible fix for transformers version Signed-off-by: Eric Kerfoot <17726042+ericspod@users.noreply.github.com> --- monai/networks/nets/transchex.py | 1 + 1 file changed, 1 insertion(+) diff --git a/monai/networks/nets/transchex.py b/monai/networks/nets/transchex.py index bd756ec214..73830f87df 100644 --- a/monai/networks/nets/transchex.py +++ b/monai/networks/nets/transchex.py @@ -333,6 +333,7 @@ def __init__( "chunk_size_feed_forward": chunk_size_feed_forward, "is_decoder": is_decoder, "add_cross_attention": add_cross_attention, + "_attn_implementation": "eager", } if not (0 <= drop_out <= 1): raise ValueError("dropout_rate should be between 0 and 1.")