You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The config loaded from a HuggingFace model cannot be passed to transformers_pipeline, rendering custom_pipelines unusable. Similarly, externally loading config results in the error optimum.pipelines.pipelines_base.load_ort_pipeline() got multiple values for keyword argument 'config'. Furthermore, since transformers_pipeline does not support the trust_remote_code parameter, proper usage of custom_pipelines remains impossible.
custom_tasks= {}
ifconfigisnotNoneandlen(getattr(config, "custom_pipelines", {})) >0:
custom_tasks=config.custom_pipelines# ...# Retrieve the taskiftaskincustom_tasks:
normalized_task=tasktargeted_task, task_options=clean_custom_task(custom_tasks[task])
ifpipeline_classisNone:
ifnottrust_remote_code:
raiseValueError(
"Loading this pipeline requires you to execute the code in the pipeline file in that"" repo on your local machine. Make sure you have read the code there to avoid malicious use, then"" set the option `trust_remote_code=True` to remove this error."
)
class_ref=targeted_task["impl"]
pipeline_class=get_class_from_dynamic_module(
class_ref,
model,
code_revision=code_revision,
**hub_kwargs,
)
The text was updated successfully, but these errors were encountered:
The
config
loaded from a HuggingFace model cannot be passed totransformers_pipeline
, renderingcustom_pipelines
unusable. Similarly, externally loadingconfig
results in the erroroptimum.pipelines.pipelines_base.load_ort_pipeline() got multiple values for keyword argument 'config'
. Furthermore, sincetransformers_pipeline
does not support thetrust_remote_code
parameter, proper usage ofcustom_pipelines
remains impossible.config
load in optimum pipelineoptimum/optimum/pipelines/pipelines_base.py
Lines 336 to 339 in 4fdeea7
config
also cannot be passed through externalkwargs
parameters.optimum/optimum/pipelines/pipelines_base.py
Lines 370 to 383 in 4fdeea7
config
not pass to transformers pipelineoptimum/optimum/pipelines/pipelines_base.py
Lines 390 to 397 in 4fdeea7
since the
model
is already loaded,transformers_pipeline
will not load the config.https://github.com/huggingface/transformers/blob/2e752ead46a8845e8a160d2043c1336447895690/src/transformers/pipelines/__init__.py#L825-L852
As a result,
custom_pipelines
cannot be used.https://github.com/huggingface/transformers/blob/2e752ead46a8845e8a160d2043c1336447895690/src/transformers/pipelines/__init__.py#L855-L856
The text was updated successfully, but these errors were encountered: