
    h7                         S SK JrJr  S SKJr  S SKJr  \ " S S5      5       rS r\	S:X  aD  \" \5      r
\
R                  5       S    r\" \R                  \R                  \R                  5        gg)	    )	dataclassfield)Dataset)HfArgumentParserc                   n    \ rS rSr% Sr\" SSS0S9r\\S'   \" SSS	0S9r	\
\S
'   \" SSS0S9r\\S'   Srg)ScriptArguments   a  
Arguments for the script.

Args:
    test_size (`float`, *optional*, defaults to `0.1`):
        Fraction of the dataset to include in the test split.
    push_to_hub (`bool`, *optional*, defaults to `False`):
        Whether to push the dataset to the Hugging Face Hub.
    repo_id (`str`, *optional*, defaults to `"trl-internal-testing/harmony"`):
        Hugging Face repository ID to push the dataset to.
g?helpz5Fraction of the dataset to include in the test split.)defaultmetadata	test_sizeFz4Whether to push the dataset to the Hugging Face Hub.push_to_hubztrl-internal-testing/harmonyz2Hugging Face repository ID to push the dataset to.repo_id N)__name__
__module____qualname____firstlineno____doc__r   r   float__annotations__r   boolr   str__static_attributes__r       Z/home/james-whalen/.local/lib/python3.13/site-packages/scripts/generate_harmony_dataset.pyr   r      sd    
 QRIu  PQK  .NOGS r   r   c                    [         R                  " SSS.SSSS./SSS.SS	S
S./SSS.SSSS./SSS.SSSS./SSS.SSSS./SSS.SSSS./SSS.SSSS./SSS.SSSS./SSS.SSSS./SS S.SS!S"S./SS#S.SS$S%S./SS&S.SS'S(S./SS)S.SS*S+S./SS,S.SS-S.S./SS/S.SS0S1S./SS2S.SS3S4S./SS5S.SS6S7S./SS8S.SS9S:S./SS;S.SS<S=S.//S>S?S@.SAS?S@.SBS?S@.S>S?S@.SAS?S@.SBS?S@.S>S?S@.SAS?S@.SBS?S@.S>S?S@.SAS?S@.SBS?S@.S>S?S@.SAS?S@.SBS?S@.S>S?S@.SAS?S@.SBS?S@.S>S?S@./SC.5      nUR                  U SDSE9nU(       a  UR                  USFSG9  UR	                  USH-   5        [         R                  " SSS./SSS./SSS./SSS./SSS./SSS./SSS./SSS./SSS./SS S./SS#S./SS&S./SS)S./SS,S./SS/S./SS2S./SS5S./SS8S./SS;S.//SSSS./SS	S
S./SSSS./SSSS./SSSS./SSSS./SSSS./SSSS./SSSS./SS!S"S./SS$S%S./SS'S(S./SS*S+S./SS-S.S./SS0S1S./SS3S4S./SS6S7S./SS9S:S./SS<S=S.//S>S?S@.SAS?S@.SBS?S@.S>S?S@.SAS?S@.SBS?S@.S>S?S@.SAS?S@.SBS?S@.S>S?S@.SAS?S@.SBS?S@.S>S?S@.SAS?S@.SBS?S@.S>S?S@.SAS?S@.SBS?S@.S>S?S@./SI.5      nUR                  U SDSE9nU(       a  UR                  USJSG9  UR	                  USK-   5        g )LNuserzWhat is better than ugly?)rolecontent	assistantz#Beauty improves clarity and appeal.z
Beautiful.)r   thinkingr    zWhat is better than implicit?zClarity avoids confusion.z	Explicit.zWhat is better than complex?zSimplicity is easier to manage.zSimple.z What is better than complicated?u1   Complexity has structure; complication doesn’t.zComplex.zWhat is better than nested?z#Flat structures are easier to read.zFlat.zWhat is better than dense?zSpacing aids understanding.zSparse.zWhat counts?zReadable code lasts longer.zReadability.z,Are special cases enough to break the rules?zConsistency is more valuable.z;No, special cases aren't special enough to break the rules.zWhat beats purity?z!Real-world needs outweigh ideals.zPracticality.z What should never pass silently?z"Silent errors cause hidden issues.zErrors.zWhen can errors pass silently?zSilence must be intentional.zWhen explicitly silenced.z,What should you do in the face of ambiguity?z Guessing leads to wrong choices.zRefuse the temptation to guess.z'How many ways should there be to do it?zOne way reduces confusion.zOne, and preferably only one.z-For whom may the way not be obvious at first?u$   A playful nod to Python’s creator.zDutch.zWhat is better than never?z$Action is better than endless delay.zNow is better than never.z!Is never better than *right* now?zRushed action can be worse.zYes, often.z;What does it mean if the implementation is hard to explain?zGood ideas should be clear.zIt means it's a bad idea.z;What does it mean if the implementation is easy to explain?zClarity suggests soundness.zIt means it may be a good idea.zAny great ideas?zNamespaces prevent conflicts.z&Namespaces are one honking great idea.lowz,You are Tiny ChatGPT, a tiny language model.)reasoning_effortmodel_identitymediumhigh)messageschat_template_kwargsF)r   shufflelanguage_modeling)config_namez/language_modeling)prompt
completionr)   prompt_completionz/prompt_completion)r   	from_dicttrain_test_splitr   save_to_disk)r   r   r   language_modeling_datasetprompt_completion_datasets        r   mainr5   1   s#    ' 1 1)DEP[  jO  \h  Hi  j)HIT_  nI  Va  Lb  c)GHS^  mN  [d  Ke  f)KLWb  qd  q{  O|  })FGR]  lQ  ^e  Jf  g)EFQ\  kH  U^  I_  `8;\y  GU  ;V  W)WXcn  }\  if  [g  h)=>  cF  Sb  Ac  d)KLWb  qU  bk  Ol  m)IJU`  oM  Zu  Mv  w)WXcn  }_  lM  [N  O)RS^i  xT  a@  VA  B)XYdo  ~d  qy  \z  {)EFQ\  kQ  ^y  Iz  {)LMXc  rO  \i  Pj  k)fgr}  Li  vQ  jR  S)fgr}  Li  vW  jX  Y);<{`  Mu  ?v  w'
, "':hi!)=kl!';ij!&:hi!)=kl!';ij!&:hi!)=kl!';ij!&:hi!)=kl!';ij!&:hi!)=kl!';ij!&:hi!)=kl!';ij!&:hi'!
-+3 +!X !: J JU^hm J n!--gCV-W**75I+IJ ' 1 1)DEF)HIJ)GHI)KLM)FGH)EFG89)WXY)=>?)KLM)IJK)WXY)RST)XYZ)EFG)LMN)fgh)fgh);<='
, "/Tamno!/JWbcd!/P]fgh!/boyz{!/Tahij!/LYbcd!/LYghi!/N  \Y  Z  [!/R_nop!/S`ijk!/MZuvw!/Q^  A  B!/KXwxy!/Ubjkl!/Ub}~!/LYfgh!/LYtuv!/LYz{|!/N  \D  E  F'
, "':hi!)=kl!';ij!&:hi!)=kl!';ij!&:hi!)=kl!';ij!&:hi!)=kl!';ij!&:hi!)=kl!';ij!&:hi!)=kl!';ij!&:hi'!
W@3 @!B !: J JU^hm J n!--gCV-W**75I+IJr   __main__N)dataclassesr   r   datasetsr   transformersr   r   r5   r   parserparse_args_into_dataclassesscript_argsr   r   r   r   r   r   <module>r=      s{    )  )   6vKt zo.F446q9K		 7 79L9LM r   