Skip to content

Commit

Permalink
Merge pull request #725 from basetenlabs/bump-version-0.7.16
Browse files Browse the repository at this point in the history
Release 0.7.16
  • Loading branch information
helenlyang committed Nov 9, 2023
2 parents 8966035 + 5dbec4d commit c45ae91
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 24 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@

See Trusses for popular models including:

* 🦙 [Llama 2 7B](https://github.com/basetenlabs/truss-examples/tree/main/model_library/llama-2-7b-chat) ([13B](https://github.com/basetenlabs/truss-examples/tree/main/model_library/llama-2-13b-chat)) ([70B](https://github.com/basetenlabs/truss-examples/tree/main/model_library/llama-2-70b-chat))
* 🎨 [Stable Diffusion XL](https://github.com/basetenlabs/truss-examples/tree/main/stable-diffusion-xl-1.0)
* 🗣 [Whisper](https://github.com/basetenlabs/truss-examples/tree/main/whisper-truss)
* 🦙 [Llama 2 7B](https://github.com/basetenlabs/truss-examples/tree/main/llama/llama-2-7b-chat) ([13B](https://github.com/basetenlabs/truss-examples/tree/main/llama/llama-2-13b-chat)) ([70B](https://github.com/basetenlabs/truss-examples/tree/main/llama/llama-2-70b-chat))
* 🎨 [Stable Diffusion XL](https://github.com/basetenlabs/truss-examples/tree/main/stable-diffusion/stable-diffusion-xl-1.0)
* 🗣 [Whisper](https://github.com/basetenlabs/truss-examples/tree/main/whisper/whisper-truss)

and [dozens more examples](examples/).
and [dozens more examples](https://github.com/basetenlabs/truss-examples/).

## Installation

Expand Down
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.7.15"
version = "0.7.16"
description = "A seamless bridge from model development to model delivery"
license = "MIT"
readme = "README.md"
Expand Down
8 changes: 8 additions & 0 deletions truss/cli/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,14 @@ def push(

click.echo(draft_model_text)

# Log a warning if using secrets without --trusted.
# TODO(helen): this could be moved to a separate function that includes more config checks.
if tr.spec.config.secrets and not trusted:
not_trusted_text = """Warning: your Truss has secrets but was not pushed with --trusted.
Please push with --trusted to grant access to secrets.
"""
console.print(not_trusted_text, style="red")

logs_url = remote_provider.get_remote_logs_url(service) # type: ignore[attr-defined]
rich.print(f"🪵 View logs for your deployment at {logs_url}")

Expand Down
2 changes: 1 addition & 1 deletion truss/remote/baseten/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def _post_graphql_query(self, query_string: str) -> dict:
resp_dict = resp.json()
errors = resp_dict.get("errors")
if errors:
raise ApiError(errors[0]["message"], resp)
raise ApiError(errors[0]["message"])
return resp_dict

def model_s3_upload_credentials(self):
Expand Down
19 changes: 1 addition & 18 deletions truss/remote/baseten/error.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
import json


class Error(Exception):
"""Base Baseten Error"""

Expand All @@ -12,21 +9,7 @@ def __init__(self, message):
class ApiError(Error):
"""Errors in calling the Baseten API."""

def __init__(self, message, response=None):
super().__init__(message)
self.response = response

def __str__(self):
error_str = self.message
if (
self.response is not None
): # non-200 Response objects are falsy, hence the not None.
error_message = json.loads(self.response.content)
error_message = (
error_message["error"] if "error" in error_message else error_message
)
error_str = f"{error_str}\n<Server response: {error_message}>"
return error_str
pass


class AuthorizationError(Error):
Expand Down

0 comments on commit c45ae91

Please sign in to comment.