truss 0.11.8rc12__py3-none-any.whl → 0.11.9rc2__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.

Potentially problematic release.


This version of truss might be problematic. Click here for more details.

@@ -0,0 +1,20 @@
1
+ import sys
2
+ from pathlib import Path
3
+
4
+
5
+ # NB(nikhil): Slightly hacky helpers needed to set up the path so relative imports work as they do in real environments
6
+ def setup_control_imports():
7
+ base_path = Path(__file__).parent.parent.parent.parent.parent
8
+ paths = [
9
+ base_path / "templates" / "control" / "control",
10
+ base_path / "templates",
11
+ base_path / "templates" / "shared",
12
+ ]
13
+
14
+ for path in paths:
15
+ if not path.exists():
16
+ raise FileNotFoundError(f"Expected control path does not exist: {path}")
17
+
18
+ path_str = str(path)
19
+ if path_str not in sys.path:
20
+ sys.path.insert(0, path_str)
@@ -8,6 +8,10 @@ from httpx_ws import AsyncWebSocketSession
8
8
  from httpx_ws import _exceptions as httpx_ws_exceptions
9
9
  from wsproto.events import BytesMessage, TextMessage
10
10
 
11
+ from truss.tests.templates.control.control.conftest import setup_control_imports
12
+
13
+ setup_control_imports()
14
+
11
15
  from truss.templates.control.control.endpoints import proxy_ws
12
16
 
13
17
 
@@ -1,30 +1,15 @@
1
1
  import os
2
2
  import socket
3
- import sys
4
3
  from contextlib import contextmanager
5
- from pathlib import Path
6
4
  from typing import Dict, List
7
5
  from unittest.mock import AsyncMock, patch
8
6
 
9
7
  import httpx
10
8
  import pytest
11
9
 
12
- from truss.truss_handle.patch.custom_types import PatchRequest
13
-
14
- # Needed to simulate the set up on the model docker container
15
- sys.path.append(
16
- str(
17
- Path(__file__).parent.parent.parent.parent.parent
18
- / "templates"
19
- / "control"
20
- / "control"
21
- )
22
- )
10
+ from truss.tests.templates.control.control.conftest import setup_control_imports
23
11
 
24
- sys.path.append(str(Path(__file__).parent.parent.parent.parent.parent / "templates"))
25
- sys.path.append(
26
- str(Path(__file__).parent.parent.parent.parent.parent / "templates" / "shared")
27
- )
12
+ setup_control_imports()
28
13
 
29
14
  from truss.templates.control.control.application import create_app # noqa
30
15
  from truss.templates.control.control.helpers.custom_types import ( # noqa
@@ -34,6 +19,7 @@ from truss.templates.control.control.helpers.custom_types import ( # noqa
34
19
  PatchType,
35
20
  PythonRequirementPatch,
36
21
  )
22
+ from truss.truss_handle.patch.custom_types import PatchRequest
37
23
 
38
24
 
39
25
  @pytest.fixture
@@ -273,14 +259,12 @@ async def test_retries(client, app):
273
259
  ]
274
260
  )
275
261
 
276
- with (
277
- patch("endpoints.INFERENCE_SERVER_START_WAIT_SECS", new=4),
278
- pytest.raises(httpx.RemoteProtocolError),
279
- ):
280
- await client.get("/v1/models/model")
262
+ with patch("endpoints.INFERENCE_SERVER_START_WAIT_SECS", new=4):
263
+ resp = await client.get("/v1/models/model")
281
264
 
282
- # We should have made 5 attempts
265
+ # We should have made 5 attempts, and then surfaced a 500
283
266
  assert app.state.proxy_client.send.call_count == 5
267
+ assert resp.status_code == 500
284
268
 
285
269
 
286
270
  async def _verify_apply_patch_success(client, patch: Patch):
@@ -35,10 +35,12 @@ def _start_truss_server(
35
35
  f"http://localhost:{patch_ping_server_port}"
36
36
  )
37
37
  sys.stdout = open(stdout_capture_file_path, "w")
38
+
39
+ # NB(nikhil): Insert paths at the beginning to ensure we search there first.
38
40
  app_path = truss_control_container_fs / "app"
39
- sys.path.append(str(app_path))
41
+ sys.path.insert(0, str(app_path))
40
42
  control_path = truss_control_container_fs / "control" / "control"
41
- sys.path.append(str(control_path))
43
+ sys.path.insert(0, str(control_path))
42
44
 
43
45
  from server import ControlServer
44
46
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: truss
3
- Version: 0.11.8rc12
3
+ Version: 0.11.9rc2
4
4
  Summary: A seamless bridge from model development to model delivery
5
5
  Project-URL: Repository, https://github.com/basetenlabs/truss
6
6
  Project-URL: Homepage, https://truss.baseten.co
@@ -11,24 +11,24 @@ truss/base/truss_spec.py,sha256=jFVF79CXoEEspl2kXBAPyi-rwISReIGTdobGpaIhwJw,5979
11
11
  truss/cli/chains_commands.py,sha256=Kpa5mCg6URAJQE2ZmZfVQFhjBHEitKT28tKiW0H6XAI,17406
12
12
  truss/cli/cli.py,sha256=PaMkuwXZflkU7sa1tEoT_Zmy-iBkEZs1m4IVqcieaeo,30367
13
13
  truss/cli/remote_cli.py,sha256=G_xCKRXzgkCmkiZJhUFfsv5YSVgde1jLA5LPQitpZgI,1905
14
- truss/cli/train_commands.py,sha256=sJN_Qpq-ejHY7KZ555n37PzpYEF-gZiQCVHW5JwUPHo,19303
14
+ truss/cli/train_commands.py,sha256=Cfr9-TDE-esQI_R8az5OpLoQyz3Qv38mLsSNwy9znmI,18873
15
15
  truss/cli/logs/base_watcher.py,sha256=KKyd7lIrdaEeDVt8EtjMioSPGVpLyOcF0ewyzE_GGdQ,2785
16
16
  truss/cli/logs/model_log_watcher.py,sha256=NACcP-wkcaroYa2Cb9BZC7Yr0554WZa_FSM2LXOf4A8,1263
17
17
  truss/cli/logs/training_log_watcher.py,sha256=r6HRqrLnz-PiKTUXiDYYxg4ZnP8vYcXlEX1YmgHhzlo,1173
18
18
  truss/cli/logs/utils.py,sha256=z-U_FG4BUzdZLbE3BnXb4DZQ0zt3LSZ3PiQpLaDuc3o,1031
19
19
  truss/cli/train/common.py,sha256=xTR41U5FeSndXfNBBHF9wF5XwZH1sOIVFlv-XHjsKIU,1547
20
- truss/cli/train/core.py,sha256=cqE0iBEElqP3oMDpCimuwpCwFyqfOYEBhweCZat7GiI,26262
20
+ truss/cli/train/core.py,sha256=bJ40Jr4oXsG-blr3LGwd02KlYds6YbOS2x5twj_nyiI,26344
21
21
  truss/cli/train/deploy_from_checkpoint_config.yml,sha256=mktaVrfhN8Kjx1UveC4xr-gTW-kjwbHvq6bx_LpO-Wg,371
22
22
  truss/cli/train/deploy_from_checkpoint_config_whisper.yml,sha256=6GbOorYC8ml0UyOUvuBpFO_fuYtYE646JqsalR-D4oY,406
23
23
  truss/cli/train/metrics_watcher.py,sha256=smz-zrEsBj_-wJHI0pAZ-EAPrvfCWzq1eQjGiFNM-Mk,12755
24
24
  truss/cli/train/poller.py,sha256=TGRzELxsicga0bEXewSX1ujw6lfPmDnHd6nr8zvOFO8,3550
25
- truss/cli/train/types.py,sha256=alGtr4Q71GeB65PpGMhsoKygw4k_ncR6MKIP1ioP8rI,951
26
- truss/cli/train/deploy_checkpoints/__init__.py,sha256=wL-M2yu8PxO2tFvjwshXAfPnB-5TlvsBp2v_bdzimRU,99
27
- truss/cli/train/deploy_checkpoints/deploy_checkpoints.py,sha256=nJHUjR4f4_13mFPNetWKq7ecsqr-cradbv3RBBDj2pk,17364
28
- truss/cli/train/deploy_checkpoints/deploy_checkpoints_helpers.py,sha256=6x5nS_HnWYtS9vi-Pg8akzrJk9L_agjvFhm5EFh1m6Y,1964
29
- truss/cli/train/deploy_checkpoints/deploy_full_checkpoints.py,sha256=FYRG5KTMlxEMZS-RA_m2gp1wuqWbSpqt2RhdQfLibhA,3968
30
- truss/cli/train/deploy_checkpoints/deploy_lora_checkpoints.py,sha256=P91dIAzuhl2GlzmrWwCcYI7uCMT1Lm7C79JQHM_exN4,4442
31
- truss/cli/train/deploy_checkpoints/deploy_whisper_checkpoints.py,sha256=NSo2kEn-CxawGvUhn-xE81noxoTJ0cCv8X9fkrMxAsM,2617
25
+ truss/cli/train/types.py,sha256=aGqZ5yOLv5WZL5_rmhl3s9NoXhjXOkeSsHD3QEH0en4,700
26
+ truss/cli/train/deploy_checkpoints/__init__.py,sha256=HuiDD6-qfwJ7fbRVX4s9Fxn6rmO6nwTLb0fVxwcMKls,137
27
+ truss/cli/train/deploy_checkpoints/deploy_checkpoints.py,sha256=T3ss6qZE7iwbxXcHrNRCmt1e7VwOyVnWwwFZGv6222I,21398
28
+ truss/cli/train/deploy_checkpoints/deploy_checkpoints_helpers.py,sha256=r_IKMlqejMwIU6gsfxDIRzfmltfDf6Sz9-vnKrP_10s,83
29
+ truss/cli/train/deploy_checkpoints/deploy_full_checkpoints.py,sha256=BEgn0p-LUE_enXJKrbHtuwEkLi3B1qcNJVzExB60Fzg,1199
30
+ truss/cli/train/deploy_checkpoints/deploy_lora_checkpoints.py,sha256=xP403ny-7YGPZCkEFRqi-Awt3hYVteGMBnZNWyY_8Pc,1138
31
+ truss/cli/train/deploy_checkpoints/deploy_whisper_checkpoints.py,sha256=rJ0_KM0RUWLTdz24rbAhDtzTYtTvdVKpGXNZd23zgRE,424
32
32
  truss/cli/utils/common.py,sha256=ink9ZE0MsOv6PCFK_Ra5k1aHm281TXTnMpnLjf2PtUM,6585
33
33
  truss/cli/utils/output.py,sha256=GNjU85ZAMp5BI6Yij5wYXcaAvpm_kmHV0nHNmdkMxb0,646
34
34
  truss/cli/utils/self_upgrade.py,sha256=eTJZA4Wc8uUp4Qh6viRQp6bZm--wnQp7KWe5KRRpPtg,5427
@@ -52,7 +52,7 @@ 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=5XsB0mSfFD2YGybco4aPGMQalSvhsqv-QgzW4A66r7k,25081
55
+ truss/remote/baseten/api.py,sha256=SJHy1JWD7-dlXJRuN9fxFsGzUk-Irtt_KOnBi7f7_4s,28235
56
56
  truss/remote/baseten/auth.py,sha256=tI7s6cI2EZgzpMIzrdbILHyGwiHDnmoKf_JBhJXT55E,776
57
57
  truss/remote/baseten/core.py,sha256=uxtmBI9RAVHu1glIEJb5Q4ccJYLeZM1Cp5Svb9W68Yw,21965
58
58
  truss/remote/baseten/custom_types.py,sha256=bYrfTzGgYr6FDoya0omyadCLSTcTc-83U2scQORyUj0,4715
@@ -73,8 +73,8 @@ truss/templates/copy_cache_files.Dockerfile.jinja,sha256=Os5zFdYLZ_AfCRGq4RcpVTO
73
73
  truss/templates/docker_server_requirements.txt,sha256=PyhOPKAmKW1N2vLvTfLMwsEtuGpoRrbWuNo7tT6v2Mc,18
74
74
  truss/templates/server.Dockerfile.jinja,sha256=CUYnF_hgxPGq2re7__0UPWlwzOHMoFkxp6NVKi3U16s,7071
75
75
  truss/templates/control/requirements.txt,sha256=nqqNmlTwFeV8sV4fqwItwzzd_egADBP_e-cEopXBJ4k,358
76
- truss/templates/control/control/application.py,sha256=jYeta6hWe1SkfLL3W4IDmdYjg3ZuKqI_UagWYs5RB_E,3793
77
- truss/templates/control/control/endpoints.py,sha256=VQ1lvZjFvR091yRkiFdvXw1Q7PiNGXT9rJwY7_sX6yg,11828
76
+ truss/templates/control/control/application.py,sha256=KVnOf_ZUPBifgnyfUhOSW9AkhPuWhECUQybSWthm_iY,5126
77
+ truss/templates/control/control/endpoints.py,sha256=KzqsLVNJE6r6TCPW8D5FMCtsfHadTwR15A3z_viGxmM,11782
78
78
  truss/templates/control/control/server.py,sha256=R4Y219i1dcz0kkksN8obLoX-YXWGo9iW1igindyG50c,3128
79
79
  truss/templates/control/control/helpers/context_managers.py,sha256=W6dyFgLBhPa5meqrOb3w_phMtKfaJI-GhwUfpiycDc8,413
80
80
  truss/templates/control/control/helpers/custom_types.py,sha256=n_lTudtLTpy4oPV3aDdJ4X2rh3KCV5btYO9UnTeUouQ,5471
@@ -142,7 +142,7 @@ truss/tests/test_truss_handle.py,sha256=-xz9VXkecXDTslmQZ-dmUmQLnvD0uumRqHS2uvGl
142
142
  truss/tests/test_util.py,sha256=hs1bNMkXKEdoPRx4Nw-NAEdoibR92OubZuADGmbiYsQ,1344
143
143
  truss/tests/cli/test_cli.py,sha256=yfbVS5u1hnAmmA8mJ539vj3lhH-JVGUvC4Q_Mbort44,787
144
144
  truss/tests/cli/train/test_cache_view.py,sha256=aVRCh3atRpFbJqyYgq7N-vAW0DiKMftQ7ajUqO2ClOg,22606
145
- truss/tests/cli/train/test_deploy_checkpoints.py,sha256=lDk88uAUPYatJ30JKVVtJDdXv_zWNk1nxXFyUH6IVGw,44800
145
+ truss/tests/cli/train/test_deploy_checkpoints.py,sha256=QLgWmhvx3qAWPFSUkL1hKpxDvkYivT5kXEYDC1x9gc8,10145
146
146
  truss/tests/cli/train/test_train_cli_core.py,sha256=vzYfxKdwoa3NaFMrVZbSg5qOoLXivMvZXN1ClQirGTQ,16148
147
147
  truss/tests/cli/train/test_train_init.py,sha256=SRAZvvD5-PWYlpHHek2MftYTA4I3ZHi7gniHl2fYV98,17464
148
148
  truss/tests/cli/train/resources/test_deploy_from_checkpoint_config.yml,sha256=GF7r9l0KaeXiUYCPSBpeMPd2QG6PeWWyI12NdbqLOgc,1930
@@ -164,9 +164,10 @@ truss/tests/remote/baseten/test_auth.py,sha256=ttu4bDnmwGfo3oiNut4HVGnh-QnjAefwZ
164
164
  truss/tests/remote/baseten/test_core.py,sha256=6NzJTDmoSUv6Muy1LFEYIUg10-cqw-hbLyeTSWcdNjY,26117
165
165
  truss/tests/remote/baseten/test_remote.py,sha256=y1qSPL1t7dBeYI3xMFn436fttG7wkYdAoENTz7qKObg,23634
166
166
  truss/tests/remote/baseten/test_service.py,sha256=ufZbtQlBNIzFCxRt_iE-APLpWbVw_3ViUpSh6H9W5nU,1945
167
- truss/tests/templates/control/control/test_endpoints.py,sha256=fxTiiCR0ltaHCL_-v-22Ie1qVgnch1lqcj3w0U3R-fk,3644
168
- truss/tests/templates/control/control/test_server.py,sha256=r1O3VEK9eoIL2-cg8nYLXYct_H3jf5rGp1wLT1KBdeA,9488
169
- truss/tests/templates/control/control/test_server_integration.py,sha256=EdDY3nLzjrRCJ5LI5yZsNCEImSRkxTL7Rn9mGnK67zA,11837
167
+ truss/tests/templates/control/control/conftest.py,sha256=euDFh0AhcHP-vAmTzi1Qj3lymnplDTgvtbt4Ez_lfpw,654
168
+ truss/tests/templates/control/control/test_endpoints.py,sha256=HIlRYOicsdHD8r_V5gHpZWybDC26uwXJfbvCohdE3HI,3751
169
+ truss/tests/templates/control/control/test_server.py,sha256=I4iIywlpXmlKC0SbQLfx4rX4d_uzUxUZj6h2x_7vytE,9151
170
+ truss/tests/templates/control/control/test_server_integration.py,sha256=kvhgN1OGF5SZ1JFeg6qwbcrTy-Vr7B2JSP2z507ahxo,11925
170
171
  truss/tests/templates/control/control/helpers/test_context_managers.py,sha256=3LoonRaKu_UvhaWs1eNmEQCZq-iJ3aIjI0Mn4amC8Bw,283
171
172
  truss/tests/templates/control/control/helpers/test_model_container_patch_applier.py,sha256=jhPgExGFF42iuWPM9ry93dnpF765d-CGTCIhbswK0hk,5730
172
173
  truss/tests/templates/control/control/helpers/test_requirement_name_identifier.py,sha256=kPYrAb97BtN8Wm0Hofw7iJ412Tew2xHgiteKtXVoC5A,2980
@@ -363,13 +364,13 @@ truss_chains/remote_chainlet/model_skeleton.py,sha256=8ZReLOO2MLcdg7bNZ61C-6j-e6
363
364
  truss_chains/remote_chainlet/stub.py,sha256=Y2gDUzMY9WRaQNHIz-o4dfLUfFyYV9dUhIRQcfgrY8g,17209
364
365
  truss_chains/remote_chainlet/utils.py,sha256=Zn3GZRvK8f65WUa-qa-8uPFZ2pD7ukRFxbLOvT-BL0Q,24063
365
366
  truss_train/__init__.py,sha256=A3MzRPMInZfmzLvPpZI7gdKgshAVCw6bwhU-6JYU2zs,939
366
- truss_train/definitions.py,sha256=TGoeG86aG76wt3h3giufg1rfm9K0W8y9bDJSITe76Aw,8209
367
+ truss_train/definitions.py,sha256=wvciE-Ru9ZmwFdcJcGIgLfDCB7qy8GA8I9Q1hvEQ2ks,8167
367
368
  truss_train/deployment.py,sha256=lWWANSuzBWu2M4oK4qD7n-oVR1JKdmw2Pn5BJQHg-Ck,3074
368
369
  truss_train/loader.py,sha256=0o66EjBaHc2YY4syxxHVR4ordJWs13lNXnKjKq2wq0U,1630
369
370
  truss_train/public_api.py,sha256=9N_NstiUlmBuLUwH_fNG_1x7OhGCytZLNvqKXBlStrM,1220
370
371
  truss_train/restore_from_checkpoint.py,sha256=8hdPm-WSgkt74HDPjvCjZMBpvA9MwtoYsxVjOoa7BaM,1176
371
- truss-0.11.8rc12.dist-info/METADATA,sha256=VGL_cbOXfNJ6YiO3muXQEJT4lZjUnHILvQaJih5aTUo,6681
372
- truss-0.11.8rc12.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
373
- truss-0.11.8rc12.dist-info/entry_points.txt,sha256=-MwKfHHQHQ6j0HqIgvxrz3CehCmczDLTD-OsRHnjjuU,130
374
- truss-0.11.8rc12.dist-info/licenses/LICENSE,sha256=FTqGzu85i-uw1Gi8E_o0oD60bH9yQ_XIGtZbA1QUYiw,1064
375
- truss-0.11.8rc12.dist-info/RECORD,,
372
+ truss-0.11.9rc2.dist-info/METADATA,sha256=oYVseMCGTWiWN5NR6Siy4qTSaEzbGGKUgdiqyqsWHHI,6680
373
+ truss-0.11.9rc2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
374
+ truss-0.11.9rc2.dist-info/entry_points.txt,sha256=-MwKfHHQHQ6j0HqIgvxrz3CehCmczDLTD-OsRHnjjuU,130
375
+ truss-0.11.9rc2.dist-info/licenses/LICENSE,sha256=FTqGzu85i-uw1Gi8E_o0oD60bH9yQ_XIGtZbA1QUYiw,1064
376
+ truss-0.11.9rc2.dist-info/RECORD,,
@@ -244,6 +244,5 @@ class DeployCheckpointsRuntime(custom_types.SafeModelNoExtra):
244
244
  class DeployCheckpointsConfig(custom_types.SafeModelNoExtra):
245
245
  checkpoint_details: Optional[CheckpointList] = None
246
246
  model_name: Optional[str] = None
247
- deployment_name: Optional[str] = None
248
247
  runtime: Optional[DeployCheckpointsRuntime] = None
249
248
  compute: Optional[Compute] = None