Skip to content

Flaky test #4580

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
Apr 16, 2024
Merged
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
8 changes: 3 additions & 5 deletions tests/integ/sagemaker/serve/test_serve_js_happy.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,15 @@
SAMPLE_RESPONSE = [
{"generated_text": "Hello, I'm a language model, and I'm here to help you with your English."}
]
JS_GATED_MODEL_ID = "meta-textgeneration-llama-2-7b-f"
JS_MODEL_ID = "huggingface-textgeneration1-gpt-neo-125m-fp16"
ROLE_NAME = "SageMakerRole"


@pytest.fixture
def happy_model_builder(sagemaker_session):
iam_client = sagemaker_session.boto_session.client("iam")
return ModelBuilder(
model=JS_GATED_MODEL_ID,
model=JS_MODEL_ID,
schema_builder=SchemaBuilder(SAMPLE_PROMPT, SAMPLE_RESPONSE),
role_arn=iam_client.get_role(RoleName=ROLE_NAME)["Role"]["Arn"],
sagemaker_session=sagemaker_session,
Expand All @@ -59,9 +59,7 @@ def test_happy_tgi_sagemaker_endpoint(happy_model_builder, gpu_instance_type):
with timeout(minutes=SERVE_SAGEMAKER_ENDPOINT_TIMEOUT):
try:
logger.info("Deploying and predicting in SAGEMAKER_ENDPOINT mode...")
predictor = model.deploy(
instance_type=gpu_instance_type, endpoint_logging=False, accept_eula=True
)
predictor = model.deploy(instance_type=gpu_instance_type, endpoint_logging=False)
logger.info("Endpoint successfully deployed.")

updated_sample_input = happy_model_builder.schema_builder.sample_input
Expand Down