@aws/ml-container-creator 0.10.0 → 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.
- package/LICENSE-THIRD-PARTY +9304 -0
- package/bin/cli.js +2 -0
- package/config/bootstrap-e2e-stack.json +341 -0
- package/config/bootstrap-stack.json +40 -3
- package/config/parameter-schema-v2.json +5 -21
- package/config/tune-catalog.json +1781 -0
- package/infra/ci-harness/buildspec.yml +1 -0
- package/infra/ci-harness/lambda/path-prover/brain.ts +306 -0
- package/infra/ci-harness/lambda/path-prover/write-results.ts +152 -0
- package/infra/ci-harness/lib/ci-harness-stack.ts +837 -7
- package/infra/ci-harness/state-machines/path-prover.asl.json +496 -0
- package/package.json +51 -66
- package/servers/base-image-picker/index.js +121 -121
- package/servers/e2e-status/index.js +297 -0
- package/servers/e2e-status/manifest.json +14 -0
- package/servers/e2e-status/package.json +15 -0
- package/servers/endpoint-picker/LICENSE +202 -0
- package/servers/endpoint-picker/index.js +536 -0
- package/servers/endpoint-picker/manifest.json +14 -0
- package/servers/endpoint-picker/package.json +18 -0
- package/servers/hyperpod-cluster-picker/index.js +125 -125
- package/servers/instance-sizer/index.js +138 -138
- package/servers/instance-sizer/lib/instance-ranker.js +76 -76
- package/servers/instance-sizer/lib/model-resolver.js +61 -61
- package/servers/instance-sizer/lib/quota-resolver.js +113 -113
- package/servers/instance-sizer/lib/vram-estimator.js +31 -31
- package/servers/lib/bedrock-client.js +38 -38
- package/servers/lib/catalogs/model-servers.json +201 -3
- package/servers/lib/custom-validators.js +13 -13
- package/servers/lib/dynamic-resolver.js +4 -4
- package/servers/marketplace-picker/index.js +342 -0
- package/servers/marketplace-picker/manifest.json +14 -0
- package/servers/marketplace-picker/package.json +18 -0
- package/servers/model-picker/index.js +382 -382
- package/servers/region-picker/index.js +56 -56
- package/servers/workload-picker/LICENSE +202 -0
- package/servers/workload-picker/catalogs/workload-profiles.json +67 -0
- package/servers/workload-picker/index.js +171 -0
- package/servers/workload-picker/manifest.json +16 -0
- package/servers/workload-picker/package.json +16 -0
- package/src/app.js +4 -2
- package/src/lib/bootstrap-command-handler.js +579 -14
- package/src/lib/bootstrap-config.js +36 -0
- package/src/lib/bootstrap-profile-manager.js +48 -41
- package/src/lib/ci-register-helpers.js +74 -0
- package/src/lib/config-loader.js +3 -0
- package/src/lib/config-manager.js +7 -0
- package/src/lib/cuda-resolver.js +17 -8
- package/src/lib/generated/cli-options.js +315 -315
- package/src/lib/generated/parameter-matrix.js +661 -661
- package/src/lib/generated/validation-rules.js +71 -71
- package/src/lib/path-prover-brain.js +607 -0
- package/src/lib/prompts/project-prompts.js +12 -0
- package/src/lib/template-variable-resolver.js +25 -1
- package/src/lib/tune-catalog-validator.js +37 -4
- package/templates/Dockerfile +9 -0
- package/templates/code/adapter_sidecar.py +444 -0
- package/templates/code/serve +6 -0
- package/templates/code/serve.d/vllm.ejs +1 -1
- package/templates/do/.benchmark_writer.py +1476 -0
- package/templates/do/.tune_helper.py +982 -57
- package/templates/do/__pycache__/.benchmark_writer.cpython-312.pyc +0 -0
- package/templates/do/adapter +149 -0
- package/templates/do/benchmark +639 -85
- package/templates/do/config +108 -5
- package/templates/do/deploy.d/managed-inference.ejs +192 -11
- package/templates/do/optimize +106 -37
- package/templates/do/register +89 -0
- package/templates/do/test +13 -0
- package/templates/do/tune +378 -59
- package/templates/do/validate +44 -4
package/templates/do/validate
CHANGED
|
@@ -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
|
|
35
|
-
echo " --smart
|
|
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
|