From da18b6eb08b0f2b77eb620fd097258807b3dc3cb Mon Sep 17 00:00:00 2001 From: Jingya HUANG <44135271+JingyaHuang@users.noreply.github.com> Date: Mon, 18 Sep 2023 10:34:03 +0100 Subject: [PATCH] Update optimum/onnxruntime/trainer_seq2seq.py Co-authored-by: fxmarty <9808326+fxmarty@users.noreply.github.com> --- optimum/onnxruntime/trainer_seq2seq.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/optimum/onnxruntime/trainer_seq2seq.py b/optimum/onnxruntime/trainer_seq2seq.py index 7e6a67a3bba..0a2938802d2 100644 --- a/optimum/onnxruntime/trainer_seq2seq.py +++ b/optimum/onnxruntime/trainer_seq2seq.py @@ -51,6 +51,10 @@ if is_accelerate_available(): from accelerate import __version__ as accelerate_version +else: + raise ImportError( + "The package `accelerate` is required to use the ORTTrainer. Please install it following https://huggingface.co/docs/accelerate/basic_tutorials/install." + ) logger = logging.get_logger(__name__)