@platforma-open/milaboratories.3d-structure-prediction.workflow 1.1.1 → 1.1.2

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.
@@ -1,6 +1,6 @@
1
1
   WARN  Issue while reading "/home/runner/work/3d-structure-prediction/3d-structure-prediction/.npmrc". Failed to replace env in config: ${NPMJS_TOKEN}
2
2
 
3
- > @platforma-open/milaboratories.3d-structure-prediction.workflow@1.1.1 build /home/runner/work/3d-structure-prediction/3d-structure-prediction/workflow
3
+ > @platforma-open/milaboratories.3d-structure-prediction.workflow@1.1.2 build /home/runner/work/3d-structure-prediction/3d-structure-prediction/workflow
4
4
  > shx rm -rf dist && pl-tengo check && pl-tengo build
5
5
 
6
6
  info: Skipping unknown file type: wf.test.ts
package/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # @platforma-open/milaboratories.3d-structure-prediction.workflow
2
2
 
3
+ ## 1.1.2
4
+
5
+ ### Patch Changes
6
+
7
+ - 8aeaff0: Load ImmuneBuilder model weights from a published Platforma asset (`immunebuilder-weights-assets`) instead of downloading them from Zenodo at runtime. The matching per-mode asset is mounted into each batch workdir and passed to ImmuneBuilder via `--weights-dir`. Removes the pre-warmup step, the per-batch warmup sentinel wiring, and the Docker image weight bake.
8
+ - Updated dependencies [8aeaff0]
9
+ - @platforma-open/milaboratories.3d-structure-prediction.software@1.0.7
10
+
3
11
  ## 1.1.1
4
12
 
5
13
  ### Patch Changes
Binary file
Binary file
Binary file
package/package.json CHANGED
@@ -1,13 +1,14 @@
1
1
  {
2
2
  "name": "@platforma-open/milaboratories.3d-structure-prediction.workflow",
3
- "version": "1.1.1",
3
+ "version": "1.1.2",
4
4
  "description": "Block Workflow",
5
5
  "type": "module",
6
6
  "dependencies": {
7
7
  "@platforma-sdk/workflow-tengo": "6.2.0",
8
- "@platforma-open/milaboratories.3d-structure-prediction.software": "1.0.6"
8
+ "@platforma-open/milaboratories.3d-structure-prediction.software": "1.0.7"
9
9
  },
10
10
  "devDependencies": {
11
+ "@platforma-open/milaboratories.immunebuilder-weights-assets": "^1.1.0",
11
12
  "@platforma-sdk/tengo-builder": "4.0.2",
12
13
  "@platforma-sdk/test": "1.77.19"
13
14
  },
@@ -5,14 +5,11 @@ xsv := import("@platforma-sdk/workflow-tengo:pframes.xsv")
5
5
  pSpec := import("@platforma-sdk/workflow-tengo:pframes.spec")
6
6
  pt := import("@platforma-sdk/workflow-tengo:pt")
7
7
  smart := import("@platforma-sdk/workflow-tengo:smart")
8
- exec := import("@platforma-sdk/workflow-tengo:exec")
9
- units := import("@platforma-sdk/workflow-tengo:units")
10
8
  times := import("times")
11
9
 
12
10
  structureColsConv := import(":structure-cols-conv")
13
11
 
14
12
  predictBatchTpl := assets.importTemplate(":predict-batch")
15
- immuneBuilderSw := assets.importSoftware("@platforma-open/milaboratories.3d-structure-prediction.software:immunebuilder-predict")
16
13
 
17
14
  wf.setPreRun(assets.importTemplate(":prerun"))
18
15
 
@@ -98,36 +95,17 @@ wf.body(func(args) {
98
95
 
99
96
  confidenceXsvColumns := structureColsConv.getConfidenceColumns(isPaired)
100
97
 
101
- // Pre-download model weights once, before the batch fan-out. ImmuneBuilder
102
- // fetches weights on first predictor construction into a shared on-disk
103
- // cache; without this step, N parallel batch containers race to write the
104
- // same files and produce partial/corrupt caches that fail with no retry.
105
- // The sentinel file is forwarded as a body input — each batch awaits it
106
- // (via addFile in predict-batch.tpl.tengo) before its own exec runs, so
107
- // every batch starts against an already-warm cache.
108
- warmupRun := exec.builder().
109
- software(immuneBuilderSw).
110
- cpu(1).mem(2 * units.GiB).
111
- env("BLOCK_VERSION", blockId).
112
- arg("--warmup").
113
- arg("--mode").arg(args.mode).
114
- arg("--sentinel").arg("warmup.done").
115
- saveFile("warmup.done").
116
- printErrStreamToStdout().
117
- saveStdoutStream().
118
- run()
119
- warmupSentinel := warmupRun.getFile("warmup.done")
120
-
121
- // Per-batch scalar settings forwarded to predict-batch as `inputs.<key>`.
122
98
  bodyExtra := {
123
99
  mode: smart.createJsonResource(args.mode),
124
100
  seed: smart.createJsonResource(seed),
125
- cpu: smart.createJsonResource(cpu),
126
- memGiB: smart.createJsonResource(memGiB),
127
101
  confidenceMetric: smart.createJsonResource(confidenceMetric),
128
102
  threshold: smart.createJsonResource(threshold),
129
- blockId: smart.createJsonResource(blockId),
130
- warmupSentinel: warmupSentinel
103
+ blockId: smart.createJsonResource(blockId)
104
+ }
105
+
106
+ bodyMeta := {
107
+ cpu: smart.createJsonResource(cpu),
108
+ memGiB: smart.createJsonResource(memGiB)
131
109
  }
132
110
 
133
111
  processResult := pframes.processColumn(
@@ -162,6 +140,7 @@ wf.body(func(args) {
162
140
  passContent: false
163
141
  },
164
142
  extra: bodyExtra,
143
+ metaExtra: bodyMeta,
165
144
  stepCache: 30 * times.minute
166
145
  }
167
146
  )
@@ -35,24 +35,34 @@ self.body(func(inputs) {
35
35
 
36
36
  mode := inputs.mode
37
37
  seed := inputs.seed
38
- cpu := inputs.cpu
39
- memGiB := inputs.memGiB
38
+ cpu := is_undefined(inputs.cpu) ? 4 : inputs.cpu
39
+ memGiB := is_undefined(inputs.memGiB) ? 4 : inputs.memGiB
40
40
  confidenceMetric := inputs.confidenceMetric
41
41
  threshold := inputs.threshold
42
42
  blockId := inputs.blockId
43
- // Sentinel produced by the workflow's pre-warmup step. We don't consume
44
- // the file content — adding it as a workdir input is what wires this batch
45
- // to await the warmup resource, so every batch only starts after the
46
- // shared model cache is populated.
47
- warmupSentinel := inputs.warmupSentinel
43
+
44
+ // Model weights ship as a published Platforma asset (one per predictor),
45
+ // mounted into `models/` in the workdir. ImmuneBuilder is pointed at it via
46
+ // `--weights-dir`, so it never downloads from Zenodo at runtime. `mode` is a
47
+ // plain build-time value here (processColumn `extra`), so we pick the
48
+ // matching asset directly.
49
+ weightsAsset := undefined
50
+ if mode == "ABodyBuilder2" {
51
+ weightsAsset = assets.importAsset("@platforma-open/milaboratories.immunebuilder-weights-assets:abodybuilder2")
52
+ } else if mode == "NanoBodyBuilder2" {
53
+ weightsAsset = assets.importAsset("@platforma-open/milaboratories.immunebuilder-weights-assets:nanobodybuilder2")
54
+ } else {
55
+ ll.panic("predict-batch: unknown mode %v", mode)
56
+ }
48
57
 
49
58
  predictRun := exec.builder().
50
59
  software(immuneBuilderSw).
51
60
  cpu(cpu).mem(memGiB * units.GiB).
52
61
  env("BLOCK_VERSION", blockId).
53
- addFile("warmup.done", warmupSentinel).
62
+ addAsset(weightsAsset, "models").
54
63
  addFile("batch.tsv", batchFile).
55
64
  arg("--mode").arg(mode).
65
+ arg("--weights-dir").arg("models").
56
66
  arg("--input").arg("batch.tsv").
57
67
  arg("--output-dir").arg("pdbs").
58
68
  arg("--manifest").arg("manifest.tsv").