@platforma-sdk/workflow-tengo 6.13.0 → 6.14.0
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.
- package/dist/tengo/lib/pt.lib.tengo +33 -7
- package/dist/tengo/lib/pt.sizing.lib.tengo +60 -18
- package/dist/tengo/tpl/annotations.compute.plj.gz +0 -0
- package/dist/tengo/tpl/anonymize.deanonymize.plj.gz +0 -0
- package/dist/tengo/tpl/anonymize.impl.plj.gz +0 -0
- package/dist/tengo/tpl/check_network.create_workdir_from_storage.plj.gz +0 -0
- package/dist/tengo/tpl/check_network.download_blob.plj.gz +0 -0
- package/dist/tengo/tpl/check_network.run_hello_world.plj.gz +0 -0
- package/dist/tengo/tpl/check_network.run_hello_world_py.plj.gz +0 -0
- package/dist/tengo/tpl/check_network.upload_blob.plj.gz +0 -0
- package/dist/tengo/tpl/check_network.upload_template.plj.gz +0 -0
- package/dist/tengo/tpl/check_network.workdir_type_name_extractor.plj.gz +0 -0
- package/dist/tengo/tpl/exec.conda.create-env.plj.gz +0 -0
- package/dist/tengo/tpl/exec.delayed-compute-allocation.impl.plj.gz +0 -0
- package/dist/tengo/tpl/exec.exec-impl.plj.gz +0 -0
- package/dist/tengo/tpl/exec.exec.plj.gz +0 -0
- package/dist/tengo/tpl/exec.load-software.impl.plj.gz +0 -0
- package/dist/tengo/tpl/exec.monetization_info.plj.gz +0 -0
- package/dist/tengo/tpl/exec.monetization_to_json.plj.gz +0 -0
- package/dist/tengo/tpl/exec.python.create-venv.plj.gz +0 -0
- package/dist/tengo/tpl/exec.python.install-deps.plj.gz +0 -0
- package/dist/tengo/tpl/exec.python.venv-bin-path.plj.gz +0 -0
- package/dist/tengo/tpl/ll.get-field.plj.gz +0 -0
- package/dist/tengo/tpl/pframes.build-table.plj.gz +0 -0
- package/dist/tengo/tpl/pframes.export-multiple-pcolumns.plj.gz +0 -0
- package/dist/tengo/tpl/pframes.export-parquet-pcolumn-chunk.plj.gz +0 -0
- package/dist/tengo/tpl/pframes.export-pframe-for-ui.plj.gz +0 -0
- package/dist/tengo/tpl/pframes.export-pframe.plj.gz +0 -0
- package/dist/tengo/tpl/pframes.export-single-pcolumn.plj.gz +0 -0
- package/dist/tengo/tpl/pframes.import-dir.plj.gz +0 -0
- package/dist/tengo/tpl/pframes.merge-resource-maps.plj.gz +0 -0
- package/dist/tengo/tpl/pframes.parse-to-json.plj.gz +0 -0
- package/dist/tengo/tpl/pframes.process-pcolumn-batch-split.plj.gz +0 -0
- package/dist/tengo/tpl/pframes.process-pcolumn-batch.plj.gz +0 -0
- package/dist/tengo/tpl/pframes.process-pcolumn-data.plj.gz +0 -0
- package/dist/tengo/tpl/pframes.remove-nulls.plj.gz +0 -0
- package/dist/tengo/tpl/pframes.slice-data.plj.gz +0 -0
- package/dist/tengo/tpl/pframes.xsv-export-pframe.plj.gz +0 -0
- package/dist/tengo/tpl/pframes.xsv-import-if-not-null.plj.gz +0 -0
- package/dist/tengo/tpl/pframes.xsv-import-map.plj.gz +0 -0
- package/dist/tengo/tpl/pt.import-dir.plj.gz +0 -0
- package/dist/tengo/tpl/pt.workflow-run.plj.gz +0 -0
- package/dist/tengo/tpl/waiter.waiter.plj.gz +0 -0
- package/dist/tengo/tpl/workdir.save.plj.gz +0 -0
- package/dist/tengo/tpl/workflow.build-ctx.plj.gz +0 -0
- package/dist/tengo/tpl/workflow.query-anchored.plj.gz +0 -0
- package/dist/tengo/tpl/workflow.query-context-filter.plj.gz +0 -0
- package/package.json +3 -3
|
@@ -412,6 +412,8 @@ workflow := func() {
|
|
|
412
412
|
cpu := undefined
|
|
413
413
|
mem := undefined
|
|
414
414
|
memFloor := undefined
|
|
415
|
+
memSlope := undefined
|
|
416
|
+
memIntercept := undefined
|
|
415
417
|
polarsMaxThreads := undefined
|
|
416
418
|
scratchFreeSpace := undefined
|
|
417
419
|
inputCache := undefined
|
|
@@ -909,6 +911,11 @@ workflow := func() {
|
|
|
909
911
|
|
|
910
912
|
|
|
911
913
|
|
|
914
|
+
|
|
915
|
+
|
|
916
|
+
|
|
917
|
+
|
|
918
|
+
|
|
912
919
|
mem: func(amount) {
|
|
913
920
|
mem = amount
|
|
914
921
|
return self
|
|
@@ -927,6 +934,12 @@ workflow := func() {
|
|
|
927
934
|
|
|
928
935
|
|
|
929
936
|
|
|
937
|
+
memFloor: func(amount) {
|
|
938
|
+
sizing.assertRamFloor(amount)
|
|
939
|
+
memFloor = amount
|
|
940
|
+
return self
|
|
941
|
+
},
|
|
942
|
+
|
|
930
943
|
|
|
931
944
|
|
|
932
945
|
|
|
@@ -934,13 +947,24 @@ workflow := func() {
|
|
|
934
947
|
|
|
935
948
|
|
|
936
949
|
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
950
|
+
|
|
951
|
+
|
|
952
|
+
memSlope: func(slope) {
|
|
953
|
+
sizing.assertRamSlope(slope)
|
|
954
|
+
memSlope = slope
|
|
955
|
+
return self
|
|
956
|
+
},
|
|
957
|
+
|
|
958
|
+
|
|
959
|
+
|
|
960
|
+
|
|
961
|
+
|
|
962
|
+
|
|
963
|
+
|
|
964
|
+
|
|
965
|
+
memIntercept: func(amount) {
|
|
966
|
+
sizing.assertRamIntercept(amount)
|
|
967
|
+
memIntercept = amount
|
|
944
968
|
return self
|
|
945
969
|
},
|
|
946
970
|
|
|
@@ -1072,6 +1096,8 @@ workflow := func() {
|
|
|
1072
1096
|
cpu: cpu,
|
|
1073
1097
|
mem: mem,
|
|
1074
1098
|
memFloor: memFloor,
|
|
1099
|
+
memSlope: memSlope,
|
|
1100
|
+
memIntercept: memIntercept,
|
|
1075
1101
|
polarsMaxThreads: polarsMaxThreads,
|
|
1076
1102
|
scratchFreeSpace: scratchFreeSpace,
|
|
1077
1103
|
inputCache: inputCache
|
|
@@ -42,6 +42,13 @@
|
|
|
42
42
|
|
|
43
43
|
|
|
44
44
|
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
|
|
45
52
|
|
|
46
53
|
|
|
47
54
|
|
|
@@ -54,11 +61,11 @@ f := import("@platforma-sdk/workflow-tengo:exec.formula")
|
|
|
54
61
|
ll := import("@platforma-sdk/workflow-tengo:ll")
|
|
55
62
|
units := import("@platforma-sdk/workflow-tengo:units")
|
|
56
63
|
|
|
57
|
-
RAM_INTERCEPT_GIB :=
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
64
|
+
RAM_INTERCEPT_GIB := 4
|
|
65
|
+
RAM_INTERCEPT_MIN_GIB := 4
|
|
66
|
+
RAM_SLOPE := 10
|
|
67
|
+
RAM_SLOPE_MIN := 0
|
|
68
|
+
RAM_FLOOR_GIB := 4
|
|
62
69
|
|
|
63
70
|
SCRATCH_PER_READ_FRAME := 16
|
|
64
71
|
SCRATCH_SORT := 16
|
|
@@ -110,25 +117,56 @@ polarsMaxThreadsExpr := func(threads) {
|
|
|
110
117
|
|
|
111
118
|
|
|
112
119
|
|
|
120
|
+
assertRamSlope := func(slope) {
|
|
121
|
+
ll.assert(is_int(slope) && slope >= RAM_SLOPE_MIN,
|
|
122
|
+
"pt.sizing: memory slope must be an integer of at least %d, got %v", RAM_SLOPE_MIN, slope)
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
assertRamIntercept := func(intercept) {
|
|
131
|
+
ll.assert(is_int(intercept) && intercept >= RAM_INTERCEPT_MIN_GIB * units.GiB,
|
|
132
|
+
"pt.sizing: memory intercept must be an integer number of bytes of at least %d GiB, got %v", RAM_INTERCEPT_MIN_GIB, intercept)
|
|
133
|
+
}
|
|
113
134
|
|
|
114
135
|
|
|
115
|
-
ramFormula := func(memFloor) {
|
|
116
|
-
floor := f.gib(RAM_FLOOR_GIB)
|
|
117
|
-
cap := f.gib(RAM_CAP_GIB)
|
|
118
|
-
fallback := RAM_STATIC_FALLBACK
|
|
119
136
|
|
|
120
|
-
if !is_undefined(memFloor) {
|
|
121
137
|
|
|
122
138
|
|
|
123
139
|
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
floor
|
|
127
|
-
|
|
128
|
-
|
|
140
|
+
assertRamFloor := func(floor) {
|
|
141
|
+
ll.assert(is_int(floor) && floor > 0,
|
|
142
|
+
"pt.sizing: memory floor must be a positive integer number of bytes, got %v", floor)
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
ramFormula := func(opts) {
|
|
155
|
+
ll.assert(is_map(opts), "pt.sizing.ramFormula: expected an options map, got %v", opts)
|
|
156
|
+
|
|
157
|
+
floor := is_undefined(opts.floor) ? RAM_FLOOR_GIB * units.GiB : opts.floor
|
|
158
|
+
slope := is_undefined(opts.slope) ? RAM_SLOPE : opts.slope
|
|
159
|
+
intercept := is_undefined(opts.intercept) ? RAM_INTERCEPT_GIB * units.GiB : opts.intercept
|
|
160
|
+
assertRamFloor(floor)
|
|
161
|
+
assertRamSlope(slope)
|
|
162
|
+
assertRamIntercept(intercept)
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
fallback := intercept > floor ? intercept : floor
|
|
129
167
|
|
|
130
|
-
return f.size({ default: 0 }).times(
|
|
131
|
-
|
|
168
|
+
return f.size({ default: 0 }).times(slope).plus(f.const(intercept)).
|
|
169
|
+
atLeast(f.const(floor)).
|
|
132
170
|
staticFallback(fallback)
|
|
133
171
|
}
|
|
134
172
|
|
|
@@ -164,6 +202,9 @@ scratchFormula := func(readFrames, writeFrames) {
|
|
|
164
202
|
|
|
165
203
|
export {
|
|
166
204
|
ramFormula: ramFormula,
|
|
205
|
+
assertRamSlope: assertRamSlope,
|
|
206
|
+
assertRamIntercept: assertRamIntercept,
|
|
207
|
+
assertRamFloor: assertRamFloor,
|
|
167
208
|
cpuFormula: cpuFormula,
|
|
168
209
|
scratchFormula: scratchFormula,
|
|
169
210
|
polarsMaxThreadsExpr: polarsMaxThreadsExpr,
|
|
@@ -175,9 +216,10 @@ export {
|
|
|
175
216
|
|
|
176
217
|
|
|
177
218
|
RAM_INTERCEPT_GIB: RAM_INTERCEPT_GIB,
|
|
219
|
+
RAM_INTERCEPT_MIN_GIB: RAM_INTERCEPT_MIN_GIB,
|
|
178
220
|
RAM_SLOPE: RAM_SLOPE,
|
|
221
|
+
RAM_SLOPE_MIN: RAM_SLOPE_MIN,
|
|
179
222
|
RAM_FLOOR_GIB: RAM_FLOOR_GIB,
|
|
180
|
-
RAM_CAP_GIB: RAM_CAP_GIB,
|
|
181
223
|
CPU_MIN: CPU_MIN,
|
|
182
224
|
CPU_MAX: CPU_MAX,
|
|
183
225
|
SCRATCH_PER_READ_FRAME: SCRATCH_PER_READ_FRAME,
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@platforma-sdk/workflow-tengo",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.14.0",
|
|
4
4
|
"description": "Tengo SDK library",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -19,8 +19,8 @@
|
|
|
19
19
|
"@milaboratories/pframes-rs-wasip2": "1.1.61",
|
|
20
20
|
"@milaboratories/software-pframes-conv": "2.2.9",
|
|
21
21
|
"@platforma-open/milaboratories.software-small-binaries": "^2.1.1",
|
|
22
|
-
"@platforma-open/milaboratories.software-
|
|
23
|
-
"@platforma-open/milaboratories.software-
|
|
22
|
+
"@platforma-open/milaboratories.software-ptabler": "2.1.14",
|
|
23
|
+
"@platforma-open/milaboratories.software-ptexter": "1.2.6"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
26
|
"@platforma-sdk/tengo-builder": "4.1.9"
|