mirror of
https://github.com/huggingface/lerobot.git
synced 2026-05-14 16:19:45 +00:00
fix(annotate): replace Literal types with str for older draccus
Older draccus versions (e.g. 0.10.x bundled in some envs) lack a decoder for typing.Literal and raise: No decoding function for type typing.Literal['vllm', 'transformers', 'stub'] Switching VlmConfig.backend from Literal to str works under every draccus version. The runtime branch in vlm_client.make_vlm_client already validates the value and raises ValueError on unknown backends, so the constraint stays enforced. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -18,7 +18,6 @@ from __future__ import annotations
|
||||
|
||||
from dataclasses import dataclass, field
|
||||
from pathlib import Path
|
||||
from typing import Literal
|
||||
|
||||
|
||||
@dataclass
|
||||
@@ -61,7 +60,8 @@ class Module3Config:
|
||||
class VlmConfig:
|
||||
"""Shared Qwen-VL client configuration."""
|
||||
|
||||
backend: Literal["vllm", "transformers", "stub"] = "vllm"
|
||||
backend: str = "vllm"
|
||||
"""One of ``vllm``, ``transformers``, or ``stub`` (tests only)."""
|
||||
model_id: str = "Qwen/Qwen3.6-27B-FP8"
|
||||
max_new_tokens: int = 512
|
||||
temperature: float = 0.2
|
||||
|
||||
Reference in New Issue
Block a user