Skip to content

Commit 21035cd

Browse files
committed
docs: updates to absolute path following comments
1 parent 52c27ab commit 21035cd

3 files changed

Lines changed: 9 additions & 9 deletions

File tree

examples/fine-tuning/lora/lora_sft-distributed.ipynb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@
215215
"print(f\"Training examples: {len(train_data)}\")\n",
216216
"\n",
217217
"# Save training data to JSONL format\n",
218-
"OUTPUT_DIR = Path(f\"{PVC_PATH}/lora_text_sql_output\")\n",
218+
"OUTPUT_DIR = Path(f\"/opt/app-root/src/{PVC_PATH}/lora_text_sql_output\")\n",
219219
"OUTPUT_DIR.mkdir(parents=True, exist_ok=True)\n",
220220
"\n",
221221
"training_file = OUTPUT_DIR / \"train_data.jsonl\"\n",
@@ -227,7 +227,7 @@
227227
"print(f\"Training data saved to: {training_file}\")\n",
228228
"print(f\"File size: {training_file.stat().st_size / 1024:.1f} KB\")\n",
229229
"\n",
230-
"data_path = f\"{PVC_PATH}/lora_text_sql_output/train_data.jsonl\"\n",
230+
"data_path = f\"/opt/app-root/src/{PVC_PATH}/lora_text_sql_output/train_data.jsonl\"\n",
231231
"print(data_path)"
232232
],
233233
"execution_count": null,
@@ -473,7 +473,7 @@
473473
"\n",
474474
"import torch\n",
475475
"\n",
476-
"CHECKPOINTS_DIR = f\"{PVC_PATH}/checkpoints\"\n",
476+
"CHECKPOINTS_DIR = f\"/opt/app-root/src/{PVC_PATH}/checkpoints\"\n",
477477
"checkpoint_dirs = sorted(\n",
478478
" glob.glob(os.path.join(CHECKPOINTS_DIR, \"checkpoint-*\")), key=os.path.getctime\n",
479479
")\n",

examples/fine-tuning/osft/osft-distributed.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@
354354
"print(f\"Subset size: {len(subset_data)}\")\n",
355355
"\n",
356356
"# Define the output file path\n",
357-
"output_dir = f\"{PVC_PATH}/table-gpt-data/train\"\n",
357+
"output_dir = f\"/opt/app-root/src/{PVC_PATH}/table-gpt-data/train\"\n",
358358
"output_file = f\"{output_dir}/train_All_5000.jsonl\"\n",
359359
"\n",
360360
"# Save the subset to a JSONL file\n",

examples/fine-tuning/sft/sft-distributed.ipynb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -258,16 +258,16 @@
258258
"\n",
259259
"# Save the subset to a JSONL file\n",
260260
"\n",
261-
"os.makedirs(\"/opt/app-root/src/shared/table-gpt-data/train\", exist_ok=True)\n",
261+
"os.makedirs(f\"/opt/app-root/src/{PVC_PATH}/table-gpt-data/train\", exist_ok=True)\n",
262262
"\n",
263263
"with open(\n",
264-
" \"/opt/app-root/src/shared/table-gpt-data/train/train_All_5000.jsonl\", \"w\"\n",
264+
" f\"/opt/app-root/src/{PVC_PATH}/table-gpt-data/train/train_All_5000.jsonl\", \"w\"\n",
265265
") as f:\n",
266266
" for example in subset_data:\n",
267267
" f.write(json.dumps(example) + \"\\n\")\n",
268268
"\n",
269269
"print(\n",
270-
" \"Subset saved to /opt/app-root/src/shared/table-gpt-data/train/train_All_5000.jsonl\"\n",
270+
" f\"Subset saved to /opt/app-root/src/{PVC_PATH}/table-gpt-data/train/train_All_5000.jsonl\"\n",
271271
")"
272272
],
273273
"execution_count": null,
@@ -280,7 +280,7 @@
280280
"source": [
281281
"## Downloading the Qwen2.5-1.5B model\n",
282282
"\n",
283-
"We need to download a copy of the model to the shared storage directory in `/opt/app-root/src/shared/`. We can do this with the `hf` CLI. "
283+
"We need to download a copy of the model to the shared storage directory. We can do this with the `hf` CLI. "
284284
],
285285
"id": "774c386d-94e9-4b1c-a084-2c6a51f63fce"
286286
},
@@ -393,7 +393,7 @@
393393
"source": [
394394
"model_path = download_model_snapshot(\n",
395395
" model_id=\"Qwen/Qwen2.5-1.5B-Instruct\",\n",
396-
" output_dir=\"/opt/app-root/src/shared/Qwen/Qwen2.5-1.5B-Instruct\",\n",
396+
" output_dir=f\"/opt/app-root/src/{PVC_PATH}/Qwen/Qwen2.5-1.5B-Instruct\",\n",
397397
" token=\"\",\n",
398398
")"
399399
],

0 commit comments

Comments
 (0)