Skip to content
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

[Do Not Merge] Temporarily adding logic to create sagemaker client with endpoint url #389

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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: 7 additions & 1 deletion smdebug/rules/action/stop_training_action.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,13 @@ def __init__(self, rule_name, training_job_prefix):
self._logger.info(
f"StopTrainingAction created with training_job_prefix:{training_job_prefix} and region:{env_region_name}"
)
self._sm_client = boto3.client("sagemaker", region_name=env_region_name)
endpoint_url = os.getenv("sagemaker_endpoint_url", None)
if endpoint_url:
self._sm_client = boto3.client(
"sagemaker", region_name=env_region_name, endpoint_url=endpoint_url
)
else:
self._sm_client = boto3.client("sagemaker", region_name=env_region_name)
self._rule_name = rule_name
self._found_jobs = self._get_sm_tj_jobs_with_prefix()

Expand Down