infra: makes huggingface-hub requirements on fine-tune (#665)

infra: makes huggingface-hub core deps

Signed-off-by: Aaron <29749331+aarnphm@users.noreply.github.com>
This commit is contained in:
Aaron Pham
2023-11-16 03:12:52 -05:00
committed by GitHub
parent 86d23fd6f5
commit 6102a67a83
3 changed files with 3 additions and 7 deletions

View File

@@ -80,12 +80,7 @@ def _resolve_peft_config_type(adapter_map: dict[str, str]) -> AdapterMap:
raise RuntimeError(
"LoRA adapter requires 'peft' to be installed. Make sure to do 'pip install \"openllm[fine-tune]\"'"
)
try:
from huggingface_hub import hf_hub_download
except ImportError:
raise MissingDependencyError(
"Failed to import 'huggingface_hub'. Make sure to do 'pip install \"openllm[fine-tune]\"'"
) from None
from huggingface_hub import hf_hub_download
resolved: AdapterMap = {}
for path_or_adapter_id, name in adapter_map.items():