Skip to content

Commit 7d2cd6b

Browse files
lkk12014402rootpre-commit-ci[bot]
authored
update finetuning doc (#615)
* revert code because of overwriting by other pr. * update finetuning doc. --------- Co-authored-by: root <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent f4d123c commit 7d2cd6b

File tree

6 files changed

+4
-79
lines changed

6 files changed

+4
-79
lines changed

comps/finetuning/README.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -92,12 +92,10 @@ Assuming a training file `alpaca_data.json` is uploaded, it can be downloaded in
9292

9393
```bash
9494
# upload a training file
95-
9695
curl http://${your_ip}:8015/v1/files -X POST -H "Content-Type: multipart/form-data" -F "file=@./alpaca_data.json" -F purpose="fine-tune"
9796

9897
# create a finetuning job
9998
curl http://${your_ip}:8015/v1/fine_tuning/jobs \
100-
10199
-X POST \
102100
-H "Content-Type: application/json" \
103101
-d '{
@@ -106,17 +104,13 @@ curl http://${your_ip}:8015/v1/fine_tuning/jobs \
106104
}'
107105

108106
# list finetuning jobs
109-
110107
curl http://${your_ip}:8015/v1/fine_tuning/jobs -X GET
111108

112109
# retrieve one finetuning job
113110
curl http://localhost:8015/v1/fine_tuning/jobs/retrieve -X POST -H "Content-Type: application/json" -d '{
114-
115111
"fine_tuning_job_id": ${fine_tuning_job_id}}'
116112

117113
# cancel one finetuning job
118-
119-
120114
curl http://localhost:8015/v1/fine_tuning/jobs/cancel -X POST -H "Content-Type: application/json" -d '{
121115
"fine_tuning_job_id": ${fine_tuning_job_id}}'
122116

@@ -125,3 +119,7 @@ curl http://${your_ip}:8015/v1/finetune/list_checkpoints -X POST -H "Content-Typ
125119

126120

127121
```
122+
123+
# 🚀4. Descriptions for Finetuning parameters
124+
125+
We utilize [OpenAI finetuning parameters](https://platform.openai.com/docs/api-reference/fine-tuning) and extend it with more customizable parameters.

comps/finetuning/datasets/.gitkeep

Whitespace-only changes.

comps/finetuning/handlers.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,7 @@ def update_job_status(job_id: FineTuningJobID):
5454
status = str(job_status).lower()
5555
# Ray status "stopped" is OpenAI status "cancelled"
5656
status = "cancelled" if status == "stopped" else status
57-
5857
logger.info(f"Status of job {job_id} is '{status}'")
59-
6058
running_finetuning_jobs[job_id].status = status
6159
if status == "finished" or status == "cancelled" or status == "failed":
6260
break
@@ -102,7 +100,6 @@ def handle_create_finetuning_jobs(request: FineTuningParams, background_tasks: B
102100
)
103101
finetune_config.General.output_dir = os.path.join(OUTPUT_DIR, job.id)
104102
if os.getenv("DEVICE", ""):
105-
106103
logger.info(f"specific device: {os.getenv('DEVICE')}")
107104

108105
finetune_config.Training.device = os.getenv("DEVICE")
@@ -176,9 +173,7 @@ async def save_content_to_local_disk(save_path: str, content):
176173
content = await content.read()
177174
fout.write(content)
178175
except Exception as e:
179-
180176
logger.info(f"Write file failed. Exception: {e}")
181-
182177
raise Exception(status_code=500, detail=f"Write file {save_path} failed. Exception: {e}")
183178

184179

comps/finetuning/jobs/.gitkeep

Whitespace-only changes.

comps/finetuning/lanuch.sh

Lines changed: 0 additions & 12 deletions
This file was deleted.

comps/finetuning/llm_on_ray/common/logging.py

Lines changed: 0 additions & 56 deletions
This file was deleted.

0 commit comments

Comments
 (0)