mirror of
https://github.com/DS4SD/docling.git
synced 2025-08-01 15:02:21 +00:00
chore: Accept AcceleratorDevice enum type
Signed-off-by: Christoph Auer <cau@zurich.ibm.com>
This commit is contained in:
parent
dd0728e646
commit
0bca78a84b
@ -39,7 +39,7 @@ class AcceleratorOptions(BaseSettings):
|
|||||||
)
|
)
|
||||||
|
|
||||||
num_threads: int = 4
|
num_threads: int = 4
|
||||||
device: str = "auto"
|
device: Union[str, AcceleratorDevice] = "auto"
|
||||||
|
|
||||||
@field_validator("device")
|
@field_validator("device")
|
||||||
def validate_device(cls, value):
|
def validate_device(cls, value):
|
||||||
|
Loading…
Reference in New Issue
Block a user