Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
marius-baseten committed Dec 16, 2024
1 parent 08be030 commit 52a7491
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 8 deletions.
4 changes: 2 additions & 2 deletions docs/chains/doc_gen/API-reference.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -152,10 +152,10 @@ Options to customize RPCs to dependency chainlets.
Decorator to mark a chainlet as the entrypoint of a chain.

This decorator can be applied to *one* chainlet in a source file and then the
CLI push command simplifies: only the file, not the class within must be specified.
CLI push command simplifies: only the file, not the class within, must be specified.

Optionally a display name for the Chain (not the Chainlet) can be set (effectively
giving a custom default value for the name arg of the CLI push command).
giving a custom default value for the `name` arg of the CLI push command).

Example usage:

Expand Down
4 changes: 2 additions & 2 deletions docs/chains/doc_gen/generated-reference.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -169,10 +169,10 @@ Options to customize RPCs to dependency chainlets.
Decorator to mark a chainlet as the entrypoint of a chain.

This decorator can be applied to *one* chainlet in a source file and then the
CLI push command simplifies: only the file, not the class within must be specified.
CLI push command simplifies: only the file, not the class within, must be specified.

Optionally a display name for the Chain (not the Chainlet) can be set (effectively
giving a custom default value for the name arg of the CLI push command).
giving a custom default value for the `name` arg of the CLI push command).

Example usage:

Expand Down
1 change: 1 addition & 0 deletions truss-chains/truss_chains/definitions.py
Original file line number Diff line number Diff line change
Expand Up @@ -508,6 +508,7 @@ class TrussMetadata(SafeModel):

class ABCChainlet(abc.ABC):
remote_config: ClassVar[RemoteConfig] = RemoteConfig()
# `meta_data` is not shared between subclasses, each has an isolated copy.
meta_data: ClassVar[ChainletMetadata] = ChainletMetadata()

@classmethod
Expand Down
2 changes: 1 addition & 1 deletion truss-chains/truss_chains/deployment/code_gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ def _gen_pydantic_import_and_ref(raw_type: Any) -> _Source:


def _gen_nested_pydantic(raw_type: Any) -> _Source:
"""Handles `list[str, PydanticModel]` and similar, correctly resolving imports
"""Handles `list[PydanticModel]` and similar, correctly resolving imports
of model args that might be defined in other files."""
origin = get_origin(raw_type)
assert origin in framework._SIMPLE_CONTAINERS
Expand Down
4 changes: 3 additions & 1 deletion truss-chains/truss_chains/framework.py
Original file line number Diff line number Diff line change
Expand Up @@ -1130,7 +1130,9 @@ def run_local(
def entrypoint(
cls_or_chain_name: Optional[Union[Type[ChainletT], str]] = None,
) -> Union[Callable[[Type[ChainletT]], Type[ChainletT]], Type[ChainletT]]:
"""Decorator to tag a Chainlet as an entrypoint."""
"""Decorator to tag a Chainlet as an entrypoint.
Can be used with or without chain name argument.
"""

def decorator(cls: Type[ChainletT]) -> Type[ChainletT]:
if not (utils.issubclass_safe(cls, definitions.ABCChainlet)):
Expand Down
2 changes: 1 addition & 1 deletion truss-chains/truss_chains/public_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ def mark_entrypoint(
"""Decorator to mark a chainlet as the entrypoint of a chain.
This decorator can be applied to *one* chainlet in a source file and then the
CLI push command simplifies: only the file, not the class within must be specified.
CLI push command simplifies: only the file, not the class within, must be specified.
Optionally a display name for the Chain (not the Chainlet) can be set (effectively
giving a custom default value for the `--name` arg of the CLI push command).
Expand Down
2 changes: 1 addition & 1 deletion truss/templates/server/model_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@

MODEL_BASENAME = "model"

NUM_LOAD_RETRIES = int(os.environ.get("NUM_LOAD_RETRIES", "1"))
NUM_LOAD_RETRIES = int(os.environ.get("NUM_LOAD_RETRIES_TRUSS", "1"))
STREAMING_RESPONSE_QUEUE_READ_TIMEOUT_SECS = 60
DEFAULT_PREDICT_CONCURRENCY = 1
EXTENSIONS_DIR_NAME = "extensions"
Expand Down

0 comments on commit 52a7491

Please sign in to comment.