Skip to content

Commit

Permalink
test: sagemaker tests
Browse files Browse the repository at this point in the history
  • Loading branch information
asafgardin committed Dec 12, 2023
1 parent 71d1cc9 commit 5b753ea
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 23 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
23 changes: 0 additions & 23 deletions scripts/run_sm_examples.py

This file was deleted.

33 changes: 33 additions & 0 deletions tests/integration_tests/test_sagemaker.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import subprocess

import pytest
from pathlib import Path

SAGEMAKER_DIR = "sagemaker"

SAGEMAKER_PATH = Path(__file__).parent.parent.parent / "examples" / SAGEMAKER_DIR


@pytest.mark.skip(reason="SageMaker integration tests need endpoints to be running")
@pytest.mark.parametrize(
argnames=["test_file_name"],
argvalues=[
("answer.py",),
("completion.py",),
("gec.py",),
("paraphrase.py",),
("summarization.py",),
],
ids=[
"when_answer__should_return_ok",
"when_completion__should_return_ok",
"when_gec__should_return_ok",
"when_paraphrase__should_return_ok",
"when_summarization__should_return_ok",
],
)
def test_sagemaker(test_file_name: str):
file_path = SAGEMAKER_PATH / test_file_name
print(f"About to run: {file_path}")
exit_code = subprocess.call(["python", file_path])
assert exit_code == 0, f"failed to run {test_file_name}"

0 comments on commit 5b753ea

Please sign in to comment.