Spaces:
Runtime error
Runtime error
github-actions
commited on
Commit
·
22fbc77
1
Parent(s):
594067e
Auto files update [0.2.1]
Browse files- codebleu.py +3 -5
- requirements.txt +1 -1
codebleu.py
CHANGED
|
@@ -30,9 +30,7 @@ _CITATION = """\
|
|
| 30 |
"""
|
| 31 |
|
| 32 |
_DESCRIPTION = """\
|
| 33 |
-
Unofficial `CodeBLEU` implementation
|
| 34 |
-
|
| 35 |
-
Based on original [CodeXGLUE/CodeBLEU](https://github.com/microsoft/CodeXGLUE/tree/main/Code-Code/code-to-code-trans/evaluator/CodeBLEU) code -- refactored, build for macos, tested and fixed multiple crutches to make it more usable.
|
| 36 |
"""
|
| 37 |
|
| 38 |
|
|
@@ -79,7 +77,7 @@ class codebleu(evaluate.Metric):
|
|
| 79 |
{
|
| 80 |
"predictions": datasets.Value("string", id="sequence"),
|
| 81 |
"references": datasets.Sequence(datasets.Value("string", id="sequence"), id="references"),
|
| 82 |
-
|
| 83 |
# "weights": datasets.Value("string"),
|
| 84 |
# "tokenizer": datasets.Value("string"),
|
| 85 |
}
|
|
@@ -88,7 +86,7 @@ class codebleu(evaluate.Metric):
|
|
| 88 |
{
|
| 89 |
"predictions": datasets.Value("string", id="sequence"),
|
| 90 |
"references": datasets.Value("string", id="sequence"),
|
| 91 |
-
|
| 92 |
# "weights": datasets.Value("string"),
|
| 93 |
# "tokenizer": datasets.Value("string"),
|
| 94 |
}
|
|
|
|
| 30 |
"""
|
| 31 |
|
| 32 |
_DESCRIPTION = """\
|
| 33 |
+
Unofficial `CodeBLEU` implementation that supports Linux and MacOS.
|
|
|
|
|
|
|
| 34 |
"""
|
| 35 |
|
| 36 |
|
|
|
|
| 77 |
{
|
| 78 |
"predictions": datasets.Value("string", id="sequence"),
|
| 79 |
"references": datasets.Sequence(datasets.Value("string", id="sequence"), id="references"),
|
| 80 |
+
"lang": datasets.Value("string"),
|
| 81 |
# "weights": datasets.Value("string"),
|
| 82 |
# "tokenizer": datasets.Value("string"),
|
| 83 |
}
|
|
|
|
| 86 |
{
|
| 87 |
"predictions": datasets.Value("string", id="sequence"),
|
| 88 |
"references": datasets.Value("string", id="sequence"),
|
| 89 |
+
"lang": datasets.Value("string"),
|
| 90 |
# "weights": datasets.Value("string"),
|
| 91 |
# "tokenizer": datasets.Value("string"),
|
| 92 |
}
|
requirements.txt
CHANGED
|
@@ -1,2 +1,2 @@
|
|
| 1 |
git+https://github.com/huggingface/evaluate@main
|
| 2 |
-
codebleu>=0.
|
|
|
|
| 1 |
git+https://github.com/huggingface/evaluate@main
|
| 2 |
+
codebleu>=0.2.0,<1.0.0
|