truss 0.11.10rc5__py3-none-any.whl → 0.11.10rc501__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.
- truss/cli/train/core.py +3 -2
- truss/cli/train/deploy_checkpoints/deploy_checkpoints.py +2 -7
- truss/cli/train/deploy_checkpoints/deploy_full_checkpoints.py +1 -27
- truss/cli/train/deploy_checkpoints/deploy_lora_checkpoints.py +1 -2
- truss/cli/train/deploy_checkpoints/deploy_whisper_checkpoints.py +1 -3
- truss/remote/baseten/api.py +0 -1
- truss/remote/baseten/service.py +0 -7
- truss/templates/base.Dockerfile.jinja +3 -1
- truss/templates/control/control/server.py +1 -1
- truss/templates/control/requirements.txt +1 -2
- truss/templates/server/requirements.txt +1 -2
- truss/templates/server/truss_server.py +1 -1
- truss/templates/server.Dockerfile.jinja +1 -1
- truss/tests/cli/train/test_deploy_checkpoints.py +2 -3
- truss/tests/remote/baseten/test_service.py +56 -0
- {truss-0.11.10rc5.dist-info → truss-0.11.10rc501.dist-info}/METADATA +1 -1
- {truss-0.11.10rc5.dist-info → truss-0.11.10rc501.dist-info}/RECORD +21 -21
- truss_train/definitions.py +3 -2
- {truss-0.11.10rc5.dist-info → truss-0.11.10rc501.dist-info}/WHEEL +0 -0
- {truss-0.11.10rc5.dist-info → truss-0.11.10rc501.dist-info}/entry_points.txt +0 -0
- {truss-0.11.10rc5.dist-info → truss-0.11.10rc501.dist-info}/licenses/LICENSE +0 -0
truss/cli/train/core.py
CHANGED
|
@@ -274,7 +274,7 @@ def _get_checkpoint_names(
|
|
|
274
274
|
checkpoint_deploy_config: DeployCheckpointsConfigComplete,
|
|
275
275
|
) -> list[str]:
|
|
276
276
|
return [
|
|
277
|
-
checkpoint.
|
|
277
|
+
checkpoint.checkpoint_name
|
|
278
278
|
for checkpoint in checkpoint_deploy_config.checkpoint_details.checkpoints
|
|
279
279
|
]
|
|
280
280
|
|
|
@@ -311,9 +311,10 @@ def display_training_job(
|
|
|
311
311
|
table.add_column("Value")
|
|
312
312
|
|
|
313
313
|
# Basic job details
|
|
314
|
+
table.add_row("Job Name", job["name"])
|
|
315
|
+
table.add_row("Job ID", job["id"])
|
|
314
316
|
table.add_row("Project ID", job["training_project"]["id"])
|
|
315
317
|
table.add_row("Project Name", job["training_project"]["name"])
|
|
316
|
-
table.add_row("Job ID", job["id"])
|
|
317
318
|
table.add_row("Status", job["current_status"])
|
|
318
319
|
table.add_row("Instance Type", job["instance_type"]["name"])
|
|
319
320
|
table.add_row("Created", cli_common.format_localized_time(job["created_at"]))
|
|
@@ -115,18 +115,12 @@ def _build_inference_template_request(
|
|
|
115
115
|
weights_sources = []
|
|
116
116
|
for checkpoint in checkpoint_deploy_config.checkpoint_details.checkpoints:
|
|
117
117
|
# Extract checkpoint name from the first path
|
|
118
|
-
checkpoint_name = (
|
|
119
|
-
checkpoint.paths[0].strip("/").split("/")[-1]
|
|
120
|
-
if checkpoint.paths
|
|
121
|
-
else "checkpoint"
|
|
122
|
-
)
|
|
123
|
-
|
|
124
118
|
weights_source = {
|
|
125
119
|
"weight_source_type": "B10_CHECKPOINTING",
|
|
126
120
|
"b10_training_checkpoint_weights_source": {
|
|
127
121
|
"checkpoint": {
|
|
128
122
|
"training_job_id": checkpoint.training_job_id,
|
|
129
|
-
"checkpoint_name": checkpoint_name,
|
|
123
|
+
"checkpoint_name": checkpoint.checkpoint_name,
|
|
130
124
|
}
|
|
131
125
|
},
|
|
132
126
|
}
|
|
@@ -309,6 +303,7 @@ def _ensure_checkpoint_details(
|
|
|
309
303
|
job_id: Optional[str],
|
|
310
304
|
) -> CheckpointList:
|
|
311
305
|
if checkpoint_details and checkpoint_details.checkpoints:
|
|
306
|
+
# TODO: check here
|
|
312
307
|
return _process_user_provided_checkpoints(checkpoint_details, remote_provider)
|
|
313
308
|
else:
|
|
314
309
|
return _prompt_user_for_checkpoint_details(
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
from pathlib import Path
|
|
2
|
-
|
|
3
1
|
from truss_train.definitions import FullCheckpoint
|
|
4
2
|
|
|
5
3
|
|
|
@@ -8,28 +6,4 @@ def hydrate_full_checkpoint(
|
|
|
8
6
|
) -> FullCheckpoint:
|
|
9
7
|
"""Create a Checkpoint object for full model weights."""
|
|
10
8
|
# NOTE: Slash at the end is important since it means the checkpoint is a directory
|
|
11
|
-
|
|
12
|
-
return FullCheckpoint(training_job_id=job_id, paths=paths)
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
def build_full_checkpoint_string(truss_deploy_config) -> str:
|
|
16
|
-
"""Build checkpoint string from artifact references for full checkpoints.
|
|
17
|
-
|
|
18
|
-
Args:
|
|
19
|
-
truss_deploy_config: The truss deploy configuration containing training checkpoints.
|
|
20
|
-
|
|
21
|
-
Returns:
|
|
22
|
-
A space-separated string of checkpoint paths.
|
|
23
|
-
"""
|
|
24
|
-
checkpoint_parts = []
|
|
25
|
-
for (
|
|
26
|
-
truss_checkpoint
|
|
27
|
-
) in truss_deploy_config.training_checkpoints.artifact_references: # type: ignore
|
|
28
|
-
ckpt_path = Path(
|
|
29
|
-
truss_deploy_config.training_checkpoints.download_folder, # type: ignore
|
|
30
|
-
truss_checkpoint.training_job_id,
|
|
31
|
-
truss_checkpoint.paths[0],
|
|
32
|
-
)
|
|
33
|
-
checkpoint_parts.append(str(ckpt_path))
|
|
34
|
-
|
|
35
|
-
return " ".join(checkpoint_parts)
|
|
9
|
+
return FullCheckpoint(training_job_id=job_id, checkpoint_name=checkpoint_id)
|
|
@@ -11,11 +11,10 @@ def hydrate_lora_checkpoint(
|
|
|
11
11
|
) -> LoRACheckpoint:
|
|
12
12
|
"""Create a LoRA-specific Checkpoint object."""
|
|
13
13
|
# NOTE: Slash at the end is important since it means the checkpoint is a directory
|
|
14
|
-
paths = [f"rank-0/{checkpoint_id}/"]
|
|
15
14
|
return LoRACheckpoint(
|
|
16
15
|
training_job_id=job_id,
|
|
17
|
-
paths=paths,
|
|
18
16
|
lora_details=LoRADetails(rank=_get_lora_rank(checkpoint)),
|
|
17
|
+
checkpoint_name=checkpoint_id,
|
|
19
18
|
)
|
|
20
19
|
|
|
21
20
|
|
|
@@ -5,6 +5,4 @@ def hydrate_whisper_checkpoint(
|
|
|
5
5
|
job_id: str, checkpoint_id: str, checkpoint: dict
|
|
6
6
|
) -> WhisperCheckpoint:
|
|
7
7
|
"""Create a Checkpoint object for whisper model weights."""
|
|
8
|
-
|
|
9
|
-
paths = [f"rank-0/{checkpoint_id}/"]
|
|
10
|
-
return WhisperCheckpoint(training_job_id=job_id, paths=paths)
|
|
8
|
+
return WhisperCheckpoint(training_job_id=job_id, checkpoint_name=checkpoint_id)
|
truss/remote/baseten/api.py
CHANGED
truss/remote/baseten/service.py
CHANGED
|
@@ -137,13 +137,6 @@ class BasetenService(TrussService):
|
|
|
137
137
|
|
|
138
138
|
return decode_content()
|
|
139
139
|
|
|
140
|
-
parsed_response = response.json()
|
|
141
|
-
|
|
142
|
-
if "error" in parsed_response:
|
|
143
|
-
# In the case that the model is in a non-ready state, the response
|
|
144
|
-
# will be a json with an `error` key.
|
|
145
|
-
return parsed_response
|
|
146
|
-
|
|
147
140
|
return response.json()
|
|
148
141
|
|
|
149
142
|
def authenticate(self) -> dict:
|
|
@@ -26,7 +26,9 @@ ENV HOME=${HOME:-/root}
|
|
|
26
26
|
ENV APP_HOME=/{{ app_username }}
|
|
27
27
|
RUN mkdir -p ${APP_HOME} {{ control_server_dir }}
|
|
28
28
|
{# Create a non-root user to run model containers. #}
|
|
29
|
-
RUN useradd -u {{ app_user_uid }} -ms /bin/bash {{ app_username }}
|
|
29
|
+
RUN ( which useradd >/dev/null 2>&1 && useradd -u {{ app_user_uid }} -ms /bin/bash {{ app_username }} ) || \
|
|
30
|
+
( which adduser >/dev/null 2>&1 && adduser -u {{ app_user_uid }} -s /bin/sh -D {{ app_username }} ) || \
|
|
31
|
+
{ echo "ERROR: Could not create non-root user"; exit 1; }
|
|
30
32
|
{% endblock %} {#- endblock user_setup #}
|
|
31
33
|
|
|
32
34
|
{#- at the very beginning, set non-interactive mode for apt #}
|
|
@@ -72,9 +72,9 @@ class ControlServer:
|
|
|
72
72
|
# httptools installed, which does not work with our requests & version
|
|
73
73
|
# of uvicorn.
|
|
74
74
|
http="h11",
|
|
75
|
+
loop="uvloop",
|
|
75
76
|
**extra_kwargs,
|
|
76
77
|
)
|
|
77
|
-
cfg.setup_event_loop()
|
|
78
78
|
|
|
79
79
|
server = uvicorn.Server(cfg)
|
|
80
80
|
asyncio.run(server.serve())
|
|
@@ -7,7 +7,6 @@ python-json-logger>=2.0.2
|
|
|
7
7
|
tenacity>=8.1.0
|
|
8
8
|
# To avoid divergence, this should follow the latest release.
|
|
9
9
|
truss==0.11.1
|
|
10
|
-
|
|
11
|
-
uvicorn>=0.24.0,<0.36.0
|
|
10
|
+
uvicorn>=0.24.0
|
|
12
11
|
uvloop>=0.19.0
|
|
13
12
|
websockets>=10.0
|
|
@@ -19,7 +19,6 @@ python-json-logger>=2.0.2
|
|
|
19
19
|
pyyaml>=6.0.0
|
|
20
20
|
requests>=2.31.0
|
|
21
21
|
truss-transfer==0.0.32
|
|
22
|
-
|
|
23
|
-
uvicorn>=0.24.0,<0.36.0
|
|
22
|
+
uvicorn>=0.24.0
|
|
24
23
|
uvloop>=0.19.0
|
|
25
24
|
websockets>=10.0
|
|
@@ -497,9 +497,9 @@ class TrussServer:
|
|
|
497
497
|
timeout_graceful_shutdown=TIMEOUT_GRACEFUL_SHUTDOWN,
|
|
498
498
|
log_config=log_config.make_log_config(log_level),
|
|
499
499
|
ws_max_size=WS_MAX_MSG_SZ_BYTES,
|
|
500
|
+
loop="uvloop",
|
|
500
501
|
**extra_kwargs,
|
|
501
502
|
)
|
|
502
|
-
cfg.setup_event_loop() # Call this so uvloop gets used
|
|
503
503
|
server = uvicorn.Server(config=cfg)
|
|
504
504
|
self._server = server
|
|
505
505
|
asyncio.run(server.serve())
|
|
@@ -69,7 +69,7 @@ COPY --chown={{ default_owner }} ./{{ config.data_dir }} ${APP_HOME}/data
|
|
|
69
69
|
|
|
70
70
|
{%- if model_cache_v2 %}
|
|
71
71
|
{# v0.0.9, keep synced with server_requirements.txt #}
|
|
72
|
-
RUN curl -sSL --fail --retry 5 --retry-delay 2 -o /usr/local/bin/truss-transfer-cli https://github.com/basetenlabs/truss/releases/download/v0.
|
|
72
|
+
RUN curl -sSL --fail --retry 5 --retry-delay 2 -o /usr/local/bin/truss-transfer-cli https://github.com/basetenlabs/truss/releases/download/v0.11.10rc5/truss-transfer-cli-v0.11.10rc5-linux-x86_64-unknown-linux-musl
|
|
73
73
|
RUN chmod +x /usr/local/bin/truss-transfer-cli
|
|
74
74
|
RUN mkdir /static-bptr
|
|
75
75
|
RUN echo "hash {{model_cache_hash}}"
|
|
@@ -115,8 +115,7 @@ def test_hydrate_full_checkpoint():
|
|
|
115
115
|
assert isinstance(result, definitions.FullCheckpoint)
|
|
116
116
|
assert result.training_job_id == job_id
|
|
117
117
|
assert result.model_weight_format == ModelWeightsFormat.FULL
|
|
118
|
-
assert
|
|
119
|
-
assert result.paths[0] == f"rank-0/{checkpoint_id}/"
|
|
118
|
+
assert result.checkpoint_name == checkpoint_id
|
|
120
119
|
|
|
121
120
|
|
|
122
121
|
def test_hydrate_checkpoint_dispatcher_full():
|
|
@@ -272,6 +271,6 @@ def test_hydrate_whisper_checkpoint():
|
|
|
272
271
|
result = hydrate_whisper_checkpoint(job_id, checkpoint_id, checkpoint)
|
|
273
272
|
|
|
274
273
|
assert result.training_job_id == job_id
|
|
275
|
-
assert result.
|
|
274
|
+
assert result.checkpoint_name == checkpoint_id
|
|
276
275
|
assert result.model_weight_format == definitions.ModelWeightsFormat.WHISPER
|
|
277
276
|
assert isinstance(result, definitions.WhisperCheckpoint)
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
+
from unittest.mock import MagicMock
|
|
2
|
+
|
|
1
3
|
from truss.remote.baseten import service
|
|
4
|
+
from truss.remote.baseten.core import ModelVersionHandle
|
|
2
5
|
|
|
3
6
|
|
|
4
7
|
def test_model_invoke_url_prod():
|
|
@@ -65,3 +68,56 @@ def test_chain_logs_url():
|
|
|
65
68
|
"https://app.baseten.co", "abc", "666", "543"
|
|
66
69
|
)
|
|
67
70
|
assert url == "https://app.baseten.co/chains/abc/logs/666/543"
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
def test_predict_response_to_json():
|
|
74
|
+
"""Test that predict method returns JSON response for normal dict result."""
|
|
75
|
+
# Create a mock BasetenService
|
|
76
|
+
mock_handle = MagicMock(spec=ModelVersionHandle)
|
|
77
|
+
mock_handle.model_id = "test-model"
|
|
78
|
+
mock_handle.version_id = "test-version"
|
|
79
|
+
mock_handle.hostname = "https://model-test.api.baseten.co"
|
|
80
|
+
|
|
81
|
+
mock_api = MagicMock()
|
|
82
|
+
mock_api.app_url = "https://app.baseten.co"
|
|
83
|
+
|
|
84
|
+
service_instance = service.BasetenService(
|
|
85
|
+
model_version_handle=mock_handle,
|
|
86
|
+
is_draft=False,
|
|
87
|
+
api_key="test-key",
|
|
88
|
+
service_url="https://test.com",
|
|
89
|
+
api=mock_api,
|
|
90
|
+
)
|
|
91
|
+
|
|
92
|
+
# Mock the _send_request method to return a successful JSON response
|
|
93
|
+
mock_response = MagicMock()
|
|
94
|
+
mock_response.json.return_value = {"result": "success"}
|
|
95
|
+
service_instance._send_request = MagicMock(return_value=mock_response)
|
|
96
|
+
|
|
97
|
+
# Test predict method
|
|
98
|
+
result = service_instance.predict({"input": "test"})
|
|
99
|
+
|
|
100
|
+
# Verify that the JSON response is returned directly
|
|
101
|
+
assert result == {"result": "success"}
|
|
102
|
+
|
|
103
|
+
# Test non-dict response types below
|
|
104
|
+
|
|
105
|
+
# With integer response
|
|
106
|
+
mock_response.json.return_value = 42
|
|
107
|
+
result = service_instance.predict({"input": "test"})
|
|
108
|
+
assert result == 42
|
|
109
|
+
|
|
110
|
+
# With string response
|
|
111
|
+
mock_response.json.return_value = "success"
|
|
112
|
+
result = service_instance.predict({"input": "test"})
|
|
113
|
+
assert result == "success"
|
|
114
|
+
|
|
115
|
+
# With list response
|
|
116
|
+
mock_response.json.return_value = [1, 2, 3, 4]
|
|
117
|
+
result = service_instance.predict({"input": "test"})
|
|
118
|
+
assert result == [1, 2, 3, 4]
|
|
119
|
+
|
|
120
|
+
# With boolean response
|
|
121
|
+
mock_response.json.return_value = True
|
|
122
|
+
result = service_instance.predict({"input": "test"})
|
|
123
|
+
assert result is True
|
|
@@ -17,18 +17,18 @@ truss/cli/logs/model_log_watcher.py,sha256=38vQCcNItfDrTKucvdJ10ZYLOcbGa5ZAKUqUn
|
|
|
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=
|
|
20
|
+
truss/cli/train/core.py,sha256=fWuHvjIT4tkax19B7_1_SWvkX1ot2xQ6WwcDGBhTnus,26520
|
|
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
25
|
truss/cli/train/types.py,sha256=0tfgInTm1Dmq7p8Gh_0RwxGViN6Tpp0YjsiYeMUNiPE,1163
|
|
26
26
|
truss/cli/train/deploy_checkpoints/__init__.py,sha256=HuiDD6-qfwJ7fbRVX4s9Fxn6rmO6nwTLb0fVxwcMKls,137
|
|
27
|
-
truss/cli/train/deploy_checkpoints/deploy_checkpoints.py,sha256=
|
|
27
|
+
truss/cli/train/deploy_checkpoints/deploy_checkpoints.py,sha256=AEl41GHI6s35ajVaPUGnbRJAdAwUaQdVnLPbUbGAifE,22478
|
|
28
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=
|
|
30
|
-
truss/cli/train/deploy_checkpoints/deploy_lora_checkpoints.py,sha256=
|
|
31
|
-
truss/cli/train/deploy_checkpoints/deploy_whisper_checkpoints.py,sha256=
|
|
29
|
+
truss/cli/train/deploy_checkpoints/deploy_full_checkpoints.py,sha256=f8_UB7CF6Y3MOhaf8Zim0heNiauOOAmA-WqsyP3X9mk,386
|
|
30
|
+
truss/cli/train/deploy_checkpoints/deploy_lora_checkpoints.py,sha256=YKVMy3xogmbubJNrN_1LCR6xdHj9lBOAlKgMxWHdlQM,1115
|
|
31
|
+
truss/cli/train/deploy_checkpoints/deploy_whisper_checkpoints.py,sha256=eEo4ahRTsvRKOxCDj7DAHIUyUZWicn39VmC1PYS0pCY,314
|
|
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,30 +52,30 @@ 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=5B5IXNy0v8hRHNH2ar3rldDa47kwt5s1PtKZQ9_pfmE,28263
|
|
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
|
|
59
59
|
truss/remote/baseten/error.py,sha256=3TNTwwPqZnr4NRd9Sl6SfLUQR2fz9l6akDPpOntTpzA,578
|
|
60
60
|
truss/remote/baseten/remote.py,sha256=Se8AES5mk8jxa8S9fN2DSG7wnsaV7ftRjJ4Uwc_w_S0,22544
|
|
61
61
|
truss/remote/baseten/rest_client.py,sha256=_t3CWsWARt2u0C0fDsF4rtvkkHe-lH7KXoPxWXAkKd4,1185
|
|
62
|
-
truss/remote/baseten/service.py,sha256=
|
|
62
|
+
truss/remote/baseten/service.py,sha256=HMaKiYbr2Mzv4BfXF9QkJ8H3Wwrq3LOMpFt9js4t0rs,5834
|
|
63
63
|
truss/remote/baseten/utils/status.py,sha256=jputc9N9AHXxUuW4KOk6mcZKzQ_gOBOe5BSx9K0DxPY,1266
|
|
64
64
|
truss/remote/baseten/utils/tar.py,sha256=pMUv--YkwXDngUx1WUOK-KmAIKMcOg2E-CD5x4heh3s,2514
|
|
65
65
|
truss/remote/baseten/utils/time.py,sha256=Ry9GMjYnbIGYVIGwtmv4V8ljWjvdcaCf5NOQzlNeGxI,397
|
|
66
66
|
truss/remote/baseten/utils/transfer.py,sha256=d3VptuQb6M1nyS6kz0BAfeOYDLkMKUjatJXpY-mp-As,1548
|
|
67
67
|
truss/templates/README.md.jinja,sha256=N7CJdyldZuJamj5jLh47le0hFBdu9irVsTBqoxhPNPQ,2476
|
|
68
68
|
truss/templates/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
69
|
-
truss/templates/base.Dockerfile.jinja,sha256=
|
|
69
|
+
truss/templates/base.Dockerfile.jinja,sha256=inDxFsqWHzZ0B-LPm9ZiZhgO4VZGLMsD6LRkWBa8pTY,5466
|
|
70
70
|
truss/templates/cache.Dockerfile.jinja,sha256=1qZqDo1phrcqi-Vwol-VafYJkADsBbQWU6huQ-_1x00,1146
|
|
71
71
|
truss/templates/cache_requirements.txt,sha256=xoPoJ-OVnf1z6oq_RVM3vCr3ionByyqMLj7wGs61nUs,87
|
|
72
72
|
truss/templates/copy_cache_files.Dockerfile.jinja,sha256=Os5zFdYLZ_AfCRGq4RcpVTObOTwL7zvmwYcvOzd_Zqo,126
|
|
73
73
|
truss/templates/docker_server_requirements.txt,sha256=PyhOPKAmKW1N2vLvTfLMwsEtuGpoRrbWuNo7tT6v2Mc,18
|
|
74
|
-
truss/templates/server.Dockerfile.jinja,sha256=
|
|
75
|
-
truss/templates/control/requirements.txt,sha256=
|
|
74
|
+
truss/templates/server.Dockerfile.jinja,sha256=KzFZwJlZ3zExYheHtfXFIiL72pzbCQzJC5Z7uZyrX2A,7071
|
|
75
|
+
truss/templates/control/requirements.txt,sha256=tJGr83WoE0CZm2FrloZ9VScK84q-_FTuVXjDYrexhW0,250
|
|
76
76
|
truss/templates/control/control/application.py,sha256=5Kam6M-XtfKGaXQz8cc3d0bwDkB80o2MskABWROx1gk,5321
|
|
77
77
|
truss/templates/control/control/endpoints.py,sha256=KzqsLVNJE6r6TCPW8D5FMCtsfHadTwR15A3z_viGxmM,11782
|
|
78
|
-
truss/templates/control/control/server.py,sha256=
|
|
78
|
+
truss/templates/control/control/server.py,sha256=bdyXoqhW9e4jvFhxt3eoBKUPzH2Y5UAnMhY5GR0Kd5M,3124
|
|
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
|
|
81
81
|
truss/templates/control/control/helpers/errors.py,sha256=LddFuQywuCCdYTEnFT5EalxdWos4uR89rbhMakCy2bA,970
|
|
@@ -96,8 +96,8 @@ truss/templates/docker_server/supervisord.conf.jinja,sha256=dd37fwZE--cutrvOUCqE
|
|
|
96
96
|
truss/templates/server/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
97
97
|
truss/templates/server/main.py,sha256=kWXrdD8z8IpamyWxc8qcvd5ck9gM1Kz2QH5qHJCnmOQ,222
|
|
98
98
|
truss/templates/server/model_wrapper.py,sha256=k75VVISwwlsx5EGb82UZsu8kCM_i6Yi3-Hd0-Kpm1yo,42055
|
|
99
|
-
truss/templates/server/requirements.txt,sha256=
|
|
100
|
-
truss/templates/server/truss_server.py,sha256=
|
|
99
|
+
truss/templates/server/requirements.txt,sha256=2jknFfEZyN0kKKhQo5hNvZFfpgImTiFDLOTw76G3Fjk,672
|
|
100
|
+
truss/templates/server/truss_server.py,sha256=YKcG7Sr0T_8XjIC3GK9vBwoNb8oxVgwic3-3Ikzpmgw,19781
|
|
101
101
|
truss/templates/server/common/__init__.py,sha256=qHIqr68L5Tn4mV6S-PbORpcuJ4jmtBR8aCuRTIWDvNo,85
|
|
102
102
|
truss/templates/server/common/errors.py,sha256=My0P6-Y7imVTICIhazHT0vlSu3XJDH7As06OyVzu4Do,8589
|
|
103
103
|
truss/templates/server/common/patches.py,sha256=uEOzvDnXsHOkTSa8zygGYuR4GHhrFNVHNQc5peJcwvo,1393
|
|
@@ -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=
|
|
145
|
+
truss/tests/cli/train/test_deploy_checkpoints.py,sha256=Ndkd9YxEgDLf3zLAZYH0myFK_wkKTz0oGZ57yWQt_l8,10100
|
|
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
|
|
@@ -163,7 +163,7 @@ truss/tests/remote/baseten/test_api.py,sha256=AKJeNsrUtTNa0QPClfEvXlBOSJ214PKp23
|
|
|
163
163
|
truss/tests/remote/baseten/test_auth.py,sha256=ttu4bDnmwGfo3oiNut4HVGnh-QnjAefwZJctiibQJKY,669
|
|
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
|
-
truss/tests/remote/baseten/test_service.py,sha256=
|
|
166
|
+
truss/tests/remote/baseten/test_service.py,sha256=ehbGkzzSPdLN7JHxc0O9YDPfzzKqU8OBzJGjRdw08zE,3786
|
|
167
167
|
truss/tests/templates/control/control/conftest.py,sha256=euDFh0AhcHP-vAmTzi1Qj3lymnplDTgvtbt4Ez_lfpw,654
|
|
168
168
|
truss/tests/templates/control/control/test_endpoints.py,sha256=HIlRYOicsdHD8r_V5gHpZWybDC26uwXJfbvCohdE3HI,3751
|
|
169
169
|
truss/tests/templates/control/control/test_server.py,sha256=0D0OMwZ-9jZRxxHoiQYij0RBMenuA9o29LlwNzd04Vk,9149
|
|
@@ -365,13 +365,13 @@ truss_chains/remote_chainlet/model_skeleton.py,sha256=8ZReLOO2MLcdg7bNZ61C-6j-e6
|
|
|
365
365
|
truss_chains/remote_chainlet/stub.py,sha256=Y2gDUzMY9WRaQNHIz-o4dfLUfFyYV9dUhIRQcfgrY8g,17209
|
|
366
366
|
truss_chains/remote_chainlet/utils.py,sha256=Zn3GZRvK8f65WUa-qa-8uPFZ2pD7ukRFxbLOvT-BL0Q,24063
|
|
367
367
|
truss_train/__init__.py,sha256=A3MzRPMInZfmzLvPpZI7gdKgshAVCw6bwhU-6JYU2zs,939
|
|
368
|
-
truss_train/definitions.py,sha256=
|
|
368
|
+
truss_train/definitions.py,sha256=jcaVICE03iI8lBqEPe01uO3vFiMu_8pqB-j_dX-zwhI,8209
|
|
369
369
|
truss_train/deployment.py,sha256=lWWANSuzBWu2M4oK4qD7n-oVR1JKdmw2Pn5BJQHg-Ck,3074
|
|
370
370
|
truss_train/loader.py,sha256=0o66EjBaHc2YY4syxxHVR4ordJWs13lNXnKjKq2wq0U,1630
|
|
371
371
|
truss_train/public_api.py,sha256=9N_NstiUlmBuLUwH_fNG_1x7OhGCytZLNvqKXBlStrM,1220
|
|
372
372
|
truss_train/restore_from_checkpoint.py,sha256=8hdPm-WSgkt74HDPjvCjZMBpvA9MwtoYsxVjOoa7BaM,1176
|
|
373
|
-
truss-0.11.
|
|
374
|
-
truss-0.11.
|
|
375
|
-
truss-0.11.
|
|
376
|
-
truss-0.11.
|
|
377
|
-
truss-0.11.
|
|
373
|
+
truss-0.11.10rc501.dist-info/METADATA,sha256=LGb9ySA0KjGOIz2WfS0Xd7utDYm_nYtUwP7RuIlN9X4,6683
|
|
374
|
+
truss-0.11.10rc501.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
375
|
+
truss-0.11.10rc501.dist-info/entry_points.txt,sha256=-MwKfHHQHQ6j0HqIgvxrz3CehCmczDLTD-OsRHnjjuU,130
|
|
376
|
+
truss-0.11.10rc501.dist-info/licenses/LICENSE,sha256=FTqGzu85i-uw1Gi8E_o0oD60bH9yQ_XIGtZbA1QUYiw,1064
|
|
377
|
+
truss-0.11.10rc501.dist-info/RECORD,,
|
truss_train/definitions.py
CHANGED
|
@@ -185,12 +185,13 @@ class TrainingProject(custom_types.SafeModelNoExtra):
|
|
|
185
185
|
|
|
186
186
|
class Checkpoint(custom_types.ConfigModel, ABC):
|
|
187
187
|
training_job_id: str
|
|
188
|
-
|
|
188
|
+
checkpoint_name: str
|
|
189
189
|
model_weight_format: ModelWeightsFormat
|
|
190
190
|
|
|
191
191
|
def to_truss_config(self) -> truss_config.TrainingArtifactReference:
|
|
192
192
|
return truss_config.TrainingArtifactReference(
|
|
193
|
-
training_job_id=self.training_job_id,
|
|
193
|
+
training_job_id=self.training_job_id,
|
|
194
|
+
paths=[f"rank-0/{self.checkpoint_name}/"],
|
|
194
195
|
)
|
|
195
196
|
|
|
196
197
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|