Skip to content

fix: fix kmeans test deletion sequence, increment lineage statics #2815

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
merged 1 commit into from
Dec 31, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions src/sagemaker/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -3565,6 +3565,7 @@ def endpoint_from_production_variants(
if data_capture_config_dict is not None:
config_options["DataCaptureConfig"] = data_capture_config_dict

LOGGER.info("Creating endpoint-config with name %s", name)
self.sagemaker_client.create_endpoint_config(**config_options)

return self.create_endpoint(endpoint_name=name, config_name=name, tags=tags, wait=wait)
Expand Down
4 changes: 2 additions & 2 deletions tests/integ/sagemaker/lineage/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@
from tests.integ.sagemaker.lineage.helpers import name, names

SLEEP_TIME_SECONDS = 1
STATIC_PIPELINE_NAME = "SdkIntegTestStaticPipeline15"
STATIC_ENDPOINT_NAME = "SdkIntegTestStaticEndpoint15"
STATIC_PIPELINE_NAME = "SdkIntegTestStaticPipeline16"
STATIC_ENDPOINT_NAME = "SdkIntegTestStaticEndpoint16"


@pytest.fixture
Expand Down
9 changes: 4 additions & 5 deletions tests/integ/test_kmeans.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,10 @@ def test_kmeans(sagemaker_session, cpu_instance_type, training_set):
for record in result:
assert record.label["closest_cluster"] is not None
assert record.label["distance_to_cluster"] is not None

predictor.delete_model()
with pytest.raises(Exception) as exception:
sagemaker_session.sagemaker_client.describe_model(ModelName=model.name)
assert "Could not find model" in str(exception.value)
predictor.delete_model()
with pytest.raises(Exception) as exception:
sagemaker_session.sagemaker_client.describe_model(ModelName=model.name)
assert "Could not find model" in str(exception.value)


def test_async_kmeans(sagemaker_session, cpu_instance_type, training_set):
Expand Down