@aws/ml-container-creator 0.8.0 → 0.9.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 (41) hide show
  1. package/LICENSE-THIRD-PARTY +50760 -16218
  2. package/bin/cli.js +31 -137
  3. package/package.json +7 -2
  4. package/servers/lib/catalogs/instances.json +52 -1275
  5. package/servers/lib/catalogs/models.json +0 -132
  6. package/servers/lib/catalogs/popular-diffusors.json +1 -110
  7. package/src/app.js +29 -2
  8. package/src/lib/config-manager.js +17 -0
  9. package/src/lib/generated/cli-options.js +467 -0
  10. package/src/lib/generated/validation-rules.js +202 -0
  11. package/src/lib/mcp-client.js +16 -1
  12. package/src/lib/mcp-command-handler.js +10 -2
  13. package/src/lib/prompt-runner.js +16 -2
  14. package/src/lib/train-config-parser.js +136 -0
  15. package/src/lib/train-config-persistence.js +143 -0
  16. package/src/lib/train-config-validator.js +112 -0
  17. package/src/lib/train-feedback.js +46 -0
  18. package/src/lib/train-idempotency.js +97 -0
  19. package/src/lib/train-request-builder.js +120 -0
  20. package/templates/code/serve +5 -134
  21. package/templates/code/serve.d/lmi.ejs +19 -0
  22. package/templates/code/serve.d/sglang.ejs +47 -0
  23. package/templates/code/serve.d/tensorrt-llm.ejs +53 -0
  24. package/templates/code/serve.d/vllm.ejs +48 -0
  25. package/templates/do/.train_build_request.py +141 -0
  26. package/templates/do/.train_poll_parser.py +135 -0
  27. package/templates/do/.train_status_parser.py +187 -0
  28. package/templates/do/clean +1 -1387
  29. package/templates/do/clean.d/async-inference.ejs +508 -0
  30. package/templates/do/clean.d/batch-transform.ejs +512 -0
  31. package/templates/do/clean.d/hyperpod-eks.ejs +481 -0
  32. package/templates/do/clean.d/managed-inference.ejs +1043 -0
  33. package/templates/do/deploy +1 -1766
  34. package/templates/do/deploy.d/async-inference.ejs +501 -0
  35. package/templates/do/deploy.d/batch-transform.ejs +529 -0
  36. package/templates/do/deploy.d/hyperpod-eks.ejs +339 -0
  37. package/templates/do/deploy.d/managed-inference.ejs +726 -0
  38. package/templates/do/lib/feedback.sh +41 -0
  39. package/templates/do/train +786 -0
  40. package/templates/do/training/config.yaml +140 -0
  41. package/templates/do/training/train.py +463 -0
@@ -0,0 +1,41 @@
1
+ #!/bin/bash
2
+ # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
+ # SPDX-License-Identifier: Apache-2.0
4
+ #
5
+ # Shared helper: post-completion feedback loop for training and tuning jobs.
6
+ # Sourced by do/tune and do/train — prints artifact locations and deployment suggestions.
7
+
8
+ # print_completion_feedback()
9
+ # Display completion summary with artifact path and next-step deployment commands.
10
+ # Tailors suggestions based on the detected artifact type (adapter vs full model).
11
+ #
12
+ # Arguments:
13
+ # $1 - output_path: S3 URI to the output artifacts
14
+ # $2 - output_type: "adapter" or "full-model"
15
+ # $3 - job_name: Job name for reference
16
+ # $4 - model_package_arn: (optional) Model package ARN if registered
17
+ print_completion_feedback() {
18
+ local output_path="$1"
19
+ local output_type="$2"
20
+ local job_name="$3"
21
+ local model_package_arn="${4:-}"
22
+
23
+ echo ""
24
+ echo "✅ Training complete: ${job_name}"
25
+ echo ""
26
+ echo " Artifacts: ${output_path}"
27
+ if [ -n "${model_package_arn}" ]; then
28
+ echo " Model Package: ${model_package_arn}"
29
+ fi
30
+ echo ""
31
+ echo " Next steps:"
32
+
33
+ if [ "${output_type}" = "adapter" ]; then
34
+ echo " • Deploy as LoRA adapter: ./do/adapter add my-adapter --weights ${output_path}"
35
+ echo " • (Requires running endpoint with LoRA enabled)"
36
+ elif [ "${output_type}" = "full-model" ]; then
37
+ echo " • Deploy as new IC: ./do/add-ic my-model --model-data ${output_path}"
38
+ echo " • Replace current base: ./do/deploy --force-ic --model-data ${output_path}"
39
+ fi
40
+ echo ""
41
+ }