This repository has been archived by the owner on Aug 25, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
/
bedrock_train.hcl
87 lines (79 loc) · 1.64 KB
/
bedrock_train.hcl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
version = "1.0"
train {
step "features_trainer" {
image = "quay.io/basisai/workload-standard:v0.3.4"
install = [
"pip3 install --upgrade pip",
"pip3 install -r requirements-train.txt",
]
script = [{ sh = ["python3 task_features_trainer.py"] }]
resources {
cpu = "2"
memory = "12G"
}
retry {
limit = 1
}
}
step "train" {
image = "quay.io/basisai/workload-standard:v0.3.4"
install = [
"pip3 install --upgrade pip",
"pip3 install -r requirements-train.txt",
]
script = [{ sh = ["python3 task_train.py"] }]
resources {
cpu = "2"
memory = "14G"
}
retry {
limit = 1
}
depends_on = ["features_trainer"]
}
parameters {
EXECUTION_DATE = "2019-07-01"
MODEL_VER = "lightgbm"
NUM_LEAVES = "34"
MAX_DEPTH = "8"
ENV_TYPE = "aws"
}
}
serve {
image = "python:3.7"
install = [
"pip3 install --upgrade pip",
"pip3 install -r requirements-serve.txt",
]
script = [
{
sh = [
"gunicorn --bind=:${BEDROCK_SERVER_PORT:-8080} --worker-class=gthread --workers=${WORKERS} --timeout=300 --preload serve_http:app"
]
}
]
parameters {
WORKERS = "1"
}
}
batch_score {
step "compute_shap" {
image = "quay.io/basisai/workload-standard:v0.3.4"
install = [
"pip3 install --upgrade pip",
"pip3 install -r requirements-train.txt",
"pip3 install shap==0.38.1",
]
script = [{ sh = ["python3 task_shap.py"] }]
resources {
cpu = "2"
memory = "14G"
}
retry {
limit = 1
}
}
parameters {
EXECUTION_DATE = ""
}
}