@platforma-sdk/workflow-tengo 6.17.2 → 6.17.3

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.
Files changed (49) hide show
  1. package/dist/tengo/lib/feats.lib.tengo +3 -0
  2. package/dist/tengo/lib/pt.lib.tengo +20 -1
  3. package/dist/tengo/lib/pt.sizing.lib.tengo +27 -0
  4. package/dist/tengo/tpl/annotations.compute.plj.gz +0 -0
  5. package/dist/tengo/tpl/anonymize.deanonymize.plj.gz +0 -0
  6. package/dist/tengo/tpl/anonymize.impl.plj.gz +0 -0
  7. package/dist/tengo/tpl/check_network.create_workdir_from_storage.plj.gz +0 -0
  8. package/dist/tengo/tpl/check_network.download_blob.plj.gz +0 -0
  9. package/dist/tengo/tpl/check_network.run_hello_world.plj.gz +0 -0
  10. package/dist/tengo/tpl/check_network.run_hello_world_py.plj.gz +0 -0
  11. package/dist/tengo/tpl/check_network.upload_blob.plj.gz +0 -0
  12. package/dist/tengo/tpl/check_network.upload_template.plj.gz +0 -0
  13. package/dist/tengo/tpl/check_network.workdir_type_name_extractor.plj.gz +0 -0
  14. package/dist/tengo/tpl/exec.conda.create-env.plj.gz +0 -0
  15. package/dist/tengo/tpl/exec.delayed-compute-allocation.impl.plj.gz +0 -0
  16. package/dist/tengo/tpl/exec.exec-impl.plj.gz +0 -0
  17. package/dist/tengo/tpl/exec.exec.plj.gz +0 -0
  18. package/dist/tengo/tpl/exec.load-software.impl.plj.gz +0 -0
  19. package/dist/tengo/tpl/exec.monetization_info.plj.gz +0 -0
  20. package/dist/tengo/tpl/exec.monetization_to_json.plj.gz +0 -0
  21. package/dist/tengo/tpl/exec.python.create-venv.plj.gz +0 -0
  22. package/dist/tengo/tpl/exec.python.install-deps.plj.gz +0 -0
  23. package/dist/tengo/tpl/exec.python.venv-bin-path.plj.gz +0 -0
  24. package/dist/tengo/tpl/ll.get-field.plj.gz +0 -0
  25. package/dist/tengo/tpl/pframes.build-table.plj.gz +0 -0
  26. package/dist/tengo/tpl/pframes.export-multiple-pcolumns.plj.gz +0 -0
  27. package/dist/tengo/tpl/pframes.export-parquet-pcolumn-chunk.plj.gz +0 -0
  28. package/dist/tengo/tpl/pframes.export-pframe-for-ui.plj.gz +0 -0
  29. package/dist/tengo/tpl/pframes.export-pframe.plj.gz +0 -0
  30. package/dist/tengo/tpl/pframes.export-single-pcolumn.plj.gz +0 -0
  31. package/dist/tengo/tpl/pframes.import-dir.plj.gz +0 -0
  32. package/dist/tengo/tpl/pframes.merge-resource-maps.plj.gz +0 -0
  33. package/dist/tengo/tpl/pframes.parse-to-json.plj.gz +0 -0
  34. package/dist/tengo/tpl/pframes.process-pcolumn-batch-split.plj.gz +0 -0
  35. package/dist/tengo/tpl/pframes.process-pcolumn-batch.plj.gz +0 -0
  36. package/dist/tengo/tpl/pframes.process-pcolumn-data.plj.gz +0 -0
  37. package/dist/tengo/tpl/pframes.remove-nulls.plj.gz +0 -0
  38. package/dist/tengo/tpl/pframes.slice-data.plj.gz +0 -0
  39. package/dist/tengo/tpl/pframes.xsv-export-pframe.plj.gz +0 -0
  40. package/dist/tengo/tpl/pframes.xsv-import-if-not-null.plj.gz +0 -0
  41. package/dist/tengo/tpl/pframes.xsv-import-map.plj.gz +0 -0
  42. package/dist/tengo/tpl/pt.import-dir.plj.gz +0 -0
  43. package/dist/tengo/tpl/pt.workflow-run.plj.gz +0 -0
  44. package/dist/tengo/tpl/waiter.waiter.plj.gz +0 -0
  45. package/dist/tengo/tpl/workdir.save.plj.gz +0 -0
  46. package/dist/tengo/tpl/workflow.build-ctx.plj.gz +0 -0
  47. package/dist/tengo/tpl/workflow.query-anchored.plj.gz +0 -0
  48. package/dist/tengo/tpl/workflow.query-context-filter.plj.gz +0 -0
  49. package/package.json +2 -2
@@ -65,6 +65,9 @@ export ll.toStrict({
65
65
  hasBlobSize: ll.methodExists(plapi, "getBlobSize"),
66
66
 
67
67
 
68
+ hasGzip: ll.methodExists(plapi, "gzipEncode"),
69
+
70
+
68
71
  isDockerAvailable: _isEnabled("dockerSupport"),
69
72
 
70
73
 
@@ -17,6 +17,8 @@ pframesSpec := import("@platforma-sdk/workflow-tengo:pframes.spec")
17
17
  render := import("@platforma-sdk/workflow-tengo:render")
18
18
  maps := import("@platforma-sdk/workflow-tengo:maps")
19
19
  canonical := import("@platforma-sdk/workflow-tengo:canonical")
20
+ constants := import("@platforma-sdk/workflow-tengo:constants")
21
+ feats := import("@platforma-sdk/workflow-tengo:feats")
20
22
  validation := import("@platforma-sdk/workflow-tengo:validation")
21
23
 
22
24
 
@@ -1210,7 +1212,6 @@ workflow := func() {
1210
1212
  })
1211
1213
 
1212
1214
  runInputs := {
1213
- workflowJsonStruct: workflowJsonStruct,
1214
1215
  inFiles: inFilesMap,
1215
1216
  inFilesContent: inFilesContentMap,
1216
1217
  inFrames: inFramesDistilled,
@@ -1218,6 +1219,22 @@ workflow := func() {
1218
1219
  outFilesContent: outContentFiles,
1219
1220
  outFrames: outFrames
1220
1221
  }
1222
+
1223
+
1224
+
1225
+
1226
+ if feats.hasGzip {
1227
+ runInputs.workflowJsonGz = smart.createValueResource(
1228
+ constants.RTYPE_BINARY_VALUE,
1229
+ ll.gzipEncode(canonical.encode(workflowJsonStruct)))
1230
+ } else {
1231
+ runInputs.workflowJsonStruct = workflowJsonStruct
1232
+ }
1233
+
1234
+
1235
+
1236
+ frameSteps := sizing.countFrameSteps(workflowJsonStruct.workflow)
1237
+
1221
1238
  runMetaInputs := {
1222
1239
  queue: queue,
1223
1240
  cpu: cpu,
@@ -1231,6 +1248,8 @@ workflow := func() {
1231
1248
  memIntercept: memIntercept,
1232
1249
  polarsMaxThreads: polarsMaxThreads,
1233
1250
  scratchFreeSpace: scratchFreeSpace,
1251
+ readFrames: frameSteps.readFrames,
1252
+ writeFrames: frameSteps.writeFrames,
1234
1253
  inputCache: inputCache
1235
1254
  }
1236
1255
  ptResult := render.create(workflowRunTpl, runInputs, {
@@ -281,6 +281,32 @@ scratchFormula := func(readFrames, writeFrames) {
281
281
  return f.when(estimate.lt(f.gib(SCRATCH_DEVICE_MIN_GIB)), 0).otherwise(estimate)
282
282
  }
283
283
 
284
+
285
+
286
+
287
+
288
+
289
+
290
+
291
+
292
+
293
+ countFrameSteps := func(steps) {
294
+ ll.assert(is_array(steps), "pt.sizing: steps must be an array, got %v", steps)
295
+ readFrames := 0
296
+ writeFrames := 0
297
+ for step in steps {
298
+ if step.type == "read_frame" {
299
+ readFrames += 1
300
+ } else if step.type == "write_frame" {
301
+ writeFrames += 1
302
+ } else if step.type == "import_parquet_frame" {
303
+ readFrames += 1
304
+ writeFrames += 1
305
+ }
306
+ }
307
+ return { readFrames: readFrames, writeFrames: writeFrames }
308
+ }
309
+
284
310
  export {
285
311
  ramFormula: ramFormula,
286
312
  assertRamSlope: assertRamSlope,
@@ -290,6 +316,7 @@ export {
290
316
  assertCpuCores: assertCpuCores,
291
317
  assertCpuSlope: assertCpuSlope,
292
318
  scratchFormula: scratchFormula,
319
+ countFrameSteps: countFrameSteps,
293
320
  polarsMaxThreadsExpr: polarsMaxThreadsExpr,
294
321
  assertPolarsMaxThreads: assertPolarsMaxThreads,
295
322
 
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.17.2",
3
+ "version": "6.17.3",
4
4
  "description": "Tengo SDK library",
5
5
  "type": "module",
6
6
  "types": "./dist/index.d.ts",
@@ -19,7 +19,7 @@
19
19
  "@milaboratories/pframes-rs-wasip2": "1.2.0",
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-ptabler": "2.2.1",
22
+ "@platforma-open/milaboratories.software-ptabler": "2.3.0",
23
23
  "@platforma-open/milaboratories.software-ptexter": "1.2.6"
24
24
  },
25
25
  "devDependencies": {