Skip to content

Master benchmark feature merge master #4661

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
c4ac480
fix: mainline alt config parsing (#4602)
Captainia Apr 23, 2024
30c9bf6
Add Triton v24.03 URI (#4605)
nikhil-sk Apr 23, 2024
fe32d79
feature: support session tag chaining for training job (#4596)
jessicazhu3 Apr 24, 2024
8984d92
prepare release v2.217.0
Apr 24, 2024
ed390dd
update development version to v2.217.1.dev0
Apr 24, 2024
2a52478
fix: properly close files in lineage queries and tests (#4587)
jmahlik Apr 25, 2024
72e0c97
feature: set default allow_pickle param to False (#4557)
akrishna1995 Apr 29, 2024
b17d332
Fix:invalid component error with new metadata (#4634)
Captainia Apr 30, 2024
15094ee
prepare release v2.218.0
May 1, 2024
7c49f5d
update development version to v2.218.1.dev0
May 1, 2024
45e3192
chore: update skipped flaky tests (#4644)
Captainia May 2, 2024
c751dbd
chore: release tgi 2.0.1 (#4642)
haixiw May 2, 2024
0f7e678
fix: Fix UserAgent logging in Python SDK (#4647)
knikure May 3, 2024
fa1a8bf
prepare release v2.218.1
May 3, 2024
0075fb3
update development version to v2.218.2.dev0
May 3, 2024
49e09c3
feature: allow choosing js payload by alias in private method
keerthanvasist May 2, 2024
ab4d1c5
Merge Master.
Captainia Apr 23, 2024
d717dcd
Add ReadOnly APIs (#4606)
makungaj1 Apr 24, 2024
eead6a0
feat: tag JumpStart resource with config names (#4608)
Captainia Apr 25, 2024
a8d30e0
ModelBuilder: Add functionalities to get and set deployment config. (…
makungaj1 Apr 25, 2024
265cfc8
Benchmark feature v2 (#4618)
makungaj1 Apr 25, 2024
76263f5
Merge Master
Captainia Apr 26, 2024
c91cda5
Fix fetch instance rate bug (#4624)
makungaj1 Apr 26, 2024
2b188b6
chore: require config name and instance type in set_deployment_config…
Captainia Apr 26, 2024
db69672
Deployment Configs - Follow-ups (#4626)
makungaj1 Apr 28, 2024
7fa391b
fix: use different separator to flatten dict (#4629)
Captainia Apr 29, 2024
5af9b6b
Use separate tags for inference and training configs (#4635)
Captainia Apr 30, 2024
b42f8dc
Merge master
Captainia May 2, 2024
eebd610
Benchmark feature fixes (#4632)
makungaj1 May 2, 2024
8bdf840
Merge master
Captainia May 6, 2024
9dc9b54
Merge master into benchmark feature (#4652)
Captainia May 7, 2024
c6edf95
Merge master into master-benchmark-feature (#4656)
Captainia May 7, 2024
ffc443d
Merge branch 'aws:master' into master-benchmark-feature-merge-master
makungaj1 May 7, 2024
43f2114
Merge branch 'master-benchmark-feature' into master-benchmark-feature…
makungaj1 May 7, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/sagemaker/jumpstart/payload_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ def _construct_payload(
tolerate_deprecated_model: bool = False,
sagemaker_session: Session = DEFAULT_JUMPSTART_SAGEMAKER_SESSION,
model_type: JumpStartModelType = JumpStartModelType.OPEN_WEIGHTS,
alias: Optional[str] = None,
) -> Optional[JumpStartSerializablePayload]:
"""Returns example payload from prompt.

Expand Down Expand Up @@ -102,7 +103,9 @@ def _construct_payload(
if payloads is None or len(payloads) == 0:
return None

payload_to_use: JumpStartSerializablePayload = list(payloads.values())[0]
payload_to_use: JumpStartSerializablePayload = (
payloads[alias] if alias else list(payloads.values())[0]
)

prompt_key: Optional[str] = payload_to_use.prompt_key
if prompt_key is None:
Expand Down
34 changes: 30 additions & 4 deletions tests/unit/sagemaker/jumpstart/test_payload_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,36 @@ def test_construct_payload(self, patched_get_model_specs):
region = "us-west-2"

constructed_payload_body = _construct_payload(
prompt="kobebryant",
model_id=model_id,
model_version="*",
region=region,
prompt="kobebryant", model_id=model_id, model_version="*", region=region
).body

self.assertEqual(
{
"hello": {"prompt": "kobebryant"},
"seed": 43,
},
constructed_payload_body,
)

# Unsupported model
self.assertIsNone(
_construct_payload(
prompt="blah",
model_id="default_payloads",
model_version="*",
region=region,
)
)

@patch("sagemaker.jumpstart.accessors.JumpStartModelsAccessor.get_model_specs")
def test_construct_payload_with_specific_alias(self, patched_get_model_specs):
patched_get_model_specs.side_effect = get_special_model_spec

model_id = "prompt-key"
region = "us-west-2"

constructed_payload_body = _construct_payload(
prompt="kobebryant", model_id=model_id, model_version="*", region=region, alias="Dog"
).body

self.assertEqual(
Expand Down