
    ^j                    p    d Z ddlmZ ddlmZ ddlmZmZmZ  edd       G d d             Z	 e	       Z
y	)
aQ  Hardcoded architectural constants not exposed in ModelConfig or TrainConfig.

These values correspond to the ``build_namespace()`` defaults in ``_namespace.py`` that have no corresponding config
field.  Making them explicit in a frozen dataclass enables testing, documentation, and (future) overrides without
touching config validation.
    )annotations)	dataclass)DictListOptionalT)frozenslotsc                  B   e Zd ZU dZdZded<   dZded<   dZded	<   d
Zded<   d
Z	ded<   d
Z
ded<   d
Zded<   dZded<   d
Zded<   dZded<   dZded<   dZded<   dZded<   dZded<   dZded <   dZded!<   dZded"<   dZded#<   d$Zded%<   d&Zd'ed(<   d)Zd'ed*<   d+Zd'ed,<   d)Zd'ed-<   d+Zd'ed.<   d)Zd'ed/<   dZded0<   dZded1<   dZ ded2<   d3Z!ded4<   dZ"ded5<   d6Z#d'ed7<   d
Z$ded8<   dZ%ded9<   dZ&ded:<   dZ'ded;<   d<Z(ded=<   d>Z)ded?<   d@Z*dedA<   d6Z+d'edB<   d
Z,dedC<   y
)DModelDefaultsaV  Hardcoded architectural constants not exposed in ModelConfig or TrainConfig.

    These values mirror the legacy ``build_namespace()`` hardcoded section implemented in ``_namespace.py``. Making them
    explicit enables testing and future overrides without touching config validation.

    Note:
        ``ModelDefaults`` is public API as of v1.7.  Fields that represent true architectural decisions (e.g.
        ``dim_feedforward``, ``aux_loss``) will be promoted to ``ModelConfig`` or ``TrainConfig`` in future phases;
        field names and defaults may change across minor versions during this transitional period.

    Attributes:
        drop_mode: Drop-path mode used during training.
        drop_schedule: Schedule type for drop-path rate.
        cutoff_epoch: Epoch at which drop-path schedule resets.
        pretrained_encoder: Path/URL to a pretrained encoder checkpoint.
        pretrain_exclude_keys: Keys to exclude when loading pretrained weights.
        pretrain_keys_modify_to_load: Key remapping rules for pretrained weights.
        pretrained_distiller: Path/URL to a distillation teacher checkpoint.
        vit_encoder_num_layers: Number of layers in the ViT encoder.
        window_block_indexes: Indices of encoder layers using window attention.
        position_embedding: Type of positional embedding (``'sine'``).
        rms_norm: Whether to use RMSNorm instead of LayerNorm.
        force_no_pretrain: Force-disable pretrain weight loading.
        dim_feedforward: FFN hidden dimension in decoder layers.
        decoder_norm: Normalization type in decoder (``'LN'``).
        freeze_batch_norm: Whether to freeze batch-norm layers.
        use_cls_token: Whether to prepend a CLS token to the encoder.
        encoder_only: Build encoder only (no decoder).
        backbone_only: Build backbone only (no encoder or decoder).
        aux_loss: Whether to compute auxiliary losses at intermediate layers.
        focal_alpha: Alpha parameter for focal loss.
        set_cost_class: Classification cost weight for the matcher.
        set_cost_bbox: L1 bbox cost weight for the matcher.
        set_cost_giou: GIoU cost weight for the matcher.
        bbox_loss_coef: Bbox regression loss coefficient.
        giou_loss_coef: GIoU loss coefficient.
        sum_group_losses: Whether to sum (vs. average) group-DETR losses.
        use_varifocal_loss: Whether to use varifocal loss instead of focal loss.
        use_position_supervised_loss: Whether to use position-supervised loss.
        print_freq: Logging frequency (steps).
        do_benchmark: Whether to run in benchmark/profiling mode.
        dropout: Dropout rate in the decoder.
        coco_path: Path to a COCO dataset root (legacy).
        dont_save_weights: Disable checkpoint saving.
        start_epoch: Epoch to resume training from.
        eval: Whether to run in eval-only mode.
        world_size: Number of distributed processes.
        dist_url: URL for distributed initialisation.
        lr_scheduler: Learning-rate scheduler type.
        lr_min_factor: Minimum LR factor for cosine annealing.
        subcommand: CLI subcommand (legacy).
    standardstr	drop_modeconstantdrop_scheduler   intcutoff_epochNzOptional[str]pretrained_encoderzOptional[List[str]]pretrain_exclude_keyszOptional[Dict[str, str]]pretrain_keys_modify_to_loadpretrained_distiller   vit_encoder_num_layerszOptional[List[int]]window_block_indexessineposition_embeddingFboolrms_normforce_no_pretraini   dim_feedforwardLNdecoder_normfreeze_batch_normuse_cls_tokenencoder_onlybackbone_onlyTaux_lossg      ?floatfocal_alphag       @set_cost_classg      @set_cost_bboxset_cost_gioubbox_loss_coefgiou_loss_coefsum_group_lossesuse_varifocal_lossuse_position_supervised_loss
   
print_freqdo_benchmarkg        dropout	coco_pathdont_save_weightsstart_epocheval   
world_sizezenv://dist_urlsteplr_schedulerlr_min_factor
subcommand)-__name__
__module____qualname____doc__r   __annotations__r   r   r   r   r   r   r   r   r   r   r   r   r!   r"   r#   r$   r%   r&   r(   r)   r*   r+   r,   r-   r.   r/   r0   r2   r3   r4   r5   r6   r7   r8   r:   r;   r=   r>   r?        b/var/www/ramen.bs-engineer-server.com/venv/lib/python3.12/site-packages/rfdetr/models/_defaults.pyr   r      s   3j  Is#M3#L#(,,15.5=A ":A*.-."$C$04-4$$Hd#t#OSL##t#M4L$M4HdKNEM5M5NENE"d"$$). $.JL$GU#I}##t#KD$JHcL#M5 $J$rF   r   N)rC   
__future__r   dataclassesr   typingr   r   r   r   MODEL_DEFAULTSrE   rF   rG   <module>rL      sE    # ! ' ' $d#]% ]% $]%@ rF   