This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "Version": "2012-10-17", | |
| "Statement": [ | |
| { | |
| "Sid": "VPCDeployment", | |
| "Effect": "Deny", | |
| "Action": [ | |
| "sagemaker:CreateAutoMLJob", | |
| "sagemaker:CreateDataQualityJobDefinition", | |
| "sagemaker:CreateDomain", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from sagemaker.workflow.retry import ( | |
| StepRetryPolicy, | |
| StepExceptionTypeEnum, | |
| SageMakerJobStepRetryPolicy, | |
| SageMakerJobExceptionTypeEnum | |
| ) | |
| step_retry_policy = StepRetryPolicy( | |
| exception_types=[ | |
| StepExceptionTypeEnum.SERVICE_FAULT, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| step_train = TrainingStep( | |
| name="TrainAbaloneModel", | |
| estimator=xgb_train, | |
| inputs={...}, | |
| retry_policies=[ | |
| step_retry_policy, | |
| job_retry_policy | |
| ] | |
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """Example workflow pipeline script for abalone pipeline. | |
| . -RegisterModel | |
| . | |
| Process-> Train -> Evaluate -> Condition . | |
| . | |
| . -(stop) | |
| Implements a get_pipeline(**kwargs) method. | |
| """ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import json | |
| import boto3 | |
| import logging | |
| from botocore.config import Config | |
| logger = logging.getLogger() | |
| logger.setLevel(logging.INFO) | |
| config = Config(retries = {'max_attempts': 10,'mode': 'standard'}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| # install code-server with Anaconda | |
| conda install -y -c conda-forge code-server | |
| # run code-server with no auth is for illustrative purposes. | |
| # Make sure you enable authentication in your environment https://coder.com/docs/code-server/latest | |
| code-server --auth none |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| mkdir -p vscode | |
| cd vscode | |
| sudo su | |
| curl -fsSL https://code-server.dev/install.sh | sh -s -- --version=4.9.1 | |
| exit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # REPLACE HOST WITH YOUR NOTEBOOK INSTANCE URL BEFORE RUNNING THE COMMAND | |
| docker run \ | |
| -it \ | |
| -p 8080:8080 \ | |
| -v /home/ec2-user/SageMaker/mydata:/label-studio/data \ | |
| heartexlabs/label-studio:latest label-studio \ | |
| --host https://your-notebook-instance-name.notebook.your-region.sagemaker.aws/proxy/8080 | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # /home/ec2-user/anaconda3/envs/JupyterSystemEnv/bin/pip install -U keytar jupyter-server-proxy | |
| echo == INSTALLING CODE-SERVER == | |
| curl -fsSL https://code-server.dev/install.sh | sh -s -- --version=4.12.0 | |
| ######################################### | |
| ### INTEGRATE CODE-SERVER WITH JUPYTER | |
| ######################################### | |
| echo == UPDATING THE JUPYTER SERVER CONFIG == |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| set -e | |
| ################################################# | |
| ## INSTALL DEPENDENCIES AND PULL CONTAINER IMAGE | |
| ################################################# | |
| echo ==INSTALLING DEPENDENCIES== | |
| /home/ec2-user/anaconda3/envs/JupyterSystemEnv/bin/pip install -U jupyter-server-proxy | |
| /usr/bin/docker pull heartexlabs/label-studio:latest |