Spaces:
Runtime error
Runtime error
fix metadata
Browse files- codebleu.py +6 -14
codebleu.py
CHANGED
|
@@ -79,21 +79,17 @@ class codebleu(evaluate.Metric):
|
|
| 79 |
"""CodeBLEU metric from CodexGLUE"""
|
| 80 |
|
| 81 |
def _info(self):
|
| 82 |
-
# TODO: Specifies the evaluate.EvaluationModuleInfo object
|
| 83 |
return evaluate.MetricInfo(
|
| 84 |
-
# This is the description that will appear on the modules page.
|
| 85 |
-
module_type="metric",
|
| 86 |
description=_DESCRIPTION,
|
| 87 |
citation=_CITATION,
|
| 88 |
inputs_description=_KWARGS_DESCRIPTION,
|
| 89 |
-
# This defines the format of each prediction and reference
|
| 90 |
features=[
|
| 91 |
-
datasets.Features(
|
| 92 |
-
|
| 93 |
-
|
| 94 |
-
|
| 95 |
-
|
| 96 |
-
),
|
| 97 |
datasets.Features(
|
| 98 |
{
|
| 99 |
"predictions": datasets.Value("string", id="sequence"),
|
|
@@ -101,10 +97,6 @@ class codebleu(evaluate.Metric):
|
|
| 101 |
}
|
| 102 |
),
|
| 103 |
],
|
| 104 |
-
# Homepage of the module for documentation
|
| 105 |
-
homepage="",
|
| 106 |
-
# Additional links to the codebase or references
|
| 107 |
-
codebase_urls=[],
|
| 108 |
reference_urls=[
|
| 109 |
"https://github.com/microsoft/CodeXGLUE/tree/main/Code-Code/code-to-code-trans/evaluator",
|
| 110 |
"https://arxiv.org/abs/2009.10297",
|
|
|
|
| 79 |
"""CodeBLEU metric from CodexGLUE"""
|
| 80 |
|
| 81 |
def _info(self):
|
|
|
|
| 82 |
return evaluate.MetricInfo(
|
|
|
|
|
|
|
| 83 |
description=_DESCRIPTION,
|
| 84 |
citation=_CITATION,
|
| 85 |
inputs_description=_KWARGS_DESCRIPTION,
|
|
|
|
| 86 |
features=[
|
| 87 |
+
# datasets.Features(
|
| 88 |
+
# {
|
| 89 |
+
# "predictions": datasets.Value("string", id="sequence"),
|
| 90 |
+
# "references": datasets.Sequence(datasets.Value("string", id="sequence"), id="references"),
|
| 91 |
+
# }
|
| 92 |
+
# ),
|
| 93 |
datasets.Features(
|
| 94 |
{
|
| 95 |
"predictions": datasets.Value("string", id="sequence"),
|
|
|
|
| 97 |
}
|
| 98 |
),
|
| 99 |
],
|
|
|
|
|
|
|
|
|
|
|
|
|
| 100 |
reference_urls=[
|
| 101 |
"https://github.com/microsoft/CodeXGLUE/tree/main/Code-Code/code-to-code-trans/evaluator",
|
| 102 |
"https://arxiv.org/abs/2009.10297",
|