@aws/ml-container-creator 0.10.0 → 0.12.1

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 +33 -22
  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 +851 -7
  11. package/infra/ci-harness/state-machines/path-prover.asl.json +496 -0
  12. package/package.json +53 -67
  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 +166 -153
  23. package/servers/instance-sizer/lib/instance-ranker.js +120 -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/instances.json +27 -0
  29. package/servers/lib/catalogs/model-servers.json +201 -3
  30. package/servers/lib/custom-validators.js +13 -13
  31. package/servers/lib/dynamic-resolver.js +4 -4
  32. package/servers/marketplace-picker/index.js +342 -0
  33. package/servers/marketplace-picker/manifest.json +14 -0
  34. package/servers/marketplace-picker/package.json +18 -0
  35. package/servers/model-picker/index.js +382 -382
  36. package/servers/region-picker/index.js +56 -56
  37. package/servers/workload-picker/LICENSE +202 -0
  38. package/servers/workload-picker/catalogs/workload-profiles.json +67 -0
  39. package/servers/workload-picker/index.js +171 -0
  40. package/servers/workload-picker/manifest.json +16 -0
  41. package/servers/workload-picker/package.json +16 -0
  42. package/src/app.js +12 -3
  43. package/src/lib/bootstrap-command-handler.js +609 -15
  44. package/src/lib/bootstrap-config.js +36 -0
  45. package/src/lib/bootstrap-profile-manager.js +48 -41
  46. package/src/lib/ci-register-helpers.js +74 -0
  47. package/src/lib/config-loader.js +3 -0
  48. package/src/lib/config-manager.js +7 -0
  49. package/src/lib/config-validator.js +1 -1
  50. package/src/lib/cuda-resolver.js +17 -8
  51. package/src/lib/generated/cli-options.js +319 -314
  52. package/src/lib/generated/parameter-matrix.js +672 -661
  53. package/src/lib/generated/validation-rules.js +76 -72
  54. package/src/lib/path-prover-brain.js +664 -0
  55. package/src/lib/prompts/infrastructure-prompts.js +2 -2
  56. package/src/lib/prompts/model-prompts.js +6 -0
  57. package/src/lib/prompts/project-prompts.js +12 -0
  58. package/src/lib/secrets-prompt-runner.js +4 -0
  59. package/src/lib/template-manager.js +1 -1
  60. package/src/lib/template-variable-resolver.js +87 -1
  61. package/src/lib/tune-catalog-validator.js +37 -4
  62. package/templates/Dockerfile +9 -0
  63. package/templates/code/adapter_sidecar.py +444 -0
  64. package/templates/code/serve +6 -0
  65. package/templates/code/serve.d/vllm.ejs +1 -1
  66. package/templates/do/.benchmark_writer.py +1476 -0
  67. package/templates/do/.tune_helper.py +982 -57
  68. package/templates/do/__pycache__/.benchmark_writer.cpython-312.pyc +0 -0
  69. package/templates/do/adapter +154 -0
  70. package/templates/do/benchmark +639 -85
  71. package/templates/do/build +5 -0
  72. package/templates/do/clean.d/async-inference.ejs +5 -0
  73. package/templates/do/clean.d/batch-transform.ejs +5 -0
  74. package/templates/do/clean.d/hyperpod-eks.ejs +5 -0
  75. package/templates/do/clean.d/managed-inference.ejs +5 -0
  76. package/templates/do/config +115 -45
  77. package/templates/do/deploy.d/async-inference.ejs +30 -3
  78. package/templates/do/deploy.d/batch-transform.ejs +29 -3
  79. package/templates/do/deploy.d/hyperpod-eks.ejs +4 -0
  80. package/templates/do/deploy.d/managed-inference.ejs +216 -14
  81. package/templates/do/lib/endpoint-config.sh +1 -1
  82. package/templates/do/lib/profile.sh +44 -0
  83. package/templates/do/optimize +106 -37
  84. package/templates/do/push +5 -0
  85. package/templates/do/register +94 -0
  86. package/templates/do/stage +567 -0
  87. package/templates/do/submit +7 -0
  88. package/templates/do/test +14 -0
  89. package/templates/do/tune +382 -59
  90. package/templates/do/validate +44 -4
@@ -6,7 +6,7 @@
6
6
  # Validates configuration against AWS service models before deployment.
7
7
  #
8
8
  # Usage:
9
- # ./do/validate [--format json] [--smart]
9
+ # ./do/validate [--format json] [--smart] [--no-stale-warning]
10
10
  #
11
11
  # Exit codes:
12
12
  # 0 - Validation passed (no errors)
@@ -23,16 +23,19 @@ PROJECT_DIR="$(cd "${SCRIPT_DIR}/.." && pwd)"
23
23
  # Parse flags
24
24
  FORMAT="text"
25
25
  SMART=""
26
+ ARG_NO_STALE_WARNING=false
26
27
  for arg in "$@"; do
27
28
  case "$arg" in
28
29
  --format=json|--format=JSON) FORMAT="json" ;;
29
30
  --smart) SMART="--smart" ;;
31
+ --no-stale-warning) ARG_NO_STALE_WARNING=true ;;
30
32
  --help|-h)
31
- echo "Usage: ./do/validate [--format json] [--smart]"
33
+ echo "Usage: ./do/validate [--format json] [--smart] [--no-stale-warning]"
32
34
  echo ""
33
35
  echo "Options:"
34
- echo " --format=json Output validation report as JSON"
35
- echo " --smart Enable smart-mode validators (requires MCP config)"
36
+ echo " --format=json Output validation report as JSON"
37
+ echo " --smart Enable smart-mode validators (requires MCP config)"
38
+ echo " --no-stale-warning Suppress schema registry staleness warning"
36
39
  echo ""
37
40
  echo "Exit codes:"
38
41
  echo " 0 - Validation passed"
@@ -43,6 +46,43 @@ for arg in "$@"; do
43
46
  esac
44
47
  done
45
48
 
49
+ # ── _check_schema_registry_staleness() ────────────────────────────────────────
50
+ # Warn if the schema registry manifest's lastSynced timestamp is older than threshold.
51
+ # Configurable via MCC_CATALOG_STALENESS_DAYS (default: 90).
52
+ # Suppressed by --no-stale-warning flag or MCC_NO_STALE_WARNING=true env var.
53
+ _check_schema_registry_staleness() {
54
+ if [ "${MCC_NO_STALE_WARNING:-}" = "true" ] || [ "${ARG_NO_STALE_WARNING:-false}" = true ]; then
55
+ return 0
56
+ fi
57
+ local threshold="${MCC_CATALOG_STALENESS_DAYS:-90}"
58
+ local manifest_file="${HOME}/.ml-container-creator/schemas/manifest.json"
59
+ if [ ! -f "${manifest_file}" ]; then
60
+ return 0
61
+ fi
62
+ local last_synced
63
+ last_synced=$(python3 -c "
64
+ import json, sys
65
+ from datetime import datetime, timezone
66
+ try:
67
+ with open('${manifest_file}') as f:
68
+ manifest = json.load(f)
69
+ ls = manifest.get('lastSynced', '')
70
+ if not ls:
71
+ sys.exit(0)
72
+ synced = datetime.fromisoformat(ls.replace('Z', '+00:00'))
73
+ days = (datetime.now(timezone.utc) - synced).days
74
+ if days > int('${threshold}'):
75
+ print(days)
76
+ except:
77
+ pass
78
+ " 2>/dev/null)
79
+ if [ -n "${last_synced}" ]; then
80
+ echo "⚠️ Schema registry is ${last_synced} days old. Run 'ml-container-creator bootstrap sync-schemas' to update."
81
+ fi
82
+ }
83
+
84
+ _check_schema_registry_staleness
85
+
46
86
  echo "🔍 Running schema validation..."
47
87
 
48
88
  # Invoke the Node.js validation runner