Skip to content

Commit

Permalink
chore: bump deps and lib version
Browse files Browse the repository at this point in the history
  • Loading branch information
benlipkin committed Oct 23, 2024
1 parent 83cc32c commit b481be3
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.6.8
rev: v0.7.0
hooks:
- id: ruff
args: [ --fix ]
Expand Down
12 changes: 7 additions & 5 deletions decoding/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
_logger.info("Importing vLLM: This may take a moment...")

from vllm import LLM, SamplingParams
from vllm.inputs import PromptType
from vllm.outputs import RequestOutput
from vllm.sequence import Logprob
from vllm.transformers_utils.tokenizer import AnyTokenizer
Expand Down Expand Up @@ -55,6 +56,7 @@ class ModelParams(TypedDict, total=False):
max_seq_len_to_capture: int
disable_custom_all_reduce: bool
disable_async_output_proc: bool
enable_prefix_caching: bool


@dataclass(frozen=True, kw_only=True)
Expand Down Expand Up @@ -269,11 +271,11 @@ def _is_valid_logp(
raise ValueError(msg)


def _guard_prompt_text(x: str | None) -> str:
if x is None:
msg = "Prompt text should not be None"
raise ValueError(msg)
return x
def _guard_prompt_text(x: PromptType | None) -> str:
if isinstance(x, str): # `PromptType` is a union type of `str` and other types
return x
msg = "Prompt text should be a string"
raise ValueError(msg)


def _guard_output_logp(x: float | None) -> float:
Expand Down
12 changes: 6 additions & 6 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,24 @@
core_requirements = [
"jax==0.4.31",
"jaxtyping==0.2.34",
"vllm==0.6.2",
"vllm==0.6.3.post1",
]
dev_requirements = [
"pdoc==14.7.0",
"pre-commit==3.8.0",
"pyright==1.1.382.post1",
"pdoc==15.0.0",
"pre-commit==4.0.1",
"pyright==1.1.385",
"pytest==8.3.3",
"pytest-cov==5.0.0",
"pytest-html==4.1.1",
"ruff==0.6.8",
"ruff==0.7.0",
]

with pathlib.Path("README.md").open(encoding="utf-8") as f:
readme = f.read()

setuptools.setup(
name="decoding",
version="0.1.1",
version="0.1.2",
description="Composable inference algorithms with LLMs and programmable logic",
long_description=readme,
long_description_content_type="text/markdown",
Expand Down

0 comments on commit b481be3

Please sign in to comment.