@aws/ml-container-creator 0.9.1 → 0.10.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 (90) hide show
  1. package/LICENSE-THIRD-PARTY +9304 -0
  2. package/bin/cli.js +2 -0
  3. package/config/bootstrap-e2e-stack.json +341 -0
  4. package/config/bootstrap-stack.json +40 -3
  5. package/config/parameter-schema-v2.json +2049 -0
  6. package/config/tune-catalog.json +1781 -0
  7. package/infra/ci-harness/buildspec.yml +1 -0
  8. package/infra/ci-harness/lambda/path-prover/brain.ts +306 -0
  9. package/infra/ci-harness/lambda/path-prover/write-results.ts +152 -0
  10. package/infra/ci-harness/lib/ci-harness-stack.ts +837 -7
  11. package/infra/ci-harness/state-machines/path-prover.asl.json +496 -0
  12. package/package.json +53 -68
  13. package/servers/base-image-picker/index.js +121 -121
  14. package/servers/e2e-status/index.js +297 -0
  15. package/servers/e2e-status/manifest.json +14 -0
  16. package/servers/e2e-status/package.json +15 -0
  17. package/servers/endpoint-picker/LICENSE +202 -0
  18. package/servers/endpoint-picker/index.js +536 -0
  19. package/servers/endpoint-picker/manifest.json +14 -0
  20. package/servers/endpoint-picker/package.json +18 -0
  21. package/servers/hyperpod-cluster-picker/index.js +125 -125
  22. package/servers/instance-sizer/index.js +138 -138
  23. package/servers/instance-sizer/lib/instance-ranker.js +76 -76
  24. package/servers/instance-sizer/lib/model-resolver.js +61 -61
  25. package/servers/instance-sizer/lib/quota-resolver.js +113 -113
  26. package/servers/instance-sizer/lib/vram-estimator.js +31 -31
  27. package/servers/lib/bedrock-client.js +38 -38
  28. package/servers/lib/catalogs/jumpstart-public.json +101 -16
  29. package/servers/lib/catalogs/model-servers.json +201 -3
  30. package/servers/lib/catalogs/models.json +182 -26
  31. package/servers/lib/custom-validators.js +13 -13
  32. package/servers/lib/dynamic-resolver.js +4 -4
  33. package/servers/marketplace-picker/index.js +342 -0
  34. package/servers/marketplace-picker/manifest.json +14 -0
  35. package/servers/marketplace-picker/package.json +18 -0
  36. package/servers/model-picker/index.js +382 -382
  37. package/servers/region-picker/index.js +56 -56
  38. package/servers/workload-picker/LICENSE +202 -0
  39. package/servers/workload-picker/catalogs/workload-profiles.json +67 -0
  40. package/servers/workload-picker/index.js +171 -0
  41. package/servers/workload-picker/manifest.json +16 -0
  42. package/servers/workload-picker/package.json +16 -0
  43. package/src/app.js +4 -390
  44. package/src/lib/bootstrap-command-handler.js +710 -1148
  45. package/src/lib/bootstrap-config.js +36 -0
  46. package/src/lib/bootstrap-profile-manager.js +641 -0
  47. package/src/lib/bootstrap-provisioners.js +421 -0
  48. package/src/lib/ci-register-helpers.js +74 -0
  49. package/src/lib/config-loader.js +408 -0
  50. package/src/lib/config-manager.js +66 -1685
  51. package/src/lib/config-mcp-client.js +118 -0
  52. package/src/lib/config-validator.js +634 -0
  53. package/src/lib/cuda-resolver.js +149 -0
  54. package/src/lib/e2e-catalog-validator.js +251 -3
  55. package/src/lib/e2e-ci-recorder.js +103 -0
  56. package/src/lib/generated/cli-options.js +315 -311
  57. package/src/lib/generated/parameter-matrix.js +671 -0
  58. package/src/lib/generated/validation-rules.js +71 -71
  59. package/src/lib/marketplace-flow.js +276 -0
  60. package/src/lib/mcp-query-runner.js +768 -0
  61. package/src/lib/parameter-schema-validator.js +62 -18
  62. package/src/lib/path-prover-brain.js +607 -0
  63. package/src/lib/prompt-runner.js +41 -1504
  64. package/src/lib/prompts/feature-prompts.js +172 -0
  65. package/src/lib/prompts/index.js +48 -0
  66. package/src/lib/prompts/infrastructure-prompts.js +690 -0
  67. package/src/lib/prompts/model-prompts.js +552 -0
  68. package/src/lib/prompts/project-prompts.js +82 -0
  69. package/src/lib/prompts.js +2 -1446
  70. package/src/lib/registry-command-handler.js +135 -3
  71. package/src/lib/secrets-prompt-runner.js +251 -0
  72. package/src/lib/template-variable-resolver.js +422 -0
  73. package/src/lib/tune-catalog-validator.js +37 -4
  74. package/templates/Dockerfile +9 -0
  75. package/templates/code/adapter_sidecar.py +444 -0
  76. package/templates/code/serve +6 -0
  77. package/templates/code/serve.d/vllm.ejs +1 -1
  78. package/templates/do/.benchmark_writer.py +1476 -0
  79. package/templates/do/.tune_helper.py +982 -57
  80. package/templates/do/__pycache__/.benchmark_writer.cpython-312.pyc +0 -0
  81. package/templates/do/adapter +149 -0
  82. package/templates/do/benchmark +639 -85
  83. package/templates/do/config +108 -5
  84. package/templates/do/deploy.d/managed-inference.ejs +192 -11
  85. package/templates/do/optimize +106 -37
  86. package/templates/do/register +89 -0
  87. package/templates/do/test +13 -0
  88. package/templates/do/tune +378 -59
  89. package/templates/do/validate +44 -4
  90. package/config/parameter-schema.json +0 -88
@@ -29,6 +29,8 @@
29
29
  * Optional CI fields (added by bootstrap --ci):
30
30
  * - ciInfraProvisioned (boolean): Whether CI harness infrastructure has been deployed. Defaults to false.
31
31
  * - ciTableName (string): Name of the DynamoDB CI table. Defaults to "mlcc-ci-table".
32
+ * - ciGlueDatabase (string|null): Name of the Glue database for benchmark results. Defaults to null (benchmark infra not provisioned).
33
+ * - ciBenchmarkResultsBucket (string|null): Name of the S3 bucket for benchmark Parquet files. Defaults to null (benchmark infra not provisioned).
32
34
  */
33
35
 
34
36
  import { readFileSync, writeFileSync, mkdirSync, existsSync } from 'node:fs';
@@ -134,6 +136,8 @@ export default class BootstrapConfig {
134
136
  return {
135
137
  ciInfraProvisioned: false,
136
138
  ciTableName: 'mlcc-ci-table',
139
+ ciGlueDatabase: null,
140
+ ciBenchmarkResultsBucket: null,
137
141
  ...profile
138
142
  };
139
143
  }
@@ -156,11 +160,43 @@ export default class BootstrapConfig {
156
160
  config: {
157
161
  ciInfraProvisioned: false,
158
162
  ciTableName: 'mlcc-ci-table',
163
+ ciGlueDatabase: null,
164
+ ciBenchmarkResultsBucket: null,
159
165
  ...active.config
160
166
  }
161
167
  };
162
168
  }
163
169
 
170
+ /**
171
+ * Find the profile that has CI infrastructure provisioned.
172
+ * Scans all profiles and returns the first one with ciInfraProvisioned: true.
173
+ *
174
+ * @returns {{ name: string, config: Object }|null} The CI profile, or null if none found
175
+ */
176
+ findCiProfile() {
177
+ const config = this.read();
178
+ if (!config || !config.profiles) return null;
179
+
180
+ for (const [name, profileConfig] of Object.entries(config.profiles)) {
181
+ if (profileConfig.ciInfraProvisioned) {
182
+ return { name, config: profileConfig };
183
+ }
184
+ }
185
+ return null;
186
+ }
187
+
188
+ /**
189
+ * Get the sharedInfraFrom field, handling legacy sharedStackFrom.
190
+ * Returns the source stack name if infrastructure was shared from another profile,
191
+ * or null if this profile has standalone infrastructure.
192
+ *
193
+ * @param {Object} profileConfig - A profile configuration object
194
+ * @returns {string|null} The source stack name or null
195
+ */
196
+ getSharedInfraSource(profileConfig) {
197
+ return profileConfig.sharedInfraFrom || profileConfig.sharedStackFrom || null;
198
+ }
199
+
164
200
  /**
165
201
  * Create or update a profile in the config.
166
202
  * Sets the given profile as the active profile and writes the config.