bytedance / bytedance/FullStackBench

Confusion about evaluation datasets

Aperta
#3 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Python
Stelle
121
Fork
10
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

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,
```

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.