Skip to content

Commit 2d3b211

Browse files
committed
Fix
1 parent cec34e3 commit 2d3b211

File tree

2 files changed

+23
-6
lines changed

2 files changed

+23
-6
lines changed

v3-examples/model-customization-examples/dpo-trainer-e2e.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@
7575
"# Register dataset in SageMaker AI Registry\n",
7676
"# This creates a versioned dataset that can be referenced by ARN\n",
7777
"dataset = DataSet.create(\n",
78-
" name=\"demo-nargokul-6\", \n",
78+
" name=\"demo-6\",\n",
7979
" data_location=\"s3://nova-mlflow-us-west-2/dataset/preference_dataset_train_256.jsonl\", \n",
8080
" customization_technique=CustomizationTechnique.DPO, \n",
8181
" wait=True\n",
@@ -145,7 +145,7 @@
145145
" mlflow_resource_arn=\"arn:aws:sagemaker:us-west-2:<>:mlflow-tracking-server/ashwpat-test\",\n",
146146
" \n",
147147
" # Training data (from Step 1)\n",
148-
" training_dataset=\"arn:aws:sagemaker:us-west-2:<>:hub-content/F3LMYANDKWPZCROJVCKMJ7TOML6QMZBZRRQOVTUL45VUK7PJ4SXA/DataSet/demo-nargokul-6/0.0.4\",\n",
148+
" training_dataset=\"arn:aws:sagemaker:us-west-2:<>:hub-content/F3LMYANDKWPZCROJVCKMJ7TOML6QMZBZRRQOVTUL45VUK7PJ4SXA/DataSet/demo-6/0.0.4\",\n",
149149
" \n",
150150
" # Output configuration\n",
151151
" s3_output_path=\"s3://nova-mlflow-us-west-2/output\",\n",

v3-examples/model-customization-examples/dpo_trainer_example_notebook_v3_prod.ipynb

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
"# Register dataset in SageMaker AI Registry\n",
6464
"# This creates a versioned dataset that can be referenced by ARN\n",
6565
"'''dataset = DataSet.create(\n",
66-
" name=\"demo-nargokul-6\", \n",
66+
" name=\"demo-6\",\n",
6767
" data_location=\"s3://nova-mlflow-us-west-2/dataset/preference_dataset_train_256.jsonl\", \n",
6868
" customization_technique=CustomizationTechnique.DPO, \n",
6969
" wait=True\n",
@@ -116,7 +116,12 @@
116116
{
117117
"cell_type": "code",
118118
"id": "0352bdaa-fa13-44c5-a70c-0d9bf7a10477",
119-
"metadata": {},
119+
"metadata": {
120+
"ExecuteTime": {
121+
"end_time": "2025-12-05T19:30:51.233369Z",
122+
"start_time": "2025-12-05T19:30:51.101703Z"
123+
}
124+
},
120125
"source": [
121126
"# Create DPOTrainer instance with comprehensive configuration\n",
122127
"trainer = DPOTrainer(\n",
@@ -159,8 +164,20 @@
159164
"\n",
160165
"print(f\"Training completed! Job ARN: {training_job.training_job_arn}\")"
161166
],
162-
"outputs": [],
163-
"execution_count": null
167+
"outputs": [
168+
{
169+
"ename": "NameError",
170+
"evalue": "name 'DataSet' is not defined",
171+
"output_type": "error",
172+
"traceback": [
173+
"\u001B[0;31m---------------------------------------------------------------------------\u001B[0m",
174+
"\u001B[0;31mNameError\u001B[0m Traceback (most recent call last)",
175+
"Cell \u001B[0;32mIn[1], line 2\u001B[0m\n\u001B[1;32m 1\u001B[0m \u001B[38;5;66;03m# Create DPOTrainer instance with comprehensive configuration\u001B[39;00m\n\u001B[0;32m----> 2\u001B[0m dataset \u001B[38;5;241m=\u001B[39m \u001B[43mDataSet\u001B[49m\u001B[38;5;241m.\u001B[39mget(name\u001B[38;5;241m=\u001B[39m\u001B[38;5;124m\"\u001B[39m\u001B[38;5;124marn:aws:sagemaker:us-east-1:729646638167:hub-content/sdktest/DataSet/dpo-nova-1-test-data/0.0.1\u001B[39m\u001B[38;5;124m\"\u001B[39m)\n\u001B[1;32m 4\u001B[0m trainer \u001B[38;5;241m=\u001B[39m DPOTrainer(\n\u001B[1;32m 5\u001B[0m \u001B[38;5;66;03m# Base model from SageMaker Hub\u001B[39;00m\n\u001B[1;32m 6\u001B[0m model\u001B[38;5;241m=\u001B[39m\u001B[38;5;124m\"\u001B[39m\u001B[38;5;124mmeta-textgeneration-llama-3-2-1b-instruct\u001B[39m\u001B[38;5;124m\"\u001B[39m,\n\u001B[0;32m (...)\u001B[0m\n\u001B[1;32m 28\u001B[0m accept_eula\u001B[38;5;241m=\u001B[39m\u001B[38;5;28;01mTrue\u001B[39;00m\n\u001B[1;32m 29\u001B[0m )\n\u001B[1;32m 31\u001B[0m \u001B[38;5;66;03m# Customize training hyperparameters\u001B[39;00m\n\u001B[1;32m 32\u001B[0m \u001B[38;5;66;03m# DPO-specific parameters are automatically loaded from the model's recipe\u001B[39;00m\n",
176+
"\u001B[0;31mNameError\u001B[0m: name 'DataSet' is not defined"
177+
]
178+
}
179+
],
180+
"execution_count": 1
164181
},
165182
{
166183
"cell_type": "code",

0 commit comments

Comments
 (0)