feat(sagemaker-ai): update skills and bump version to 1.1.0#144
feat(sagemaker-ai): update skills and bump version to 1.1.0#144krokoko merged 2 commits intoawslabs:mainfrom
Conversation
There was a problem hiding this comment.
Semgrep OSS found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.
75192d6 to
ffddcce
Compare
|
Make sure to also bump the version in https://github.com/awslabs/agent-plugins/blob/main/.claude-plugin/marketplace.json#L164 |
|
Silent error swallowing in Nova reward function Lambda handler File: plugins/sagemaker-ai/skills/model-evaluation/scripts/nova_reward_function_source_template.py The lambda_handler catches all exceptions with except Exception as e but never logs e — it silently returns a 0.0 score. Any bug in the user's customized reward_function (wrong field names, type errors, division by zero) will be invisibly converted to zero scores with no diagnostic output. In a SageMaker pipeline where you can't easily attach a debugger, this would be extremely painful to troubleshoot. Fix: At minimum, log the exception: print(f"ERROR processing sample {i}: {type(e).name}: {e}", flush=True) |
|
EVALUATE_BASE placeholder is a string, not a boolean Files: benchmark_evaluator.py, custom_scorer_evaluator.py Both new evaluator scripts use EVALUATE_BASE = "[EVALUATE_BASE]" (a quoted string), while the existing llmaaj_evaluator.py correctly uses EVALUATE_BASE = [TRUE_OR_FALSE] (unquoted, substituted as a bare boolean). The string "[EVALUATE_BASE]" is truthy and may cause SDK errors or incorrect behavior. Fix: Change to EVALUATE_BASE = [EVALUATE_BASE] (no quotes) to match the established pattern. |
|
Inconsistent error handling between reward function templates Files: nova_reward_function_source_template.py vs reward_function_source_template.py The two templates have fundamentally different error strategies:
Both approaches have problems. The generic template also has fragile event parsing (event.get('input', event) fails with AttributeError if event is a list). |
|
Non-list event silently treated as empty batch File: nova_reward_function_source_template.py batch = event if isinstance(event, list) else [] Fix: Add a warning log when the event format is unexpected. |
|
Placeholder values never validated in evaluator scripts Files: benchmark_evaluator.py, custom_scorer_evaluator.py Placeholder strings like "[MLFLOW_ARN]" are truthy. The guard if MLFLOW_ARN: always passes. If the agent fails to substitute a placeholder, the SageMaker SDK receives garbage values producing confusing API errors. |
|
Nosemgrep rule ID fix from PR #121 is being reverted File: plugins/sagemaker-ai/skills/dataset-evaluation/scripts/format_detector.py This PR changes the nosemgrep rule IDs from the double-ID format back to the truncated form: PR #121 (b467313) specifically fixed these to the double-ID format because the truncated IDs cause suppressions to be silently ignored by semgrep. This PR undoes that fix. Likely the branch was based on a pre-#121 commit. |
1833d3e to
594515e
Compare
this is the established pattern with the scripts, that the agent substitutes these placeholders. will take as a nit unless there's bigger concerns. |
0be5b48 to
c9108d3
Compare
Fixed |
a1de54b to
5a6a51a
Compare
10306cc to
3ec1fb2
Compare
3aa231b to
56ffe49
Compare
SageMakerAIAgentSkills (mainline ee2105d): - finetuning: add continuous customization reference, EULA fixes, RLVR notebook UX improvements - finetuning-setup: add benchmark-based model selection + 8 benchmark references + model-licenses - model-evaluation: add custom scorer workflow, reward function creation, MLflow support; rename notebook_cells.py -> llmaaj_evaluator.py; add nova/oss reward function templates - model-deployment: EULA and deploy script fixes, model-licenses reference - dataset-transformation: notebook structure/writing guide updates - planning: scope activation to SageMaker model customization domain X-AI-Prompt: Sync SageMakerAIAgentSkills mainline into awslabs/agent-plugins sagemaker-ai plugin and bump version to 1.1.0 X-AI-Tool: Kiro CLI
56ffe49 to
2c6b16d
Compare
Done |
These we are tackling as P1 in Asana as they require some consensus. Definitely good callouts.
We added Placeholder validations |
Summary
Updates the
sagemaker-aiplugin from v1.0.0 to v1.1.0.SageMakerAIAgentSkills (mainline
13d05c9):notebook_cells.py→llmaaj_evaluator.py; add nova/oss reward function templatesChanges
.claude-plugin/plugin.json,.codex-plugin/plugin.json, and.claude-plugin/marketplace.jsonSageMakerAIAgentSkillsmainlineAcknowledgment
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the project license.