Commit Graph

3193 Commits

Author SHA1 Message Date
Hannah R. b47a870284 fix(mtrl): Replace internal STAGE-based S3 path with customer placeholder (#4904)
The 3rd cell of mtrl_finetuning_example_notebook_v3_prod.ipynb set
S3_TRAINING_DATA using an f-string that referenced an undefined STAGE
variable and an internal `-rftjob-input` bucket pattern left over from
when MTRL was tested in gamma/prod. Executing the cell raised
`NameError: name 'STAGE' is not defined`.

Replace it with a customer-facing placeholder S3 URI, consistent with
the convention used in the sibling sft_finetuning notebook, so users
(and the notebook test engine) can substitute their own dataset path.

Co-authored-by: hrehard <hrehard@amazon.com>
2026-07-30 15:05:30 -07:00
Hannah R. 5a49643c6d Migrate NotebookTestEngine notebooks to the v3-examples suite (#4901)
* feat(notebooks): Seed NotebookTestEngine branch with v3-examples suite

Remove the amazon-sagemaker-examples example notebooks (8 category
folders) and replace them with the SageMaker Python SDK v3-examples
notebook suite from aws/sagemaker-python-sdk master:
- inference-examples, ml-ops-examples, model-customization-examples,
  training-examples at the repo root
- the two loose root notebooks (sagemaker_v3_setup.ipynb,
  iam_role_validation.ipynb) moved into uncategorized/

This layout matches the Notebook Test Engine category rotation
(KNOWN_CATEGORY_FOLDERS + uncategorized catch-all).

* ci: Add Notebook Test Engine PR-check workflow

Add .github/workflows/notebook-tests.yml: on a PR touching any notebook
(**/*.ipynb) targeting the NotebookTestEngine branch, assume the engine
role via GitHub OIDC and start the notebook-test-engine CodeBuild project
in pr_check mode, poll to completion, and reflect the build result as the
PR check (failing notebook rendered + uploaded as a failing-notebooks
artifact). Collaborator gate: collaborators auto-approve, others block on
the manual-approval environment.

* ci: Set MAX_CONCURRENT=18 for PR-check runs

PR runs need a higher concurrency cap than full-scans (project default 15)
because the engine throttles against an account-wide InProgress
processing-job count. With the quota at 20, PR=18 lets a PR claim the
reserved headroom even while a scan holds jobs, leaving ~2 slots for
internally-launched jobs (e.g. Clarify).

* ci: Sync PR-check workflow with default branch (collab github.token fallback)

* fix(ci): Use unpinned refs/pull/N/head for PR checkout

Sync with the default-branch workflow (checkout the PR ref tip).

* Remove workflow file from NotebookTestEngine (it lives on the default branch)

---------

Co-authored-by: hrehard <hrehard@amazon.com>
2026-07-24 10:28:41 -07:00
lucasjia-aws 642fdaa3f0 migration in place with a migration notice (#4900) 2026-07-21 16:20:01 -07:00
lucasjia-aws 0b8c97d20f example notebooks migration v2 -> v3 [batch 3] (#4897)
* [batch 3] migrate 18 example notebooks V2 -> V3

* fix: Restrict llmperf script chmod to 0o700 (CodeGuru CWE-732)

* [batch 4] migrate 5 more example notebooks V2 -> V3
2026-07-17 09:50:54 -07:00
lucasjia-aws 17090359c3 example notebooks migration v2 -> v3 [batch 2] (#4896)
* [Batch 2] migrate 9 example notebooks V2 -> V3

* fix(managed-spot-xgboost): address CodeGuru findings in abalone.py
2026-07-17 09:50:34 -07:00
lucasjia-aws 9a40477da3 example notebooks migration v2 -> v3 [batch 1] (#4895) 2026-07-17 09:50:16 -07:00
jam-jee 5bb2687b45 docs: Add SDK-first guidance to AGENTS.md and llms.txt (#4894)
Add an "SDK-first" section (with a natural-language intent -> v3 interface
table) so AI coding agents default to the SageMaker Python SDK v3 as the
primary interface for SageMaker tasks, rather than dropping to raw boto3
(create_training_job/create_endpoint), the AWS CLI, or hand-rolled framework
scripts. Includes an honest scope note that these files only steer agents that
load them into context.

---
X-AI-Prompt: Add SDK-first (library-selection) guidance so agents default to the SageMaker Python SDK v3 without an explicit nudge
X-AI-Tool: Kiro
2026-07-07 14:17:12 -07:00
lucasjia-aws 262e3d54bb chore: Remove archived/ folder from default branch (#4892)
Delete the 439 archived v2 notebooks (2068 files) from the default
branch. These notebooks were archived since 2024-08 due to low
telemetry and are preserved on the v2-archive branch. None of the
121 Golden Set or 57 to-migrate notebooks live under archived/, and
no active files reference its contents, so removal is safe.
2026-07-02 12:37:26 -07:00
jam-jee 58c268c356 docs: Add AGENTS.md and llms.txt for AI agent v3 guidance (#4891)
Add an AGENTS.md (agents.md convention) and llms.txt (llmstxt.org
convention) at the repo root so AI coding agents generate SageMaker
Python SDK v3 code by default instead of deprecated v2 code.

Both files carry a v3-by-default rule, a banned-v2-pattern to v3
replacement table grounded in the official migration guide, the
sagemaker-core/-train/-serve/-mlops module map, and a self-check
step before emitting code.

---
X-AI-Prompt: Create AGENTS.md and llms.txt for the examples repo to steer AI agents to SageMaker Python SDK v3
X-AI-Tool: Kiro
2026-07-01 14:00:29 -07:00
Ray Wang 24fa34ca48 Fix README.md (#4882)
* Revise example prompt and answer to English

Updated example prompt and answer in README with English content.

* Fix typo issue and add link to generative ai readme.md
2026-04-27 15:55:43 -07:00
Ray Wang 16876be041 Revise example prompt and answer to English (#4881)
Updated example prompt and answer in README with English content.
2026-04-27 15:33:02 -07:00
Ray Wang d614039730 [generative_ai] add qwen3 8b finetune train and deploy (#4879)
* [generative_ai] add qwen3 8b finetune train and deploy

* [generative-ai] update content according to feedback

* Remove ModelBuilder which not use

* [generative-ai] update Model Builder to model deploy

* [generative-ai] Fix known issue
2026-04-24 11:08:01 -07:00
Vikesh af26ccc6c4 Fix ImportError: AlgorithmSpecification and shape classes imported from wrong module (#4877)
* introductory sm core blog fixes

* Fix 6 bugs in introductory-blog-sagemaker-core.ipynb

- Remove incomplete `s3_client =` assignment (unused variable)
- Add missing `Endpoint.create()` cell before wait_for_status
- Add missing `import boto3` before boto3.client usage
- Fix S3 key path: output/train/test.csv -> output/test/test.csv
- Fix endpoint response access: res["Body"] -> res.body (sagemaker-core SDK)
- Define missing print_performance_metrics() function

Fixes #4872

* Fix ImportError: move shape classes to sagemaker_core.shapes import

AlgorithmSpecification, Channel, DataSource, S3DataSource, OutputDataConfig,
ResourceConfig, and StoppingCondition are shapes, not resources. They must be
imported from sagemaker_core.shapes, not sagemaker_core.resources.

TrainingJob remains correctly imported from sagemaker_core.resources.

Fixes #4862
2026-04-08 10:29:22 -07:00
Vikesh 356b560b5f Fix 6 bugs in introductory-blog-sagemaker-core.ipynb (#4876)
* introductory sm core blog fixes

* Fix 6 bugs in introductory-blog-sagemaker-core.ipynb

- Remove incomplete `s3_client =` assignment (unused variable)
- Add missing `Endpoint.create()` cell before wait_for_status
- Add missing `import boto3` before boto3.client usage
- Fix S3 key path: output/train/test.csv -> output/test/test.csv
- Fix endpoint response access: res["Body"] -> res.body (sagemaker-core SDK)
- Define missing print_performance_metrics() function

Fixes #4872
2026-04-08 10:28:40 -07:00
pdifranc 58a3cd5ecd Upgrade sm-mlflow_pipeline.ipynb to sagemaker v3 (#4873) 2026-02-24 10:42:59 -08:00
dhegde-aws f9712cddef SageMaker AI models and MLflow for agent evaluation with Strands Agents SDK (#4871)
* Add notebook demonstrating how to build AI agents using Strands Agents SDK
with models deployed on SageMaker AI endpoints and MLflow observability.

Covers SageMaker JumpStart model deployment, agent tracing with MLflow,
A/B testing with production variants, and evaluation using MLflow GenAI scorers.

* Updated ml_ops/README.md to refer to the notebook in sm-mlflow_eval

* added new trace screenshot and updated deletion code in notebook
2026-02-02 15:50:22 -08:00
aviruthen 8449e32b6f Fix syntax of notebooks (#4868)
* Fix syntax issues for notebooks

* Reverting one notebook to previous state
2025-12-12 14:02:08 -08:00
aviruthen 95897333b6 Pin sagemaker version to V2 (#4866)
* Pinning sagemaker version to use V2

* Fix targeted sagemaker version pinning for pytorch model zoo notebook
2025-11-25 16:57:42 -08:00
sage-maker 10f8062e8e remove * principal (#4859) 2025-09-03 13:20:06 -07:00
monamo 6b56a3e8fa moved sm-training-queues-pytorch to model_and_train_models_folder (#4858) 2025-08-01 10:21:53 -07:00
monamo b0986fb50c added AWS Batch and SM notebook examples (#4856) 2025-07-30 21:04:45 -07:00
Gokul Anantha Narayanan 9c7f77ce80 Delete build_and_train_models directory (#4853) 2025-07-30 14:44:03 -07:00
David Lindskog e23559acaf Adding example notebooks for AWS Batch for SageMaker Training jobs. (#4852) 2025-07-30 13:15:11 -07:00
monamo a9ad51b321 Create README.md (#4850)
Added readme for the chanes
2025-07-30 08:55:52 -07:00
parknate@ 33c846256d delete: remove archived notebooks with old s3 ref (#4849) 2025-07-22 09:28:03 -07:00
Gokul Anantha Narayanan 45918017d8 Delete HuggingFace-Async-Inference-Walkthrough.ipynb (#4847) 2025-07-03 14:06:02 -07:00
jzhaoqwa 68cdd8734b Update CONTRIBUTING.md 2025-03-20 10:44:56 -07:00
rsareddy0329 390f4edf7f Added code block to describe update_endpoint option in sagemaker model_builder (#4834)
Co-authored-by: Roja Reddy Sareddy <rsareddy@amazon.com>
2025-03-20 09:26:33 -07:00
Gokul Anantha Narayanan 6f6164791a Update Torch and TorchVision to more secure versions (#4830) 2025-03-13 11:10:16 -07:00
Niris Okram d6427949c9 Example notebook for importing llama3 into jumpstart private hub (#4828)
* example notebooks for importing llama3 into jumpstart private hub

* Adding util function to handle the hub document update with custom hostingartifacturi

---------

Co-authored-by: Niris Okram <niris@amazon.com>
2025-03-11 12:00:54 -07:00
Vikesh e2b36e326e introductory sm core blog fixes (#4825) 2025-03-04 09:08:56 -08:00
Niris Okram 2482979256 change: Add example to import custom model in SageMaker JumpStart private model hub (#4824)
* Adding the sample for importing custom model to a jumpstart private model hub

* file renamed and updated to align with PR guidelines

* renamed folder to align with PR guidelines

* updated description in the notebook

* switching to torch.inference_mode() from torch.no_grad() to enhance performance

---------

Co-authored-by: Niris Okram <niris@amazon.com>
2025-02-19 14:22:04 -08:00
Bikash Shrestha 2d519b52c3 chore: update dependency versions like transformers and torch (#4822)
Co-authored-by: Bikash Shrestha <shgbikas@amazon.com>
2025-02-13 15:40:52 -05:00
Sharon Yu 8c0efd67ea feat: sam2.1 video segmentation example notebook (#4819)
* feat: add sam2.1 example notebook

* reformat
2025-02-12 17:36:59 -05:00
Erick Benitez-Ramos f671af53c3 Add DeepSeek Example for ModelTrainer (#4813)
* Add DeepSeek Example for ModelTrainer

* nit
2025-01-31 17:28:40 -08:00
Stephen Via c5f4665b45 feat: add cross-account runbook + actions (#4802)
Co-authored-by: svia3 <svia@amazon.com>
2025-01-31 12:00:00 -08:00
Marco Friaz 865bebb705 Update default_bucket and default_bucket_prefix to derive from sagemaker rather than sagemaker_core AND Append the default_bucket_prefix to s3 paths if one exists to sample notebooks (#4812)
* Append the default_bucket_prefix to s3 paths if one exists to sample notebooks

**Description**

This change checks the sagemaker session if there is a default_bucket_prefix set. If a default bucket prefix is specified, it is appended it to the s3 path. This ensures sample notebooks that utilize s3, works in SageMaker Unified Studio.

* Update default_bucket and default_bucket_prefix to derive from sagemaker rather than sagemaker_core

**Description**

In order to be compatible with SageMaker Unified Studio, the default_bucket and default_bucket_prefix must be derived from the sagemaker python sdk rather than the sagemaker_core python SDK.

---------

Co-authored-by: Marco Friaz <marfriaz@amazon.com>
2025-01-31 11:52:48 -08:00
Marco Friaz cf8f7dd28d Append the default_bucket_prefix to s3 paths if one exists to sample notebooks (#4811)
**Description**

This change checks the sagemaker session if there is a default_bucket_prefix set. If a default bucket prefix is specified, it is appended it to the s3 path. This ensures sample notebooks that utilize s3, works in SageMaker Unified Studio.

Co-authored-by: Marco Friaz <marfriaz@amazon.com>
2025-01-29 11:15:49 -08:00
himallik bee1bcf4b4 -Old code had some deprecated code. Updated the (#4809)
notebook to update the deprecated code.
-wget lines were failing, added  --no-check-certificate flag to fix the issue.
2025-01-21 12:06:07 -05:00
Erick Benitez-Ramos df06d14a0c Fix S3 uri (#4810) 2025-01-20 16:16:09 -08:00
Stephen Via f85ce9ef18 fix: add multi-user-project byod scenario and updated ReadMe for potential errors + workarounds (#4790)
* fix: add multi-user-project byod scenario and updated ReadMe for potential errors + workarounds

* fix: add multi-user-project byod scenario and updated ReadMe for potential errors + workarounds

---------

Co-authored-by: svia3 <svia@amazon.com>
2024-12-13 13:16:50 -08:00
chnnmz bef4b8b7a0 Add notebook demonstrating custom pre/post-procesing for TEI use cases (#4776)
* Add notebook demonstrating custom pre/post-procesing for TEI use cases

* Minor correction for invoke()

* Minor correction - remove hardcoded ROLE
2024-12-09 18:28:23 -05:00
Erick Benitez-Ramos 10704fbd1f Fix recipe name (#4793) 2024-12-04 10:37:24 -08:00
Erick Benitez-Ramos cfd56cdcb7 Add ModelTrainer & ModelBuilder example notebooks (#4792)
* Add ModelTrainer & ModelBuilder example notebooks

* Update recipes setup

* Update Readme for ModelTrainer

* Update Readme for ModelBuilder

* Remove codeblock
2024-12-04 10:09:09 -08:00
Dana Benson 00d3763947 fix: use correct client for create env client, fix environment creation (#4787) 2024-11-19 14:36:06 -08:00
Dana Benson a195149799 fix: add domain execution role fallback, additional domain tags (#4785) 2024-11-18 12:35:52 -08:00
Dana Benson cc08418481 fix: add latest model (#4783) 2024-11-15 15:12:26 -05:00
Stephen Via 33114b6240 add SSO user support + add_env_action to dz-import (#4782)
Co-authored-by: svia3 <svia@amazon.com>
2024-11-14 16:32:41 -05:00
Dana Benson cddb473cc7 feat: add datazone domain import documentation (#4777) 2024-11-08 13:21:52 -08:00
Marc Karp 378bed5fc8 Add fine-tuning example of llama 3.2 vision models (#4775)
* Add fine-tuning example of llama 3.2 vision models

* update index.rst

* update notebook

* Update README
2024-11-04 14:42:33 -05:00