Open RyanMarten opened 1 week ago
This happened on a large scale job with 1M responses... one of them must be funky
Do
try:
writer.write(row)
except TypeError as e:
import pdb; pdb.set_trace()
{'conversations': [{'from': 'system', 'value': 'You are an AI assistant. User will you give you a task. Your goal is to complete the task as faithfully as you can. While performing the task think step-by-step and justify your steps.', 'weight': None}, {'from': 'human', 'value': 'Based on this review, would the user recommend this product? === Review: PIG DESTROYER - Terrifyer-This is some dark, twisted and evil music... yet I can\'t help but love it! PxDx is a 3 piece grind band that fuses many influences and has a sound so thick that it would consume many 5 pieces in their entirety. The blister guitar work of Scott Hull drives the charge while the rhythmically precise drumming of Brian Harvey holds it together. J.R. Hayes, who has my vote for the craziest lyricist vocalist since Today is the Day\'s Steve Austin, is in charge on the mic, pushing chaotic extreme vocals to new levels with a voice which is brutal yet still (at times) audible.So what you ask does PxDx sound like you might ask?Devastation! Destruction! Insanity! Chaos! Violence! The Apocalypse!........For extreme metal fans only, this is a treat for the ears.Favorite Songs: Thumbsucker, Gravedancer, Carrion Fairy, Towering Flesh, and The Gentleman.-4.5 StarsIF YOU LIKED, AGREED OR APPRECIATED THIS. PLEASE CLICK YES FOR:"Was this review helpful?" Answer:\nChoose your answer from: i. No ii. Yes\nAnswer:', 'weight': 0.0}, {'from': 'gpt', 'value': 'ii. Yes', 'weight': 1.0}], 'instruction': 'Based on this review, would the user recommend this product? === Review: PIG DESTROYER - Terrifyer-This is some dark, twisted and evil music... yet I can\'t help but love it! PxDx is a 3 piece grind band that fuses many influences and has a sound so thick that it would consume many 5 pieces in their entirety. The blister guitar work of Scott Hull drives the charge while the rhythmically precise drumming of Brian Harvey holds it together. J.R. Hayes, who has my vote for the craziest lyricist vocalist since Today is the Day\'s Steve Austin, is in charge on the mic, pushing chaotic extreme vocals to new levels with a voice which is brutal yet still (at times) audible.So what you ask does PxDx sound like you might ask?Devastation! Destruction! Insanity! Chaos! Violence! The Apocalypse!........For extreme metal fans only, this is a treat for the ears.Favorite Songs: Thumbsucker, Gravedancer, Carrion Fairy, Towering Flesh, and The Gentleman.-4.5 StarsIF YOU LIKED, AGREED OR APPRECIATED THIS. PLEASE CLICK YES FOR:"Was this review helpful?" Answer:\nChoose your answer from: i. No ii. Yes\nAnswer:', 'response': 'ii. Yes', 'model_response': 'ii. Yes'}
It actually has to do with the weight
field being None here.
Fast solution is to drop the conversations
column before processing. However we should add error handling for this and print out the type error with a helpful message
There might also be a way to more intelligently cast the value