Skip to content

Commit

Permalink
Fix error and enhance multiclass classification notebook (#801)
Browse files Browse the repository at this point in the history
  • Loading branch information
sh1nj1 authored and colin-openai committed Nov 12, 2023
1 parent 6720ab3 commit c4a3701
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions examples/Multiclass_classification_for_transactions.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@
"outputs": [],
"source": [
"%load_ext autoreload\n",
"%autoreload "
"%autoreload \n",
"%pip install openai 'openai[datalib]' 'openai[embeddings]' transformers"
]
},
{
Expand Down Expand Up @@ -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')"
]
},
{
Expand All @@ -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"
]
},
{
Expand Down Expand Up @@ -2199,7 +2203,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.7"
"version": "3.10.8"
}
},
"nbformat": 4,
Expand Down

0 comments on commit c4a3701

Please sign in to comment.