You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: plugins/sagemaker-ai/.codex-plugin/plugin.json
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
{
2
2
"name": "sagemaker-ai",
3
-
"version": "1.0.0",
3
+
"version": "1.1.0",
4
4
"description": "Build, train, and deploy AI models with deep AWS AI/ML expertise brought directly into your coding assistants, covering the surface area of Amazon SageMaker AI.",
Copy file name to clipboardExpand all lines: plugins/sagemaker-ai/skills/dataset-transformation/SKILL.md
+18-9Lines changed: 18 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,11 +22,9 @@ Transforms a data set provided by the user into their desired format. All transf
22
22
3.**Don't read files until you need them.** Only read reference files when you've reached the workflow step that requires them and the user has confirmed the direction. Never read ahead.
23
23
4.**No narration.** Don't explain what you're about to do or what you just did. Share outcomes and ask questions. Keep responses short and focused.
24
24
5.**No repetition.** If you said something before a tool call, don't repeat it after. Only share new information.
25
-
6.**Do not deviate from the Workflow.** The steps listed in the workflow should be followed exactly as described. Progress from Step 1 to Step 10 to complete the task. Do not deviate from the workflow!
25
+
6.**Do not deviate from the Workflow.** The steps listed in the workflow should be followed exactly as described. Progress from Step 1 to Step 11 to complete the task. Do not deviate from the workflow!
26
26
7.**Always end with a question.** Whenever you pause for user input, acknowledgment, or feedback, your response must end with a question. Never leave the user with a statement and expect them to know they need to respond.
27
-
8.**Never overwrite existing files — append instead.** If a target notebook already exists, do NOT overwrite it. Append new cells to the existing file. Notify the user that the file already exists and that you will be appending to it.
28
-
9.**Avoid filename collisions.** When creating a new file, check if a file with the same name already exists. If it does, rename the new file by appending a numeric suffix (e.g., `transform_dataset_2.ipynb`) before writing.
29
-
10.**Default output format is JSONL.** Unless the user explicitly requests a different file format, the transformed dataset should be written as `.jsonl` (JSON Lines — one JSON object per line).
27
+
8.**Default output format is JSONL.** Unless the user explicitly requests a different file format, the transformed dataset should be written as `.jsonl` (JSON Lines — one JSON object per line).
30
28
31
29
## Known Dataset Formats Reference
32
30
@@ -142,7 +140,18 @@ Continue iterating with the user's feedback — update the notebook cell in plac
142
140
143
141
⏸ Wait for user.
144
142
145
-
### Step 8: Generate the execution cells in the notebook
143
+
### Step 8: Determine notebook target
144
+
145
+
Check if the project notebook already exists at `<project-dir>/notebooks/<project-name>.ipynb`.
146
+
147
+
- If it exists → ask: _"Would you like me to append the transformation cells to the existing notebook, or create a new one?"_
148
+
- If it doesn't exist → create it
149
+
150
+
When appending, add a markdown header cell `## Dataset Transformation` as a section divider before the new cells.
151
+
152
+
⏸ Wait for user.
153
+
154
+
### Step 9: Generate the execution cells in the notebook
146
155
147
156
**Before writing the notebook, read:**
148
157
@@ -168,7 +177,7 @@ Read the reference guide at `references/dataset_transformation_code.md` and foll
168
177
169
178
⏸ Wait for user.
170
179
171
-
### Step 9: Determine and confirm execution mode
180
+
### Step 10: Determine and confirm execution mode
172
181
173
182
Check the size of the input dataset:
174
183
@@ -198,20 +207,20 @@ Do not execute until the user approves. If the user rejects the recommendation,
198
207
199
208
If local execution:
200
209
201
-
- Add a cell that runs the transformation by importing from the `.py` files already on disk (written by the agent during Steps 7–8): import `transform_dataset` from `transform_fn`, load the dataset, transform, and save output. Scripts are located in `<project-dir>/scripts/`.
210
+
- Add a cell that runs the transformation by importing from the `.py` files already on disk (written by the agent during Steps 7 and 9): import `transform_dataset` from `transform_fn`, load the dataset, transform, and save output. Scripts are located in `<project-dir>/scripts/`.
202
211
203
212
If SageMaker Processing Job:
204
213
205
214
- Add a cell that submits and monitors the Processing Job inline using the V3 SageMaker SDK directly (FrameworkProcessor, ProcessingInput, ProcessingOutput, etc.). Create a FrameworkProcessor with the SKLearn 1.2-1 image, configure inputs/outputs, and call `processor.run(wait=True, logs=True)` to block the cell and stream logs until the job completes. See `scripts/transformation_tools.py` for reference implementation details.
206
215
- Inform the user they can run this cell to kick off and monitor the job.
207
216
208
-
**Important:** The agent must NOT execute the full dataset transformation itself. The notebook cells are generated for the user to review and run. Only sample data (from Steps 7–8) should be transformed by the agent for validation purposes.
217
+
**Important:** The agent must NOT execute the full dataset transformation itself. The notebook cells are generated for the user to review and run. Only sample data (from Steps 7 and 9) should be transformed by the agent for validation purposes.
209
218
210
219
> "I've added the execution cell to the notebook. You can run it to transform the full dataset. Would you like to review the notebook before running it?"
211
220
212
221
⏸ Wait for user.
213
222
214
-
### Step 10: Verify and confirm with the user
223
+
### Step 11: Verify and confirm with the user
215
224
216
225
For this step, you need: **to verify the output looks correct and confirm with the user.**
Copy file name to clipboardExpand all lines: plugins/sagemaker-ai/skills/dataset-transformation/references/notebook_structure.md
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -41,6 +41,7 @@ Each line of code is a separate string in `source`, ending with `\n` (except the
41
41
- Escape quotes inside strings: `\"`
42
42
- No trailing commas in arrays or objects
43
43
- 2-space indentation
44
-
- Use `fs_write` with `command: create` to write the complete notebook JSON
44
+
- Write notebooks using your standard file write tool to create the `.ipynb` file with the complete notebook JSON, OR use notebook MCP tools (e.g., `create_notebook`, `add_cell`) if available in the current environment
45
+
-**DON'T** use bash commands, shell scripts, or `echo`/`cat` piping to generate notebooks
45
46
- Markdown cell 0: `"cell_type": "markdown"`, no `execution_count` or `outputs`
46
47
- Wrap all cells in `{"cells": [...], "metadata": {...}, "nbformat": 4, "nbformat_minor": 4}`
@@ -82,7 +80,7 @@ Use **2-space indentation** (pretty-print format) for consistent, readable forma
82
80
❌ **DON'T** forget to escape quotes in strings
83
81
❌ **DON'T** add trailing commas to last array elements
84
82
85
-
✅ **DO** use fs_write with the complete JSON structure
83
+
✅ **DO** use your standard file write tool to write the complete notebook JSON, or notebook MCP tools (e.g., `create_notebook`, `add_cell`) if available
86
84
✅ **DO** add `\n` to end of each line in source arrays
87
85
✅ **DO** validate JSON structure before writing
88
86
✅ **DO** use proper escaping for special characters
Copy file name to clipboardExpand all lines: plugins/sagemaker-ai/skills/finetuning-setup/SKILL.md
+7-9Lines changed: 7 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -40,16 +40,12 @@ Guides the user through selecting a base model and fine-tuning technique based o
40
40
41
41
### Step 2: Select Base Model
42
42
43
-
1. Read `use_case_spec.md` to understand the use case and success criteria.
44
-
2. Restate the use case in one sentence.
45
-
3. Always retrieve the full list of available SageMaker Hub model names by running: `python finetuning-setup/scripts/get_model_names.py <hub-name>` — even if the user has already mentioned a model name or family. Do not skip this step or filter the results.
46
-
4. Present all available models to the user, grouped by model family (e.g., Llama, Mistral, Gemma) for readability.
47
-
5. Ask the user to pick the exact model ID from the list.
48
-
6. Validate the selected model exists in the retrieved list before proceeding.
43
+
First, retrieve all available SageMaker Hub model names by running: `python finetuning-setup/scripts/get_model_names.py <hub-name>`.
49
44
50
-
EXTREMELY IMPORTANT: NEVER recommend or suggest any particular model based on the context you have. YOU ARE ALLOWED ONLY to display the list of models
51
-
as given by the script. DO NOT add your own recommendation or suggestion after displaying the list of models to tell which model is correct. Present this
52
-
statement to the user: "Which model would you like to use? Please type the exact model name from the above list." and allow the user to select the model.
45
+
Present all available models to the user with their licenses before making any recommendations. Cross-reference the model list with `references/model-licenses.md` and display each as `<model name> - [<license>](<url>)`. For example: "Qwen3-4B - [Apache 2.0](https://huggingface.co/Qwen/Qwen3-4B/blob/main/LICENSE)"
46
+
47
+
If you already know the model the user wants to use (from conversation context or planning files), confirm that it's in the list, display its license, and move on. Otherwise, help the user pick a model following the instructions in `references/model-selection.md`.
48
+
**Important:** Make sure to remember this list of available models when helping with model selection. Don't recommend a model that's not available to the user.
53
49
54
50
### Step 3: Determine Finetuning Technique
55
51
@@ -72,4 +68,6 @@ Here's what we've selected:
72
68
73
69
## References
74
70
71
+
-`references/model-selection.md` — Model selection instructions and benchmark descriptions
0 commit comments