easy_ml 0.2.0.pre.rc36 → 0.2.0.pre.rc38
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/frontend/types/datasource.ts +1 -2
- data/bin/ecs/build +11 -0
- data/bin/ecs/console +5 -0
- data/bin/ecs/deploy +16 -0
- data/bin/ecs/exec_command.sh +62 -0
- data/bin/ecs/ssh +5 -0
- data/lib/easy_ml/data/polars_column.rb +17 -14
- data/lib/easy_ml/version.rb +1 -1
- metadata +6 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cc708b35e777f41f67dbf4e769db3c326b01e1e65f29f293c9536d625a60a197
|
4
|
+
data.tar.gz: c2ba6d165128c9cbeae2cef19ddc40e823208cc75750aa31d1e167fe8c623cd8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '07835e0557a01b1db47cbbddcd9149813b0cbbd7083eb951613fa31b32234b5c60a348bca5e3a57446ad21fad017882bf9262a4a2f81c4a6962f6bbd1771de0f'
|
7
|
+
data.tar.gz: 427e065c5b4e83161c030738aa891ad855c6ca89e8b14d729e6602a0285682ac04712b62e5e226dc521bce05f292f783e0728a9c4a517e3aa8417a632b7b5e65
|
data/bin/ecs/build
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
#!/usr/bin/env bash
|
2
|
+
|
3
|
+
echo "Building web image"
|
4
|
+
docker compose build web
|
5
|
+
|
6
|
+
echo "Logging into AWS..."
|
7
|
+
aws ecr get-login-password --region AWS_REGION | docker login --username AWS --password-stdin AWS_ACCOUNT.dkr.ecr.AWS_REGION.amazonaws.com
|
8
|
+
|
9
|
+
echo "Tagging"
|
10
|
+
docker tag easy_ml:web easy_ml:worker
|
11
|
+
docker tag easy_ml:web easy_ml:zhong
|
data/bin/ecs/console
ADDED
data/bin/ecs/deploy
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
#!/usr/bin/env bash
|
2
|
+
|
3
|
+
bin/ecs/build
|
4
|
+
|
5
|
+
echo "Logging into AWS..."
|
6
|
+
aws ecr get-login-password --region AWS_REGION | docker login --username AWS --password-stdin AWS_ACCOUNT.dkr.ecr.AWS_REGION.amazonaws.com
|
7
|
+
|
8
|
+
echo "Tagging"
|
9
|
+
docker tag easy_ml:web "$AWS_URL":web
|
10
|
+
docker tag easy_ml:web "$AWS_URL":worker
|
11
|
+
docker tag easy_ml:web "$AWS_URL":zhong
|
12
|
+
|
13
|
+
echo "Pushing to remote..."
|
14
|
+
docker push "$AWS_URL":web
|
15
|
+
docker push "$AWS_URL":worker
|
16
|
+
docker push "$AWS_URL":zhong
|
@@ -0,0 +1,62 @@
|
|
1
|
+
#!/usr/bin/env bash
|
2
|
+
|
3
|
+
CLUSTER_NAME="CLUSTER_NAME"
|
4
|
+
SERVICE_NAME="SERVICE_NAME"
|
5
|
+
REGION="AWS_REGION"
|
6
|
+
|
7
|
+
# Validate input
|
8
|
+
if [ -z "$1" ]; then
|
9
|
+
echo "Usage: $0 <command>"
|
10
|
+
echo "Example: $0 /bin/bash"
|
11
|
+
exit 1
|
12
|
+
fi
|
13
|
+
|
14
|
+
# Command to run inside the container
|
15
|
+
COMMAND="$1"
|
16
|
+
|
17
|
+
# Step 1: Get the first task ARN
|
18
|
+
TASK_ARN=$(aws ecs list-tasks \
|
19
|
+
--cluster "$CLUSTER_NAME" \
|
20
|
+
--service-name "$SERVICE_NAME" \
|
21
|
+
--region "$REGION" \
|
22
|
+
--query "taskArns[0]" \
|
23
|
+
--output text)
|
24
|
+
|
25
|
+
if [ "$TASK_ARN" == "None" ]; then
|
26
|
+
echo "No running tasks found for service $SERVICE_NAME in cluster $CLUSTER_NAME."
|
27
|
+
exit 1
|
28
|
+
fi
|
29
|
+
|
30
|
+
# Step 2: Get container names in the task
|
31
|
+
CONTAINER_NAMES=$(aws ecs describe-tasks \
|
32
|
+
--cluster "$CLUSTER_NAME" \
|
33
|
+
--tasks "$TASK_ARN" \
|
34
|
+
--region "$REGION" \
|
35
|
+
--query "tasks[0].containers[].name" \
|
36
|
+
--output text)
|
37
|
+
|
38
|
+
# Check if containers exist
|
39
|
+
if [ -z "$CONTAINER_NAMES" ]; then
|
40
|
+
echo "No containers found in the task $TASK_ARN."
|
41
|
+
exit 1
|
42
|
+
fi
|
43
|
+
|
44
|
+
# Step 3: Display container options and prompt user to choose
|
45
|
+
echo "Containers available in the task:"
|
46
|
+
select CONTAINER_NAME in $CONTAINER_NAMES; do
|
47
|
+
if [ -n "$CONTAINER_NAME" ]; then
|
48
|
+
echo "You selected container: $CONTAINER_NAME"
|
49
|
+
break
|
50
|
+
else
|
51
|
+
echo "Invalid selection. Please choose a valid container."
|
52
|
+
fi
|
53
|
+
done
|
54
|
+
|
55
|
+
# Step 4: Attach to the selected container and run the custom command
|
56
|
+
echo "Attaching to container '$CONTAINER_NAME' in task '$TASK_ARN' and running command: $COMMAND..."
|
57
|
+
aws ecs execute-command \
|
58
|
+
--cluster "$CLUSTER_NAME" \
|
59
|
+
--task "$TASK_ARN" \
|
60
|
+
--container "$CONTAINER_NAME" \
|
61
|
+
--command "$COMMAND" \
|
62
|
+
--interactive
|
data/bin/ecs/ssh
ADDED
@@ -8,9 +8,10 @@ module EasyML
|
|
8
8
|
integer: Polars::Int64,
|
9
9
|
boolean: Polars::Boolean,
|
10
10
|
datetime: Polars::Datetime,
|
11
|
+
date: Polars::Date,
|
11
12
|
string: Polars::String,
|
12
13
|
text: Polars::String,
|
13
|
-
categorical: Polars::Categorical
|
14
|
+
categorical: Polars::Categorical,
|
14
15
|
}
|
15
16
|
POLARS_MAP = TYPE_MAP.invert.stringify_keys
|
16
17
|
class << self
|
@@ -37,19 +38,21 @@ module EasyML
|
|
37
38
|
end
|
38
39
|
|
39
40
|
type_name = case dtype
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
41
|
+
when Polars::Float64
|
42
|
+
:float
|
43
|
+
when Polars::Int64
|
44
|
+
:integer
|
45
|
+
when Polars::Datetime
|
46
|
+
:datetime
|
47
|
+
when Polars::Date
|
48
|
+
:date
|
49
|
+
when Polars::Boolean
|
50
|
+
:boolean
|
51
|
+
when Polars::Utf8
|
52
|
+
determine_string_type(series)
|
53
|
+
else
|
54
|
+
:categorical
|
55
|
+
end
|
53
56
|
|
54
57
|
polars_type ? sym_to_polars(type_name) : type_name
|
55
58
|
end
|
data/lib/easy_ml/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: easy_ml
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.0.pre.
|
4
|
+
version: 0.2.0.pre.rc38
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brett Shollenberger
|
@@ -601,6 +601,11 @@ files:
|
|
601
601
|
- bin/build
|
602
602
|
- bin/build_vite
|
603
603
|
- bin/console
|
604
|
+
- bin/ecs/build
|
605
|
+
- bin/ecs/console
|
606
|
+
- bin/ecs/deploy
|
607
|
+
- bin/ecs/exec_command.sh
|
608
|
+
- bin/ecs/ssh
|
604
609
|
- bin/rspec
|
605
610
|
- bin/setup
|
606
611
|
- bin/vite
|