truss 0.11.17__py3-none-any.whl → 0.11.18rc500__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- truss/cli/cli.py +3 -2
- truss/remote/baseten/api.py +2 -0
- truss/remote/baseten/core.py +1 -3
- truss/templates/control/control/helpers/inference_server_process_controller.py +8 -4
- {truss-0.11.17.dist-info → truss-0.11.18rc500.dist-info}/METADATA +1 -1
- {truss-0.11.17.dist-info → truss-0.11.18rc500.dist-info}/RECORD +9 -9
- {truss-0.11.17.dist-info → truss-0.11.18rc500.dist-info}/WHEEL +0 -0
- {truss-0.11.17.dist-info → truss-0.11.18rc500.dist-info}/entry_points.txt +0 -0
- {truss-0.11.17.dist-info → truss-0.11.18rc500.dist-info}/licenses/LICENSE +0 -0
truss/cli/cli.py
CHANGED
|
@@ -548,8 +548,9 @@ def push(
|
|
|
548
548
|
model_name = remote_cli.inquire_model_name()
|
|
549
549
|
|
|
550
550
|
if promote and environment:
|
|
551
|
-
|
|
552
|
-
|
|
551
|
+
raise click.UsageError(
|
|
552
|
+
"'promote' flag and 'environment' flag cannot both be specified."
|
|
553
|
+
)
|
|
553
554
|
if promote and not environment:
|
|
554
555
|
environment = PRODUCTION_ENVIRONMENT_NAME
|
|
555
556
|
|
truss/remote/baseten/api.py
CHANGED
|
@@ -199,6 +199,7 @@ class BasetenApi:
|
|
|
199
199
|
allow_truss_download: bool = True,
|
|
200
200
|
deployment_name: Optional[str] = None,
|
|
201
201
|
origin: Optional[b10_types.ModelOrigin] = None,
|
|
202
|
+
environment: Optional[str] = None,
|
|
202
203
|
):
|
|
203
204
|
query_string = f"""
|
|
204
205
|
mutation ($trussUserEnv: String) {{
|
|
@@ -211,6 +212,7 @@ class BasetenApi:
|
|
|
211
212
|
allow_truss_download: {"true" if allow_truss_download else "false"}
|
|
212
213
|
{f'version_name: "{deployment_name}"' if deployment_name else ""}
|
|
213
214
|
{f"model_origin: {origin.value}" if origin else ""}
|
|
215
|
+
{f'environment_name: "{environment}"' if environment else ""}
|
|
214
216
|
) {{
|
|
215
217
|
model_version {{
|
|
216
218
|
id
|
truss/remote/baseten/core.py
CHANGED
|
@@ -438,9 +438,6 @@ def create_truss_service(
|
|
|
438
438
|
)
|
|
439
439
|
|
|
440
440
|
if model_id is None:
|
|
441
|
-
if environment and environment != PRODUCTION_ENVIRONMENT_NAME:
|
|
442
|
-
raise ValueError(NO_ENVIRONMENTS_EXIST_ERROR_MESSAGING)
|
|
443
|
-
|
|
444
441
|
model_version_json = api.create_model_from_truss(
|
|
445
442
|
model_name,
|
|
446
443
|
s3_key,
|
|
@@ -450,6 +447,7 @@ def create_truss_service(
|
|
|
450
447
|
allow_truss_download=allow_truss_download,
|
|
451
448
|
deployment_name=deployment_name,
|
|
452
449
|
origin=origin,
|
|
450
|
+
environment=environment,
|
|
453
451
|
)
|
|
454
452
|
|
|
455
453
|
return ModelVersionHandle(
|
|
@@ -5,6 +5,7 @@ from pathlib import Path
|
|
|
5
5
|
from typing import List, Optional
|
|
6
6
|
|
|
7
7
|
from helpers.context_managers import current_directory
|
|
8
|
+
from shared.util import kill_child_processes
|
|
8
9
|
|
|
9
10
|
INFERENCE_SERVER_FAILED_FILE = Path("~/inference_server_crashed.txt").expanduser()
|
|
10
11
|
TERMINATION_TIMEOUT_SECS = 120.0
|
|
@@ -46,17 +47,20 @@ class InferenceServerProcessController:
|
|
|
46
47
|
self._inference_server_ever_started = True
|
|
47
48
|
self._logged_unrecoverable_since_last_restart = False
|
|
48
49
|
|
|
50
|
+
def _terminate_children_and_process(self):
|
|
51
|
+
"""Kill child processes first, then parent. Prevents port binding conflicts."""
|
|
52
|
+
kill_child_processes(self._inference_server_process.pid)
|
|
53
|
+
self._inference_server_process.terminate()
|
|
54
|
+
|
|
49
55
|
def stop(self):
|
|
50
56
|
if self._inference_server_process is not None:
|
|
51
|
-
self.
|
|
57
|
+
self._terminate_children_and_process()
|
|
52
58
|
self._inference_server_process.wait()
|
|
53
|
-
# Introduce delay to avoid failing to grab the port
|
|
54
|
-
time.sleep(3)
|
|
55
59
|
|
|
56
60
|
self._inference_server_started = False
|
|
57
61
|
|
|
58
62
|
def terminate_with_wait(self):
|
|
59
|
-
self.
|
|
63
|
+
self._terminate_children_and_process()
|
|
60
64
|
self._inference_server_terminated = True
|
|
61
65
|
termination_check_attempts = int(
|
|
62
66
|
TERMINATION_TIMEOUT_SECS / TERMINATION_CHECK_INTERVAL_SECS
|
|
@@ -9,7 +9,7 @@ truss/base/trt_llm_config.py,sha256=rEtBVFg2QnNMxnaz11s5Z69dJB1w7Bpt48Wf6jSsVZI,
|
|
|
9
9
|
truss/base/truss_config.py,sha256=s39Xc1e20s8IV07YLl_aVnp-uRS18ZQ2TV-3FILx4nY,28416
|
|
10
10
|
truss/base/truss_spec.py,sha256=jFVF79CXoEEspl2kXBAPyi-rwISReIGTdobGpaIhwJw,5979
|
|
11
11
|
truss/cli/chains_commands.py,sha256=QijtACpuAt2O1RV_qhTNPw0jcFg-u0dX9PP-ct0t-rs,17716
|
|
12
|
-
truss/cli/cli.py,sha256=
|
|
12
|
+
truss/cli/cli.py,sha256=VGOw1ell7h9bna64UmopavCpVPdjDerSaGPDoizIsRI,30313
|
|
13
13
|
truss/cli/remote_cli.py,sha256=G_xCKRXzgkCmkiZJhUFfsv5YSVgde1jLA5LPQitpZgI,1905
|
|
14
14
|
truss/cli/train_commands.py,sha256=CrVqWsdkmSxgi3i2sSEyiE4QdfD0Z96F2Ib-PMZJjm8,20444
|
|
15
15
|
truss/cli/logs/base_watcher.py,sha256=vuqteoaMVGX34cgKcETf4X_gOkvnSnDaWz1_pbeFhqs,3343
|
|
@@ -52,9 +52,9 @@ truss/patch/truss_dir_patch_applier.py,sha256=ALnaVnu96g0kF2UmGuBFTua3lrXpwAy4sG
|
|
|
52
52
|
truss/remote/remote_factory.py,sha256=-0gLh_yIyNDgD48Q6sR8Yo5dOMQg84lrHRvn_XR0n4s,3585
|
|
53
53
|
truss/remote/truss_remote.py,sha256=TEe6h6by5-JLy7PMFsDN2QxIY5FmdIYN3bKvHHl02xM,8440
|
|
54
54
|
truss/remote/baseten/__init__.py,sha256=XNqJW1zyp143XQc6-7XVwsUA_Q_ZJv_ausn1_Ohtw9Y,176
|
|
55
|
-
truss/remote/baseten/api.py,sha256=
|
|
55
|
+
truss/remote/baseten/api.py,sha256=54Cl_2zHpRU4g2VXzK-BYlxPJeHHImceFrbxD9AASXo,30335
|
|
56
56
|
truss/remote/baseten/auth.py,sha256=tI7s6cI2EZgzpMIzrdbILHyGwiHDnmoKf_JBhJXT55E,776
|
|
57
|
-
truss/remote/baseten/core.py,sha256=
|
|
57
|
+
truss/remote/baseten/core.py,sha256=FC5-87Vs2f0NR8eddtSRvr3Z5W2rF7mpiq9jCPrbzr4,23399
|
|
58
58
|
truss/remote/baseten/custom_types.py,sha256=g7yWkE8p6uIAG5JqgfELFGHzjFLvO7vLPzbe-yl1nYs,4735
|
|
59
59
|
truss/remote/baseten/error.py,sha256=3TNTwwPqZnr4NRd9Sl6SfLUQR2fz9l6akDPpOntTpzA,578
|
|
60
60
|
truss/remote/baseten/remote.py,sha256=aKG1BODtrnmuRV-M8T3F3pw8oHawGwI09caKANJ19BM,23420
|
|
@@ -81,7 +81,7 @@ truss/templates/control/control/helpers/context_managers.py,sha256=W6dyFgLBhPa5m
|
|
|
81
81
|
truss/templates/control/control/helpers/custom_types.py,sha256=n_lTudtLTpy4oPV3aDdJ4X2rh3KCV5btYO9UnTeUouQ,5471
|
|
82
82
|
truss/templates/control/control/helpers/errors.py,sha256=LddFuQywuCCdYTEnFT5EalxdWos4uR89rbhMakCy2bA,970
|
|
83
83
|
truss/templates/control/control/helpers/inference_server_controller.py,sha256=anFm7FwkGaUnYRQo2dxXohA9__c-XAVAqfA1EL2bIIY,6324
|
|
84
|
-
truss/templates/control/control/helpers/inference_server_process_controller.py,sha256=
|
|
84
|
+
truss/templates/control/control/helpers/inference_server_process_controller.py,sha256=8jhAWsUjG2JQ3elJA6ldCPJ8deo0vOLoD3rI8eKwkvk,4426
|
|
85
85
|
truss/templates/control/control/helpers/inference_server_starter.py,sha256=Fz2Puijro6Cc5cvTsAqOveNJbBQR_ARYJXl4lvETJ8Y,2633
|
|
86
86
|
truss/templates/control/control/helpers/truss_patch/__init__.py,sha256=CXZdUV_ylqLTJrKuFpvSnUT6PUFrZrMF2y6jiHbdaKU,998
|
|
87
87
|
truss/templates/control/control/helpers/truss_patch/model_code_patch_applier.py,sha256=LTIIADLz0wRn7V49j64dU1U7Hbta9YLde3pb5YZWvzQ,2001
|
|
@@ -374,8 +374,8 @@ truss_train/deployment.py,sha256=lWWANSuzBWu2M4oK4qD7n-oVR1JKdmw2Pn5BJQHg-Ck,307
|
|
|
374
374
|
truss_train/loader.py,sha256=0o66EjBaHc2YY4syxxHVR4ordJWs13lNXnKjKq2wq0U,1630
|
|
375
375
|
truss_train/public_api.py,sha256=9N_NstiUlmBuLUwH_fNG_1x7OhGCytZLNvqKXBlStrM,1220
|
|
376
376
|
truss_train/restore_from_checkpoint.py,sha256=8hdPm-WSgkt74HDPjvCjZMBpvA9MwtoYsxVjOoa7BaM,1176
|
|
377
|
-
truss-0.11.
|
|
378
|
-
truss-0.11.
|
|
379
|
-
truss-0.11.
|
|
380
|
-
truss-0.11.
|
|
381
|
-
truss-0.11.
|
|
377
|
+
truss-0.11.18rc500.dist-info/METADATA,sha256=o9mIIX2iDFH8mEVD39WocUjQofwSiLA6t8IM0vVBHFI,6683
|
|
378
|
+
truss-0.11.18rc500.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
379
|
+
truss-0.11.18rc500.dist-info/entry_points.txt,sha256=-MwKfHHQHQ6j0HqIgvxrz3CehCmczDLTD-OsRHnjjuU,130
|
|
380
|
+
truss-0.11.18rc500.dist-info/licenses/LICENSE,sha256=FTqGzu85i-uw1Gi8E_o0oD60bH9yQ_XIGtZbA1QUYiw,1064
|
|
381
|
+
truss-0.11.18rc500.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|