studio: thread List[str] quantization_method through orchestrator + worker
ExportOrchestrator.export_gguf's parameter type is widened from str to List[str]. Worker's cmd.get default becomes ["Q4_K_M"] to match. The orchestrator pickles the list into the mp.Queue cmd dict; the subprocess worker hands it to ExportBackend.export_gguf unchanged. Both layers are pure passthrough for this field.
This commit is contained in:
parent
176ae1f17a
commit
b9e5a13d4e
2 changed files with 7 additions and 3 deletions
|
|
@ -310,12 +310,16 @@ class ExportOrchestrator:
|
|||
def export_gguf(
|
||||
self,
|
||||
save_directory: str,
|
||||
quantization_method: str = "Q4_K_M",
|
||||
quantization_method: List[str],
|
||||
push_to_hub: bool = False,
|
||||
repo_id: Optional[str] = None,
|
||||
hf_token: Optional[str] = None,
|
||||
) -> Tuple[bool, str]:
|
||||
"""Export model in GGUF format."""
|
||||
"""
|
||||
Export model in GGUF format. The caller must supply a normalized
|
||||
list of lowercase quantization method strings (see
|
||||
`models.export.normalize_gguf_quantization_method`).
|
||||
"""
|
||||
return self._run_export(
|
||||
"gguf",
|
||||
{
|
||||
|
|
|
|||
|
|
@ -139,7 +139,7 @@ def _handle_export(backend, cmd: dict, resp_queue: Any) -> None:
|
|||
elif export_type == "gguf":
|
||||
success, message = backend.export_gguf(
|
||||
save_directory = cmd.get("save_directory", ""),
|
||||
quantization_method = cmd.get("quantization_method", "Q4_K_M"),
|
||||
quantization_method = cmd.get("quantization_method", ["Q4_K_M"]),
|
||||
push_to_hub = cmd.get("push_to_hub", False),
|
||||
repo_id = cmd.get("repo_id"),
|
||||
hf_token = cmd.get("hf_token"),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue