Open valerybugakov opened 8 months ago
@valerybugakov Can you log one of the exact prompt this happens? I tried to reproduce it via the Fireworks API playground directly where the issue does not seem to occur 🤔
The prompt I used for this test was only:
<filename>test.ts <fim_prefix>function myFunction(flag: boolean) { if <fim_suffix>} } <fim_middle>
(It also works if I remove the space between if
and <fim_suffix>
I got an even worse variation of this just now:
Is it a strong Python influence from the training dataset? 🤔
@valerybugakov Possible, yeah. The prompt is also very short, maybe it doesn't know it's in a TS file example yet 😓
I had the same behavior in bigger TS files. I am going to monitor it and share examples here.
@valerybugakov and @philipp-spiess can you help me understand what the user impact is here?
I set the priority to P2 because this behavior is inconsistent. Sometimes StarCoder generates incorrect syntax for if statements in Javascript and Typescript:
// StarCoder completion
if value && anotherValue {
// Valid syntax
if (value && anotherValue) {
This issue is marked as stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed automatically in 5 days.
Tested on starcoder-16b. It consistently completes
if █
string incorrectly without parentheses around a condition:This behavior is so consistent that we might want to handle it on the client side manually.