FlaggingCallback
Methods
setup
Sequence[Component]
required
Set of components that will provide flagged data.
str
required
A string containing the path to the directory where the flagging file should be stored.
flag
list[Any]
required
The data to be flagged.
str | None
default:"None"
In the case that flagging_options are provided, the flag option that is being used.
str | None
default:"None"
The username of the user that is flagging the data, if logged in.
int
The total number of samples that have been flagged.
SimpleCSVLogger
Example
ClassicCSVLogger
Parameters
bool
default:"True"
If True, the file data will be simplified before being written to the CSV file.
Example
CSVLogger
Parameters
bool
default:"True"
If True, the file data will be simplified before being written to the CSV file. If CSVLogger is being used to cache examples, this is set to False to preserve the original FileData class.
bool
default:"True"
If True, prints messages to the console about the dataset file creation.
str | None
default:"None"
The name of the dataset file to be created (should end in “.csv”). If None, the dataset file will be named “dataset1.csv” or the next available number.
Example
ChatCSVLogger
Methods
setup
str
required
Path to the directory where flagged data is stored.
flag
LikeData
required
The like/dislike data from the event.
list
required
The chat messages.
FlagMethod
Constructor
FlaggingCallback
required
The flagging callback to use.
str
required
The label for the flag button.
str | None
required
The value associated with this flag option.
bool
default:"True"
Whether to provide visual feedback when the flag button is clicked.