-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: chat system role support (#790)
- Loading branch information
Elliott
authored
Nov 7, 2023
1 parent
00a59d0
commit c2bc78d
Showing
6 changed files
with
110 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,7 +31,7 @@ | |
""" | ||
|
||
|
||
__version__ = "1.2.0" | ||
__version__ = "1.2.1" | ||
|
||
import sys | ||
from typing import Any, List, Optional | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"import os\n", | ||
"\n", | ||
"os.environ['GALILEO_CONSOLE_URL']=\"\"\n", | ||
"os.environ[\"GALILEO_USERNAME\"]=\"\"\n", | ||
"os.environ[\"GALILEO_PASSWORD\"]=\"\"\n", | ||
"\n", | ||
"import dataquality as dq\n", | ||
"dq.configure()" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"from dataquality.integrations.seq2seq.auto import auto\n", | ||
"from dataquality.integrations.seq2seq.formatters.chat import ChatHistoryFormatter\n", | ||
"from dataquality.integrations.seq2seq.schema import Seq2SeqDatasetConfig, Seq2SeqGenerationConfig, Seq2SeqTrainingConfig\n", | ||
"\n", | ||
"chf = ChatHistoryFormatter(\n", | ||
" assistant=\"Chatbot\"\n", | ||
")\n", | ||
"\n", | ||
"dataset_config = Seq2SeqDatasetConfig(\n", | ||
" train_path=\"./chats_with_system_role.jsonl\",\n", | ||
" input_col=\"input\",\n", | ||
" target_col=\"target\",\n", | ||
" formatter=chf,\n", | ||
")\n", | ||
"gen_config = Seq2SeqGenerationConfig(\n", | ||
" generation_splits=[]\n", | ||
")\n", | ||
"tr_config = Seq2SeqTrainingConfig(\n", | ||
" max_target_tokens=256,\n", | ||
" epochs=0\n", | ||
")\n", | ||
"\n", | ||
"auto(project_name=\"auto_s2s\", run_name=\"my_run_name\", dataset_config=dataset_config, generation_config=gen_config, training_config=tr_config)" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [] | ||
} | ||
], | ||
"metadata": { | ||
"kernelspec": { | ||
"display_name": ".venv", | ||
"language": "python", | ||
"name": "python3" | ||
}, | ||
"language_info": { | ||
"codemirror_mode": { | ||
"name": "ipython", | ||
"version": 3 | ||
}, | ||
"file_extension": ".py", | ||
"mimetype": "text/x-python", | ||
"name": "python", | ||
"nbconvert_exporter": "python", | ||
"pygments_lexer": "ipython3", | ||
"version": "3.9.6" | ||
}, | ||
"orig_nbformat": 4 | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 2 | ||
} |