Skip to content

Commit

Permalink
Merge pull request #1221 from basetenlabs/bump-version-0.9.47
Browse files Browse the repository at this point in the history
Release 0.9.47
  • Loading branch information
bdubayah authored Nov 1, 2024
2 parents 1715dd0 + 9ec83d7 commit e84e615
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 14 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "truss"
version = "0.9.46"
version = "0.9.47"
description = "A seamless bridge from model development to model delivery"
license = "MIT"
readme = "README.md"
Expand Down
7 changes: 4 additions & 3 deletions truss/config/trt_llm.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ class CheckpointRepository(BaseModel):
repo: str


class TrussTRTLLMBatchSchedulerPolicy(Enum):
MAX_UTILIZATION = 0
GUARANTEED_NO_EVICT = 1
class TrussTRTLLMBatchSchedulerPolicy(str, Enum):
MAX_UTILIZATION = "max_utilization"
GUARANTEED_NO_EVICT = "guaranteed_no_evict"


class TrussTRTLLMBuildConfiguration(BaseModel):
Expand All @@ -86,6 +86,7 @@ class TrussTRTLLMBuildConfiguration(BaseModel):
batch_scheduler_policy: TrussTRTLLMBatchSchedulerPolicy = (
TrussTRTLLMBatchSchedulerPolicy.GUARANTEED_NO_EVICT
)
default_max_tokens: Optional[int] = None

@validator("max_beam_width")
def check_max_beam_width(cls, v: int):
Expand Down
2 changes: 1 addition & 1 deletion truss/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@

TRTLLM_BASE_IMAGE = "baseten/briton-server:v0.13.0_v0.0.15"
TRTLLM_PYTHON_EXECUTABLE = "/usr/bin/python3"
BASE_TRTLLM_REQUIREMENTS = ["briton==0.3.2"]
BASE_TRTLLM_REQUIREMENTS = ["briton==0.3.6"]
AUDIO_MODEL_TRTLLM_REQUIREMENTS = [
"--extra-index-url https://pypi.nvidia.com",
"tensorrt_cu12_bindings==10.2.0.post1",
Expand Down
8 changes: 2 additions & 6 deletions truss/remote/baseten/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from truss.remote.baseten.utils.tar import create_tar_with_progress_bar
from truss.remote.baseten.utils.transfer import multipart_upload_boto3
from truss.truss_handle import TrussHandle
from truss.util.path import load_trussignore_patterns
from truss.util.path import load_trussignore_patterns_from_truss_dir

logger = logging.getLogger(__name__)

Expand Down Expand Up @@ -201,11 +201,7 @@ def archive_truss(truss_handle: TrussHandle) -> IO:
truss_dir = truss_handle._spec.truss_dir

# check for a truss_ignore file and read the ignore patterns if it exists
truss_ignore_file = truss_dir / ".truss_ignore"
if truss_ignore_file.exists():
ignore_patterns = load_trussignore_patterns(truss_ignore_file=truss_ignore_file)
else:
ignore_patterns = load_trussignore_patterns()
ignore_patterns = load_trussignore_patterns_from_truss_dir(truss_dir)

try:
temp_file = create_tar_with_progress_bar(truss_dir, ignore_patterns)
Expand Down
4 changes: 2 additions & 2 deletions truss/remote/baseten/remote.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
from truss.remote.truss_remote import TrussRemote
from truss.truss_config import ModelServer
from truss.truss_handle import TrussHandle
from truss.util.path import is_ignored, load_trussignore_patterns
from truss.util.path import is_ignored, load_trussignore_patterns_from_truss_dir
from watchfiles import watch


Expand Down Expand Up @@ -289,7 +289,7 @@ def sync_truss_to_dev_version_by_name(
)

watch_path = Path(target_directory)
truss_ignore_patterns = load_trussignore_patterns()
truss_ignore_patterns = load_trussignore_patterns_from_truss_dir(watch_path)

def watch_filter(_, path):
return not is_ignored(
Expand Down
11 changes: 10 additions & 1 deletion truss/util/path.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@

# .truss_ignore is a fixed file in the Truss library that is used to specify files
# that should be ignored when copying a directory tree such as .git directory.
FIXED_TRUSS_IGNORE_PATH = Path(__file__).parent / ".truss_ignore"
TRUSS_IGNORE_FILENAME = ".truss_ignore"
FIXED_TRUSS_IGNORE_PATH = Path(__file__).parent / TRUSS_IGNORE_FILENAME


def copy_tree_path(src: Path, dest: Path, ignore_patterns: List[str] = []) -> None:
Expand Down Expand Up @@ -84,6 +85,14 @@ def build_truss_target_directory(stub: str) -> Path:
return target_directory_path


def load_trussignore_patterns_from_truss_dir(truss_dir: Path) -> List[str]:
truss_ignore_file = truss_dir / TRUSS_IGNORE_FILENAME
if truss_ignore_file.exists():
return load_trussignore_patterns(truss_ignore_file)
# default to the truss-defined ignore patterns
return load_trussignore_patterns()


def load_trussignore_patterns(
truss_ignore_file: Path = FIXED_TRUSS_IGNORE_PATH,
) -> List[str]:
Expand Down

0 comments on commit e84e615

Please sign in to comment.