Ë
    –£§j®  ã                  óØ   — d Z ddlmZ ddlZddlZddlZddlmZ  ee«      j                  «       j                  d   Zdd„Zdd„Zdd„Zdd	„Zdd
„Zdd„Zdd„Zdd„Zedk(  r e«        yy)zRRoot orchestration entry point; preparation scripts remain owned by their authors.é    )ÚannotationsN)ÚPathé   c                 ó"  — t         dz  } | j                  «       st        d«      ‚t        j                  t
        j                  t        | «      dgt         d¬«       t        j                  t
        j                  t        | «      gt         d¬«       y )Nu    ì „ì²˜ë¦¬/visualize_processed.pyuN   Visualization generator is not available yet: ì „ì²˜ë¦¬/visualize_processed.pyú--helpT©ÚcwdÚcheck)ÚROOTÚexistsÚ
SystemExitÚ
subprocessÚrunÚsysÚ
executableÚstr)Úscripts    õ   ì „ì²˜ë¦¬/run_experiments.pyÚrun_visualizer   	   s^   € ÜÐ6Ñ6€FØ�=‰=Œ?ÜÐiÓjÐjÜ‡N�N”C—N‘N¤C¨£K°Ð:ÄÈDÕQÜ‡N�N”C—N‘N¤C¨£KÐ0´dÀ$ÖGó    c                 ó|   — t        j                  t        j                  t	        t
        dz  «      gt
        d¬«       y )Nu   ì „ì²˜ë¦¬/match_targets.pyTr   )r   r   r   r   r   r   © r   r   Úrun_match_targetsr      s(   € Ü‡N�N”C—N‘N¤C¬Ð/KÑ(KÓ$LÐMÔSWÐ_cÖdr   c            
     óh   — t        j                  t        j                  dddddddgt        d¬	«       y )
Nú-mzmodels.train_weak_gnnz--allow-diagnostic-weak-labelsz--epochsÚ400z--learning-ratez0.003Tr   ©r   r   r   r   r   r   r   r   Úrun_weak_gnnr      s3   € Ü‡N�NÜ�‰˜Ð5Ø(¨*°eÐ=NÐPWðô �tör   c                 ó^   — t        j                  t        j                  ddgt        d¬«       y )Nr   zmodels.build_dashboardTr   r   r   r   r   Úrun_model_dashboardr       s   € Ü‡N�N”C—N‘N DÐ*BÐCÌÐUYÖZr   c                 ór   — t        j                  t        j                  ddgt        d¬«       t        «        y )Nr   zmodels.compare_cad_predictionsTr   ©r   r   r   r   r   r    r   r   r   Úrun_cad_prediction_comparisonr#      s&   € Ü‡N�N”C—N‘N DÐ*JÐKÔQUÐ]aÕbÜÕr   c                 ót   — t        j                  t        j                  dddgt        d¬«       t        «        y )Nr   zmodels.attributionsz--buildTr   r"   r   r   r   Úrun_attributionsr%       s(   € Ü‡N�N”C—N‘N DÐ*?ÀÐKÔQUÐ]aÕbÜÕr   c                 ó  — t         dz  t         dz  t         dz  g} | D �cg c]1  }|j                  «       rŒt        |j                  t         «      «      ‘Œ3 }}|rt	        ddj                  |«      z   «      ‚| D ]m  }t        j                  t        j                  t        |«      dgt         d¬«       t        j                  t        j                  t        |«      gt         d¬«       Œo t        «        t        «        y c c}w )	Nu   ì „ì²˜ë¦¬/cad_graphs.pyu   ì „ì²˜ë¦¬/brep.pyu   ì „ì²˜ë¦¬/representations.pyz+Preparation scripts are not available yet: z, r   Tr   )r   r   r   Úrelative_tor   Újoinr   r   r   r   r   r   )ÚscriptsÚxÚmissingr   s       r   Úrun_preparer,   $   sÄ   € ÜÐ/Ñ/´Ð8KÑ1KÌTÐTrÑMrÐs€GÙ18ÓK±¨AÀÇÁÅ
Œs�1—=‘=¤Ó&Õ'°€GÐKÙ”jÐ!NÐQU×QZÑQZÐ[bÓQcÑ!cÓdÐdÛˆä�‰œŸ™¬¨F«°XÐ>ÄDÐPTÕUÜ�‰œŸ™¬¨F«Ð4¼$ÀdÖKð ô ÔÜ…Oùò Ls
   ŸC=µ C=c                 óÊ  — t        j                  d¬«      } | j                  ddd¬«       | j                  ddd¬«       | j                  d	dd
¬«       | j                  ddd¬«       | j                  ddd¬«       | j                  ddd¬«       | j                  ddd¬«       | j                  ddd¬«       | j                  ddd¬«       | j                  dt        d¬«       | j	                  «       }t        |j                  |j                  |j                  |j                  |j                  |j                  |j                  |j                  |j                  |j                  f
«      s| j!                  d«       |j                  s|j                  rt#        «        n7|j                  rt%        «        n |j                  rt'        «        t%        «        |j                  r
t)        «        |j                  r
t+        «        |j                  r
t-        «        |j                  r
t/        «        |j                  s|j                  s|j                  r‘t0        j2                  ddg}|j                  r|j5                  d«       n|j                  r|j5                  d«       |j                  r|dt7        |j                  «      gz  }t9        j:                  |t<        d¬«       y y )Nz9Prepare representations and run label-gated POC baselines)Údescriptionz	--prepareÚ
store_truez5run graph, B-Rep, and representation preparation CLIs)ÚactionÚhelpz--smokez1run actual-input architecture forward smoke testsz--visualizezGrebuild processed-data galleries without preparation or model executionz--match-targetszBmatch STEP/XLS to fused PLY and defect CSV, then rebuild galleriesz--train-weak-gnnz@explicitly run the two-sample weak-label GNN training diagnosticz--model-dashboardz1build the model input/fusion/result web dashboardz--compare-cad-predictionszCfit weak diagnostics and map every model output to common CAD nodesz--attributionsz6write prepared-sample local input-response diagnosticsz--allz9prepare then forward smoke plus synthetic-only GP/BO demoz--trainz7external validated NPZ contract passed to models.runner)Útyper1   zšchoose --prepare, --visualize, --match-targets, --train-weak-gnn, --model-dashboard, --compare-cad-predictions, --attributions, --smoke, --all, or --trainr   zmodels.runnerTr   )ÚargparseÚArgumentParserÚadd_argumentr   Ú
parse_argsÚanyÚprepareÚsmokeÚ	visualizeÚmatch_targetsÚtrain_weak_gnnÚmodel_dashboardÚcompare_cad_predictionsÚattributionsÚallÚtrainÚerrorr,   r   r   r   r    r#   r%   r   r   Úappendr   r   r   r   )ÚpÚargsÚcmds      r   ÚmainrG   /   sŒ  € Ü×ÑÐ,gÔh€AØ‡N�N�; |Ð:q€NÔrØ‡N�N�9 \Ð8k€NÔlØ‡N�N�=¨ð  =F€Nô  GØ‡N�NÐ$¨\ð  AE€Nô  FØ‡N�NÐ%¨lð  BD€Nô  EØ‡N�NÐ&¨|ÐBu€NÔvØ‡N�NÐ.°|ð  KP€Nô  QØ‡N�NÐ#¨LÐ?w€NÔxØ‡N�N�7 <Ð6q€NÔrØ‡N�N�9¤4Ð.g€NÔhØ�<‰<‹>€DÜ�—‘˜TŸZ™Z¨¯©°t×7IÑ7IÈ$×J]ÑJ]Ð^b×^rÑ^rÐsw÷  tPñ  tPð  QU÷  Qbñ  Qbð  cg÷  ckñ  ckð  lp÷  lvñ  lvð  wô  xð  z{÷  zAñ  zAð  B^ô  z_Ø‡|‚|�t—x’x¤¥Ø	�Šœ�Ø	×	Ò	ÜÔœ]œ_Ø×ÒÜŒØ×ÒÜÔØ×#Ò#Ü%Ô'Ø×ÒÜÔØ‡z‚z�T—X’X §¢Ü�~‰~˜t _Ð5ˆØ�8Š8�S—Z‘Z Õ(Ø�ZŠZ˜Ÿ™ IÔ.Ø�:Š:�s˜y¬#¨d¯j©j«/Ð:Ñ:�sÜ�‰�s¤¨DÖ1ð ",r   Ú__main__)ÚreturnÚNone)Ú__doc__Ú
__future__r   r3   r   r   Úpathlibr   Ú__file__ÚresolveÚparentsr   r   r   r   r    r#   r%   r,   rG   Ú__name__r   r   r   Ú<module>rR      sn   ðá XÝ "ß  Ó  Ý áˆHƒ~×ÑÓ×'Ñ'¨Ñ*€óHóeóó[óóó	ó2ðB ˆzÒ™4�6Ðr   