Configurators
Modules:
Name | Description |
---|---|
evaluator_configurator |
|
evaluators |
|
Classes:
Name | Description |
---|---|
ConfiguratorInput |
A typed dictionary for the input fields of the configurator widget. |
EvaluatorConfigurator |
A protocol for configuring evaluators. |
EvaluatorConfiguratorRegistry |
A registry for evaluator configurators. |
Functions:
Name | Description |
---|---|
configurator |
Decorator to register an evaluator configurator. |
ConfiguratorInput
Bases: TypedDict
A typed dictionary for the input fields of the configurator widget.
Attributes:
Name | Type | Description |
---|---|---|
input_name |
str
|
The name of the input field. |
component |
Block
|
The Gradio component for the input field. |
parser |
Callable
|
A callable to parse the input value. |
Source code in evalsense/webui/configurators/evaluator_configurator.py
EvaluatorConfigurator
Bases: Protocol
A protocol for configuring evaluators.
Attributes:
Name | Type | Description |
---|---|---|
name |
str
|
The string ID of the evaluator. A class attribute. |
Methods:
Name | Description |
---|---|
create |
Create a configurator for the specified evaluator. |
input_widget |
Constructs the configurator widget. |
instantiate_evaluator |
Instantiates the evaluator according to the specified configuration. |
Source code in evalsense/webui/configurators/evaluator_configurator.py
create
classmethod
Create a configurator for the specified evaluator.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name
|
str
|
The name of the evaluator for which the configurator should be created. |
required |
Returns:
Name | Type | Description |
---|---|---|
EvaluatorConfigurator |
EvaluatorConfigurator
|
The created evaluator configurator instance. |
Source code in evalsense/webui/configurators/evaluator_configurator.py
input_widget
abstractmethod
Constructs the configurator widget.
Returns:
Type | Description |
---|---|
list[ConfiguratorInput]
|
list[ConfiguratorInput]: The input fields for the configurator widget. |
instantiate_evaluator
abstractmethod
Instantiates the evaluator according to the specified configuration.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
**kwargs
|
dict
|
The keyword arguments specifying evaluator configuration. |
{}
|
Returns:
Name | Type | Description |
---|---|---|
Evaluator |
Evaluator
|
The instantiated evaluator. |
Source code in evalsense/webui/configurators/evaluator_configurator.py
EvaluatorConfiguratorRegistry
A registry for evaluator configurators.
Methods:
Name | Description |
---|---|
get |
Get an evaluator configurator by name. |
register |
Register a new evaluator configurator. |
Source code in evalsense/webui/configurators/evaluator_configurator.py
get
classmethod
Get an evaluator configurator by name.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name
|
str
|
The name of the evaluator configurator to retrieve. |
required |
Returns:
Type | Description |
---|---|
Type[EvaluatorConfigurator]
|
Type["EvaluatorConfigurator"]: The requested evaluator configurator. |
Source code in evalsense/webui/configurators/evaluator_configurator.py
register
classmethod
Register a new evaluator configurator.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
configurator
|
Type[EvaluatorConfigurator]
|
The evaluator configurator to register. |
required |
Source code in evalsense/webui/configurators/evaluator_configurator.py
configurator
Decorator to register an evaluator configurator.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
configurator
|
Type[EvaluatorConfigurator]
|
The evaluator configurator to register. |
required |
Returns:
Type | Description |
---|---|
Type[EvaluatorConfigurator]
|
Type["EvaluatorConfigurator"]: The registered evaluator configurator. |
Source code in evalsense/webui/configurators/evaluator_configurator.py
Evaluators
Module evalsense.webui.configurators.evaluators
.
Modules:
Name | Description |
---|---|
bertscore |
|
bleu |
|
g_eval |
|
rouge |
|
Classes:
Name | Description |
---|---|
BertScoreConfigurator |
Configurator for the BERTScore evaluator. |
BleuConfigurator |
Configurator for the BLEU evaluator. |
GEvalConfigurator |
Configurator for the G-Eval evaluator. |
RougeConfigurator |
Configurator for the ROUGE evaluator. |
BertScoreConfigurator
Bases: EvaluatorConfigurator
Configurator for the BERTScore evaluator.
Methods:
Name | Description |
---|---|
create |
Create a configurator for the specified evaluator. |
input_widget |
Constructs the input widget for BERTScore. |
instantiate_evaluator |
Instantiates the BERTScore evaluator according to the specified configuration. |
Source code in evalsense/webui/configurators/evaluators/bertscore.py
create
classmethod
Create a configurator for the specified evaluator.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name
|
str
|
The name of the evaluator for which the configurator should be created. |
required |
Returns:
Name | Type | Description |
---|---|---|
EvaluatorConfigurator |
EvaluatorConfigurator
|
The created evaluator configurator instance. |
Source code in evalsense/webui/configurators/evaluator_configurator.py
input_widget
Constructs the input widget for BERTScore.
Returns:
Type | Description |
---|---|
list[ConfiguratorInput]
|
list[ConfiguratorInput]: The input fields for the configurator widget. |
Source code in evalsense/webui/configurators/evaluators/bertscore.py
instantiate_evaluator
Instantiates the BERTScore evaluator according to the specified configuration.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
**kwargs
|
dict
|
The keyword arguments specifying evaluator configuration. |
{}
|
Returns:
Name | Type | Description |
---|---|---|
Evaluator |
Evaluator
|
The instantiated evaluator. |
Source code in evalsense/webui/configurators/evaluators/bertscore.py
BleuConfigurator
Bases: EvaluatorConfigurator
Configurator for the BLEU evaluator.
Methods:
Name | Description |
---|---|
create |
Create a configurator for the specified evaluator. |
input_widget |
Constructs the input widget for BLEU. |
instantiate_evaluator |
Instantiates the BLEU evaluator according to the specified configuration. |
Source code in evalsense/webui/configurators/evaluators/bleu.py
create
classmethod
Create a configurator for the specified evaluator.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name
|
str
|
The name of the evaluator for which the configurator should be created. |
required |
Returns:
Name | Type | Description |
---|---|---|
EvaluatorConfigurator |
EvaluatorConfigurator
|
The created evaluator configurator instance. |
Source code in evalsense/webui/configurators/evaluator_configurator.py
input_widget
Constructs the input widget for BLEU.
Returns:
Type | Description |
---|---|
list[ConfiguratorInput]
|
list[ConfiguratorInput]: The input fields for the configurator widget. |
Source code in evalsense/webui/configurators/evaluators/bleu.py
instantiate_evaluator
Instantiates the BLEU evaluator according to the specified configuration.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
**kwargs
|
dict
|
The keyword arguments specifying evaluator configuration. |
{}
|
Returns:
Name | Type | Description |
---|---|---|
Evaluator |
Evaluator
|
The instantiated evaluator. |
Source code in evalsense/webui/configurators/evaluators/bleu.py
GEvalConfigurator
Bases: EvaluatorConfigurator
Configurator for the G-Eval evaluator.
Methods:
Name | Description |
---|---|
create |
Create a configurator for the specified evaluator. |
input_widget |
Constructs the input widget for G-Eval. |
instantiate_evaluator |
Instantiates the BERTScore evaluator according to the specified configuration. |
Source code in evalsense/webui/configurators/evaluators/g_eval.py
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 |
|
create
classmethod
Create a configurator for the specified evaluator.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name
|
str
|
The name of the evaluator for which the configurator should be created. |
required |
Returns:
Name | Type | Description |
---|---|---|
EvaluatorConfigurator |
EvaluatorConfigurator
|
The created evaluator configurator instance. |
Source code in evalsense/webui/configurators/evaluator_configurator.py
input_widget
Constructs the input widget for G-Eval.
Returns:
Type | Description |
---|---|
list[ConfiguratorInput]
|
list[ConfiguratorInput]: The input fields for the configurator widget. |
Source code in evalsense/webui/configurators/evaluators/g_eval.py
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 |
|
instantiate_evaluator
Instantiates the BERTScore evaluator according to the specified configuration.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
**kwargs
|
dict
|
The keyword arguments specifying evaluator configuration. |
{}
|
Returns:
Name | Type | Description |
---|---|---|
Evaluator |
Evaluator
|
The instantiated evaluator. |
Source code in evalsense/webui/configurators/evaluators/g_eval.py
RougeConfigurator
Bases: EvaluatorConfigurator
Configurator for the ROUGE evaluator.
Methods:
Name | Description |
---|---|
create |
Create a configurator for the specified evaluator. |
input_widget |
Constructs the input widget for ROUGE. |
instantiate_evaluator |
Instantiates the ROUGE evaluator according to the specified configuration. |
Source code in evalsense/webui/configurators/evaluators/rouge.py
create
classmethod
Create a configurator for the specified evaluator.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name
|
str
|
The name of the evaluator for which the configurator should be created. |
required |
Returns:
Name | Type | Description |
---|---|---|
EvaluatorConfigurator |
EvaluatorConfigurator
|
The created evaluator configurator instance. |
Source code in evalsense/webui/configurators/evaluator_configurator.py
input_widget
Constructs the input widget for ROUGE.
Returns:
Type | Description |
---|---|
list[ConfiguratorInput]
|
list[ConfiguratorInput]: The input fields for the configurator widget. |
Source code in evalsense/webui/configurators/evaluators/rouge.py
instantiate_evaluator
Instantiates the ROUGE evaluator according to the specified configuration.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
**kwargs
|
dict
|
The keyword arguments specifying evaluator configuration. |
{}
|
Returns:
Name | Type | Description |
---|---|---|
Evaluator |
Evaluator
|
The instantiated evaluator. |