Ë
    ëÓ^j
  ã                   óh   — d Z ddlmZmZ ddlmZ ddlmZ  G d„ de«      Zd
d„Z	e
d	k(  r e	«        yy)af  LightningCLI entry point for RF-DETR training and evaluation.

Provides the ``rfdetr`` command with auto-generated subcommands::

    rfdetr fit     --config configs/rfdetr_base.yaml
    rfdetr validate --ckpt_path output/best.ckpt
    rfdetr test    --ckpt_path output/best.ckpt
    rfdetr predict --ckpt_path output/best.ckpt

Both ``RFDETRModelModule`` and ``RFDETRDataModule`` share the same ``(model_config, train_config)`` constructor
signature.  ``link_arguments`` eliminates the duplication so the user specifies each config group once; the datamodule
receives the same values automatically at parse time.
é    )ÚLightningArgumentParserÚLightningCLI)ÚRFDETRDataModule)ÚRFDETRModelModulec                   ó    — e Zd ZdZdeddfd„Zy)Ú	RFDETRCliam  LightningCLI subclass for RF-DETR training and evaluation.

    Wires ``RFDETRModelModule`` and ``RFDETRDataModule`` under a unified CLI, with argument linking that shares
    ``model_config`` and ``train_config`` between module and datamodule so the user only specifies them once.

    Auto-generated subcommands: ``fit``, ``validate``, ``test``, ``predict``.
    ÚparserÚreturnNc                 óT   — |j                  ddd¬«       |j                  ddd¬«       y)u¸  Register argument links that share configs between module and datamodule.

        Linking ``model.model_config`` â†’ ``data.model_config`` and ``model.train_config`` â†’ ``data.train_config`` means
        the user specifies both config groups once; the datamodule receives the same values automatically.

        Args:
            parser: The jsonargparse ``LightningArgumentParser`` provided by
                ``LightningCLI``.
        zmodel.model_configzdata.model_configÚparse)Úapply_onzmodel.train_configzdata.train_configN)Úlink_arguments)Úselfr	   s     ú^/var/www/ramen.bs-engineer-server.com/venv/lib/python3.12/site-packages/rfdetr/training/cli.pyÚadd_arguments_to_parserz!RFDETRCli.add_arguments_to_parser#   s4   € ð 	×ÑÐ2Ð4GÐRYÐÔZØ×ÑÐ2Ð4GÐRYÐÕZó    )Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   © r   r   r   r      s   „ ñð[Ð.Eð [È$ô [r   r   Nc                  ó,   — t        t        t        «       y)zìEntry point for the ``rfdetr`` CLI.

    Constructs and runs ``RFDETRCli`` with ``RFDETRModelModule`` and ``RFDETRDataModule``.  Subcommands are auto-
    generated by ``LightningCLI``: ``fit``, ``validate``, ``test``, ``predict``.
    N)r   r   r   r   r   r   Úmainr   1   s   € ô ÔÔ!1Õ2r   Ú__main__)r
   N)r   Úpytorch_lightning.clir   r   Úrfdetr.training.module_datar   Úrfdetr.training.module_modelr   r   r   r   r   r   r   ú<module>r      s=   ðñ÷ Hå 8Ý :ô[�ô [ó.3ð ˆzÒÙ…Fð r   