mirror of
https://github.com/james-m-jordan/openai-cookbook.git
synced 2025-05-09 19:32:38 +00:00
Fix error and enhance multiclass classification notebook (#801)
This commit is contained in:
parent
683e5f5a71
commit
73307542dd
@ -30,7 +30,8 @@
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"%load_ext autoreload\n",
|
||||
"%autoreload "
|
||||
"%autoreload \n",
|
||||
"%pip install openai 'openai[datalib]' 'openai[embeddings]' transformers"
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -1690,7 +1691,7 @@
|
||||
"source": [
|
||||
"# This functions checks that your classes all appear in both prepared files\n",
|
||||
"# If they don't, the fine-tuned model creation will fail\n",
|
||||
"check_classes('transactions_grouped_prepared_train.jsonl','transactions_grouped_prepared_valid.jsonl')"
|
||||
"check_finetune_classes('transactions_grouped_prepared_train.jsonl','transactions_grouped_prepared_valid.jsonl')"
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -1700,7 +1701,10 @@
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"# This step creates your model\n",
|
||||
"!openai api fine_tunes.create -t \"transactions_grouped_prepared_train.jsonl\" -v \"transactions_grouped_prepared_valid.jsonl\" --compute_classification_metrics --classification_n_classes 5 -m curie"
|
||||
"!openai api fine_tunes.create -t \"transactions_grouped_prepared_train.jsonl\" -v \"transactions_grouped_prepared_valid.jsonl\" --compute_classification_metrics --classification_n_classes 5 -m curie\n",
|
||||
"\n",
|
||||
"# You can use following command to get fine tuning job status and model name, replace the job name with your job\n",
|
||||
"#!openai api fine_tunes.get -i ft-YBIc01t4hxYBC7I5qhRF3Qdx"
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -2199,7 +2203,7 @@
|
||||
"name": "python",
|
||||
"nbconvert_exporter": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"version": "3.7.7"
|
||||
"version": "3.10.8"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
|
Loading…
x
Reference in New Issue
Block a user