Minor error condition bug fix (#33781)
* Error condition bug fix * Update error message * Update src/transformers/models/qwen2_vl/modeling_qwen2_vl.py Co-authored-by: Pavel Iakubovskii <qubvel@gmail.com> * Making change in the rest of the repo * Formatting * Formatting with ruff --------- Co-authored-by: Pavel Iakubovskii <qubvel@gmail.com>
This commit is contained in:
@@ -882,7 +882,7 @@ class DummyModel(DummyPreTrainedModel):
|
||||
|
||||
if (input_ids is None) ^ (inputs_embeds is not None):
|
||||
raise ValueError(
|
||||
"You cannot specify both input_ids and inputs_embeds at the same time, and must specify either one"
|
||||
"You must specify exactly one of input_ids or inputs_embeds"
|
||||
)
|
||||
|
||||
if self.gradient_checkpointing and self.training and use_cache:
|
||||
|
||||
@@ -759,7 +759,7 @@ class MyNewModel2Model(MyNewModel2PreTrainedModel):
|
||||
|
||||
if (input_ids is None) ^ (inputs_embeds is not None):
|
||||
raise ValueError(
|
||||
"You cannot specify both input_ids and inputs_embeds at the same time, and must specify either one"
|
||||
"You must specify exactly one of input_ids or inputs_embeds"
|
||||
)
|
||||
|
||||
if self.gradient_checkpointing and self.training and use_cache:
|
||||
|
||||
Reference in New Issue
Block a user