Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix error and enhance multiclass classification notebook #801

Merged
merged 2 commits into from
Oct 31, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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