mirror of
https://github.com/DS4SD/docling.git
synced 2025-07-27 04:24:45 +00:00
fix: incorrect code suggestion for setting device type
The warning suggests setting device to a enum value but decide_device function accepts strings only; which makes the passed device value (which is not a string) to never match anything in `==` comparisons with other strings. Signed-off-by: Ihar Hrachyshka <ihar.hrachyshka@gmail.com>
This commit is contained in:
parent
71148eb381
commit
e31bb03bff
@ -69,7 +69,7 @@ class EasyOcrModel(BaseOcrModel):
|
||||
else:
|
||||
warnings.warn(
|
||||
"Deprecated field. Better to set the `accelerator_options.device` in `pipeline_options`. "
|
||||
"When `use_gpu and accelerator_options.device == AcceleratorDevice.CUDA` the GPU is used "
|
||||
"When `use_gpu and accelerator_options.device == AcceleratorDevice.CUDA.value` the GPU is used "
|
||||
"to run EasyOCR. Otherwise, EasyOCR runs in CPU."
|
||||
)
|
||||
use_gpu = self.options.use_gpu
|
||||
|
Loading…
Reference in New Issue
Block a user