in credit-card-fraud-detection/neptune_ml_utils.py [0:0]
def __create_model(self, name: str, model_s3_location: str):
image_uri = self.PYTORCH_CPU_CONTAINER_IMAGE
instance_type = self.INSTANCE_TYPE
role = self.__get_neptune_ml_role()
sm = boto3.client("sagemaker")
name = "{}-{}".format(name, strftime("%Y-%m-%d-%H-%M-%S", gmtime()))
create_model_result = self.__run_create_model(
sm, name, role, image_uri, model_s3_location)
create_endpoint_config_result = self.__run_create_endpoint_config(
sm, name, instance_type=instance_type)
create_endpoint_result = sm.create_endpoint(
EndpointName=name, EndpointConfigName=name)
return name