-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
30a7a69
commit efa8d51
Showing
4 changed files
with
53 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
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.ClassLabel(names=["system", "user", "assistant"]), | ||
"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 | ||
} | ||
) |