From 1c75dd5cac9c56d59fa0e215af4a08dda0d73f09 Mon Sep 17 00:00:00 2001 From: Prashant Gupta Date: Thu, 11 Apr 2024 11:07:45 -0700 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20add=20console=20scripts=20to=20setu?= =?UTF-8?q?p.py?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Prashant Gupta --- pyproject.toml | 4 ---- requirements-build.txt | 3 +-- setup.py | 3 +++ vllm/tgis_utils/hub.py | 3 ++- 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 8a635f0e4..90ceaf735 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -8,13 +8,9 @@ requires = [ "torch == 2.2.1", "wheel", "typer == 0.9.*", - "loguru == 0.7.*" ] build-backend = "setuptools.build_meta" -[project.scripts] -vllm = 'vllm.cli:app' - [tool.ruff] # Allow lines to be as long as 80. line-length = 80 diff --git a/requirements-build.txt b/requirements-build.txt index 043017bb8..c034df854 100644 --- a/requirements-build.txt +++ b/requirements-build.txt @@ -5,5 +5,4 @@ packaging setuptools>=49.4.0 torch==2.2.1 wheel -typer==0.9.* -loguru==0.7.* \ No newline at end of file +typer==0.9.* \ No newline at end of file diff --git a/setup.py b/setup.py index 98c92f919..fc95843c8 100644 --- a/setup.py +++ b/setup.py @@ -406,4 +406,7 @@ def _read_requirements(filename: str) -> List[str]: ext_modules=ext_modules, cmdclass={"build_ext": cmake_build_ext} if not _is_neuron() else {}, package_data=package_data, + entry_points={ + "console_scripts": ["vllm=vllm.cli:app"], + }, ) diff --git a/vllm/tgis_utils/hub.py b/vllm/tgis_utils/hub.py index 52449b808..bdd7a7962 100644 --- a/vllm/tgis_utils/hub.py +++ b/vllm/tgis_utils/hub.py @@ -2,6 +2,7 @@ import datetime import glob import json +import logging import os from collections import defaultdict from concurrent.futures import ThreadPoolExecutor @@ -12,12 +13,12 @@ import torch from huggingface_hub import HfApi, hf_hub_download, try_to_load_from_cache from huggingface_hub.utils import LocalEntryNotFoundError -from loguru import logger from safetensors.torch import (_find_shared_tensors, _is_complete, load_file, save_file) from tqdm import tqdm TRUST_REMOTE_CODE = os.getenv("TRUST_REMOTE_CODE") == "true" +logger = logging.getLogger(__name__) def weight_hub_files(model_name,