exasol / sagemaker-extension Goto Github PK
View Code? Open in Web Editor NEWAn Exasol extension to interact with AWS SageMaker from inside the database
License: MIT License
An Exasol extension to interact with AWS SageMaker from inside the database
License: MIT License
endpointname:
jobname:
[1] https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateAutoMLJob.html
Continuation of the issue #13
An integration test has been performed using AWS emulator Localstack. However It is necessary to perform CI in real AWS.
This project seems to depend on a exaerror version which doesn't support Lua 5.4. However, newer Exasol version use Lua 5.4, such that we should test with that.
in Developer Guide
the other updates:
Autopilot consist of thee main steps: Analyzing Data, Feature Engineering, Model Tuning. In addition to them it includes five different job status : Completed, InProgress, Failed, Stopped, Stopping.
We need to observe these steps and statuses of training models. For this, the following steps can be implemented as a UDF script:
prepare a developer guide for SME
Since the release version is not updated, the release 0.3.0 has assets with older version number 0.2.2
The command
python3 -m exasol_sagemaker_extension.deployment.deploy_cli --host=w.x.y.y --port=8563 --user=xxx --pass=yyy --schema=RETAIL
returns an error, that it cannot connect via Non-TLS connections. V8 only allows TLS connections:
pyexasol.exceptions.ExaRequestError:
(
message => Connection exception - Only TLS connections are allowed.
dsn => www.xxx.yyy.zzz:8563
user => xxxxxxxxxxx
schema =>
session_id =>
code => 08004
)
Needs to be fixed for V8
Add option which saves polled statuses into a log table for a given interval
Currently the aws tests fail with
botocore.exceptions.ClientError: An error occurred (ValidationException) when calling the CreateAutoMLJob operation: Could not assume role ***. Please ensure that the role exists and allows principal 'sagemaker.amazonaws.com' to assume the role.
add doc folder and prepare a structure for it
aws iam create-role --role-name sagemaker-role --assume-role-policy-document '{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"Service": "sagemaker.amazonaws.com"
},
"Action": "sts:AssumeRole"
}
]
}'
aws iam create-policy --policy-name "sagemaker-s3-access" --policy-document '{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"s3:*"
],
"Resource": "*"
},
{
"Effect": "Allow",
"Action": [
"iam:CreatePolicy",
"iam:CreateRole",
"iam:AttachRolePolicy",
"iam:DeleteRole",
"iam:DeletePolicy",
"iam:DetachRolePolicy"
],
"Resource": "*"
}
]
}'
aws iam attach-role-policy --role-name sagemaker-role --policy-arn arn:aws:iam::166283903643:policy/sagemaker-s3-access
aws iam attach-role-policy --role-name sagemaker-role --policy-arn arn:aws:iam::aws:policy/AmazonSageMakerFullAccess
We got at some point the following error message
[Code: 0, SQL State: 43000] "attempt to index a nil value (field 'integer index')" caught in script "IDA"."SME_DEPLOY_SAGEMAKER_AUTOPILOT_ENDPOINT" at line 402 (Session: 1775016774761775104)
This error is caused by something which is nil, but shouldn't be nil, we should check this before we're accessing and throw proper error messages.
It is likely, that the following line caused the error
Implement Create/Delete endpoint udf scripts
Add following tools for CI
Check poethepoet to add these in the pyproject.toml
def udf_wrapper():
from exasol_udf_mock_python.udf_context import UDFContext
from exasol_sagemaker_extension.autopilot_training_udf import AutopilotTrainingUDF
def mocked_training_method(**kwargs):
return "test_job_name"
udf = AutopilotTrainingUDF(exa, training_method=mocked_training_method)
def run(ctx: UDFContext):
udf.run(ctx)
the CREATE STATEMENT would look like
CREATE PYTHON3 SET SCRIPT AutopilotTrainingUDF(model_name VARCHAR(23), ....)
EMITS (model_name VARCHAR(32)) AS
from exasol_sagemaker_extension.autopilot_training_udf import AutopilotTrainingUDF
udf = AutopilotTrainingUDF(exa)
def run(ctx):
udf.run(ctx)
/
Preparing the CLI interface that deploys the scripts required for SME installation with Click for
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.