bytedance / bytedance/FullStackBench

Confusion about evaluation datasets

Offen
#3 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Python
Sterne
121
Forks
10
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

When I was looking at the evaluation questions, I found that some PHP questions required the code to be converted into PHP, but the reference code provided was already PHP. Is this intentionally designed to test the model copying ability or is it a design error?

Two examples are as follows:
```
"content": "Please convert the following code to PHP, with the function signature `function order_by_points($nums)`\nNote:\n1. Only implement the target function and import necessary packages, do not generate other code\n\n```php\n\nfunction order_by_points($nums) {\n \n function digits_sum($n) {\n $neg = 1;\n if ($n < 0) {\n $n = -1 * $n;\n $neg = -1;\n }\n $n = array_map('intval', str_split($n));\n $n[0] = $n[0] * $neg;\n return array_sum($n);\n }\n usort($nums, function($a, $b) {\n return digits_sum($a) <=> digits_sum($b);\n });\n return $nums;\n}\n\n```",
"id": 297,

"content": "Please convert the following code to PHP, with the function signature `function do_algebra($operator, $operand)`. Note: Only implement the target function and import necessary packages, do not generate other code.\n\n```php\n\nfunction do_algebra($operator, $operand) {\n\n $expression = strval($operand[0]);\n foreach (array_combine($operator, array_slice($operand, 1)) as $oprt => $oprn) {\n $expression .= $oprt . strval($oprn);\n }\n return eval('return '.$expression.';');\n}\n\n```",
"id": 298,
```

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.