-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: add chat schema * Update __init__.py add whitespace at EoF * Update chat.py change the `role` field schema from ClassLabel to string
- Loading branch information
1 parent
4003dc0
commit 0665774
Showing
3 changed files
with
30 additions
and
0 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
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,24 @@ | ||
""" | ||
Conversational Chat Schema | ||
""" | ||
import datasets | ||
|
||
features = datasets.Features( | ||
{ | ||
"id": datasets.Value("string"), | ||
"input": datasets.Sequence({ | ||
"role": datasets.Value("string"), | ||
"content": datasets.Value("string"), | ||
}), | ||
"output": datasets.Value("string"), | ||
|
||
# the schema of 'meta' aren't specified either to allow some flexibility | ||
"meta": {} | ||
|
||
# notes on how to use this field of 'meta' | ||
# you can choose two of options: | ||
# 1. defining as empty dict if you don't think it's usable in `_generate_examples`, or | ||
# 2. defining meta as dict of key with intended colname meta and its val with dataset.Features class | ||
# in `_info` Dataloader method then populate it with the values in `_general_examples` Dataloader method | ||
} | ||
) |