ó
    ÷“,jü?  ã                   óJ   • S SK r S SKrS r " S S\ R                  5      rS rg)é    Nc                 óJ   • U R                  5       n SU ;   a  SSSSS.$ SSSSS.$ )	NÚvitgü©ñÒMb@?gÍÌÌÌÌÌì?g\�Âõ(\ï?g�íµ ÷Æ°>)ÚlrÚbeta1Úbeta2Úepsg+‡ÙÎ÷ï?g:Œ0âŽyE>)Úlower)Ú
model_names    Ú¤C:\Users\johnn\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.13_qbz5n2kfra8p0\LocalCache\local-packages\Python313\site-packages\open_clip_train/params.pyÚget_default_paramsr      s6   € à×!Ñ!Ó#€JØ�
ÓØ s°TÀ&ÑIÐIà s°UÀ6ÑJÐJó    c                   ó   • \ rS rSrSS jrSrg)ÚParseKwargsé   Nc                 óÚ   • 0 nU H/  nUR                  S5      u  pv [        R                  " U5      XW'   M1     [        X R                  U5        g ! [         a    [	        U5      XW'    Md  f = f)NÚ=)ÚsplitÚastÚliteral_evalÚ
ValueErrorÚstrÚsetattrÚdest)ÚselfÚparserÚ	namespaceÚvaluesÚoption_stringÚkwÚvalueÚkeys           r   Ú__call__ÚParseKwargs.__call__   sd   € ØˆÛˆEØŸ™ SÓ)‰JˆCð%Ü×*Ò*¨5Ó1�“ñ ô 	�	Ÿ9™9 bÕ)øô ó %Ü˜e›*�”ð%ús   œAÁA*Á)A*© )N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__r"   Ú__static_attributes__r$   r   r   r   r      s   † ÷*r   r   c           	      óž  • [         R                  " 5       nUR                  S[        S SS9  UR                  S[        S SS9  UR                  S[        S SS9  UR                  S[        S S	S9  UR                  S
[        S SS9  UR                  S/ SQSSS9  UR                  SSSSS9  UR                  S[        SSS9  UR                  S[        SSS9  UR                  S[        SSS9  UR                  S[        S S S9  UR                  S![        S S"S9  UR                  S#[        S S$S9  UR                  S%[        S&S'S9  UR                  S(SSS)S*9  UR                  S+[        S S,S9  UR                  S-[        S.S/S9  UR                  S0[        S1S2S9  UR                  S3[        S4S5S9  UR                  S6[        S S7S9  UR                  S8[
        S S9S9  UR                  S:[
        S S;S9  UR                  S<[
        S S=S9  UR                  S>[
        S S?S9  UR                  S@[
        SASBS9  UR                  SC[
        S SDS9  UR                  SE[        SFSGS9  UR                  SH[        SISJS9  UR                  SKSSSLS9  UR                  SMSSSNS*9  UR                  SO[        SPSQS9  UR                  SR[
        SSSTS9  UR                  SU[
        SVSWS9  UR                  SX[        SYSZS9  UR                  S[SSS\S*9  UR                  S][        S^S_S9  UR                  S`[        SYSaS9  UR                  SbS [        ScSd9  UR                  Se/ SfQSgShS9  UR                  Si[        SjSkS9  UR                  SlSm[        SnSd9  UR                  SoSSSpS9  UR                  SqSSSrS9  UR                  Ss[        StSuS9  UR                  SvSSSwS9  UR                  Sx[
        SyS SzS{S|9  UR                  S}[
        SyS S~SS|9  UR                  S€S [        / S�QS‚Sƒ9  UR                  S„S [        / S…QS†Sƒ9  UR                  S‡Sˆ0 [        S‰9  UR                  SŠSSS‹S9  UR                  SŒSSS�S9  UR                  SŽSSS�S9  UR                  S�[        S S‘S9  UR                  S’[        SyS S“S”9  UR                  S•SSS–S9  UR                  S—S [
        S˜Sd9  UR                  S™SSSšS9  UR                  S›SSSœS9  UR                  S�SSSžS9  UR                  SŸSSS S9  UR                  S¡[        SYS¢S9  UR                  S£S¤[        S¥Sd9  UR                  S¦S [        S§Sd9  UR                  S¨S [        S©Sd9  UR                  SªSm[        S«Sd9  UR                  S¬Sm[        S­Sd9  UR                  S®[        S¯S°S9  UR                  S±SSS²S9  UR                  S³SSS´S9  UR                  SµSSS¶S9  UR                  S·SSS¸S9  UR                  S¹SSSºS9  UR                  S»[        StS¼S9  UR                  S½[
        S S¾S9  UR                  S¿SSSÀS9  UR                  SÁ[        StSÂS9  UR                  SÃSSSÄS9  UR                  SÅ[        SÆSÇS9  UR                  SÈ[
        SÉSÊS9  UR                  SË[
        SVSÌS9  UR                  SÍ[        S SÎS9  UR                  SÏ[        SÐSÑS9  UR                  SÒSÓSÔ/SÓSÕS9  UR                  SÖSSS×S9  UR                  SØS SÙSÚ9  UR                  SÛS SÜSÚ9  UR                  SÝS SÞSÚ9  UR                  SßSSSàS9  UR                  SáS [        SâSd9  UR                  U 5      n SãU R                  ;  aH  [        U R                  5      nUR                  5        H  u  p4[        X5      b  M  [        XU5        M!     U $ )äNz--train-datazyPath to file(s) with training data. When using webdataset, multiple datasources can be combined using the `::` separator.)ÚtypeÚdefaultÚhelpz--train-data-upsampling-factorsaU  When using multiple data sources with webdataset and sampling with replacement, this can be used to upsample specific data sources. Similar to --train-data, this should be a string with as many numbers as there are data sources, separated by `::` (e.g. 1::2::0.5) By default, datapoints are sampled uniformly regardless of the dataset sizes.z
--val-dataz$Path to file(s) with validation dataz--train-num-sampleszTNumber of samples in dataset. Required for webdataset if not available in info file.z--val-num-sampleszRNumber of samples in dataset. Useful for webdataset if not available in info file.z--dataset-type)Ú
webdatasetÚcsvÚ	syntheticÚautor1   z!Which type of dataset to process.)Úchoicesr,   r-   z--dataset-resampledFÚ
store_truezHWhether to use sampling with replacement for webdataset shard selection.)r,   Úactionr-   z--csv-separatorÚ	z.For csv-like datasets, which separator to use.z--csv-img-keyÚfilepathz?For csv-like datasets, the name of the key for the image paths.z--csv-caption-keyÚtitlez<For csv-like datasets, the name of the key for the captions.z--imagenet-valz=Path to imagenet val set for conducting zero shot evaluation.z--imagenet-v2z8Path to imagenet v2 for conducting zero shot evaluation.z--cache-dirzHOverride system default cache path for model & tokenizer file downloads.z--logsz./logs/z@Where to store tensorboard logs. Use None to avoid storing logs.z--log-localz8log files on local master, otherwise global master only.)r4   r,   r-   z--namezUOptional identifier for the experiment when storing logs. Otherwise use current time.z	--workersé   z%Number of dataloader workers per GPU.z--batch-sizeé@   zBatch size per GPU.z--epochsé    zNumber of epochs to train for.z--epochs-cooldownz^When scheduler w/ cooldown used, perform cooldown from total_epochs - cooldown_epochs onwards.z--lrzLearning rate.z--beta1zAdam beta 1.z--beta2zAdam beta 2.z--epszAdam epsilon.z--wdgš™™™™™É?zWeight decay.z
--momentumzMomentum (for timm optimizers).z--warmupi'  zNumber of steps to warmup for.z--optÚadamwzWWhich optimizer to use. Choices are ['adamw', or any timm optimizer 'timm/{opt_name}'].z--use-bn-synczWhether to use batch norm sync.z--skip-schedulerz.Use this flag to skip the learning rate decay.z--lr-schedulerÚcosinezlLR scheduler. One of: 'cosine', 'const' (constant), 'const-cooldown' (constant w/ cooldown). Default: cosinez--lr-cooldown-endg        z3End learning rate for cooldown schedule. Default: 0z--lr-cooldown-powerg      ð?zCPower for polynomial cooldown schedule. Default: 1.0 (linear decay)z--save-frequencyé   zHow often to save checkpoints.z--save-most-recentz=Always save the most recent model trained to epoch_latest.pt.z--zeroshot-frequencyé   zHow often to run zero shot.z--val-frequencyz*How often to run evaluation with val data.z--resumez)path to latest checkpoint (default: none))r,   r+   r-   z--precision)ÚampÚamp_bf16Úamp_bfloat16Úbf16Úfp16Ú	pure_bf16Ú	pure_fp16Úfp32r?   zFloating point precision.z--modelÚRN50z#Name of the vision backbone to use.z--pretrainedÚ zHUse a pretrained CLIP model weights with the specified tag or file path.z--pretrained-imagezGLoad imagenet pretrained weights for image tower backbone if available.z--lock-imagez-Lock full image tower by disabling gradients.z--lock-image-unlocked-groupsr   z/Leave last n image tower layer groups unlocked.z--lock-image-freeze-bn-statszDFreeze BatchNorm running stats in image tower for any locked layers.z--image-meanÚ+ÚMEANz,Override default image mean value of dataset)r+   Únargsr,   Úmetavarr-   z--image-stdÚSTDz2Override default image std deviation of of datasetz--image-interpolation)ÚbicubicÚbilinearÚrandomz+Override default image resize interpolation)r,   r+   r2   r-   z--image-resize-mode)ÚshortestÚlongestÚsquashz<Override default image resize (& crop) mode during inferencez	--aug-cfgÚ*)rK   r,   r4   z--grad-checkpointingzEnable gradient checkpointing.z--local-lossz\calculate loss w/ local features @ global (instead of realizing full global @ global matrix)z--gather-with-gradz3enable full distributed gradient for feature gatherz--force-context-lengthzOverride default context lengthz--force-image-sizezOverride default image size)r+   rK   r,   r-   z--force-quick-geluzDForce use of QuickGELU activation for non-OpenAI transformer models.z--force-patch-dropoutzhOverride the patch dropout during training, for fine tuning with no dropout near the end as in the paperz--force-custom-textz8Force use of CustomTextCLIP model (separate text-tower).z--torchscriptzZtorch.jit.script the model, also uses jit version of OpenAI models if pretrained=='openai'z--torchcompilez9torch.compile() the model, requires pytorch 2.0 or later.z--tracez3torch.jit.trace the model for inference / eval onlyz--accum-freqz)Update the model every --acum-freq steps.z--deviceÚcudazAccelerator to use.z
--dist-urlz'url used to set up distributed trainingz--dist-backendz:distributed backend. "nccl" for GPU, "hccl" for Ascend NPUz--report-toz9Options are ['wandb', 'tensorboard', 'wandb,tensorboard']z--wandb-noteszNotes if logging with wandbz--wandb-project-namez	open-clipz*Name of the project if logging with wandb.z--debugz$If true, more information is logged.z--copy-codebasezNIf true, we copy the entire base on the log directory, and execute from there.z	--horovodz%Use horovod for distributed training.z--ddp-static-graphz<Enable static graph optimization for DDP in PyTorch >= 1.11.z--no-set-device-rankz^Don't set device index from local rank (when CUDA_VISIBLE_DEVICES restricted to one per proc).z--seedzDefault random seed.z--grad-clip-normzGradient clip.z--lock-textz,Lock full text tower by disabling gradients.z--lock-text-unlocked-layersz.Leave last n text tower layer groups unlocked.z--lock-text-freeze-layer-normzCFreeze LayerNorm running stats in text tower for any locked layers.z--log-every-n-stepséd   z/Log every n steps to tensorboard/console/wandb.z--coca-caption-loss-weightg       @z(Weight assigned to caption loss in CoCa.z--coca-contrastive-loss-weightz7Weight assigned to contrastive loss when training CoCa.z--remote-syncz8Optinoally sync with a remote path specified by this argz--remote-sync-frequencyi,  zIHow frequently to sync to a remote directly if --remote-sync is not None.z--remote-sync-protocolÚs3Úfsspecz>How to do the remote sync backup if --remote-sync is not None.z--delete-previous-checkpointz<If true, delete previous checkpoint after storing a new one.z--distill-modelz)Which model arch to distill from, if any.)r,   r-   z--distill-pretrainedz2Which pre-trained weights to distill from, if any.z--use-bnb-linearzeReplace the network linear layers from the bitsandbytes library. Allows int8 training/inference, etc.z--siglipzUse SigLip (sigmoid) loss.z--loss-dist-implz?A string to specify a specific distributed loss implementation.Útimm)ÚargparseÚArgumentParserÚadd_argumentr   ÚintÚfloatr   Ú
parse_argsÚoptr   ÚmodelÚitemsÚgetattrr   )Úargsr   Údefault_paramsÚnameÚvals        r   r_   r_      s®  € Ü×$Ò$Ó&€FØ
×ÑØÜØð Ið	 ñ ð ×ÑØ)ÜØð\ð ñ 	ð ×ÑØÜØØ3ð	 ñ ð ×ÑØÜØØcð	 ñ ð ×ÑØÜØØað	 ñ ð ×ÑØÚ:ØØ0ð	 ñ ð ×ÑØØØØWð	 ñ ð ×ÑØÜØØ=ð	 ñ ð ×ÑØÜØØNð	 ñ ð ×ÑØÜØØKð	 ñ ð ×ÑØÜØØLð	 ñ ð ×ÑØÜØØGð	 ñ ð ×ÑØÜØØWð	 ñ ð ×ÑØÜØØOð	 ñ ð ×ÑØØØØGð	 ñ ð ×ÑØÜØØdð	 ñ ð ×ÑØœ# qÐ/Vð ñ ð ×ÑØœS¨"Ð3Hð ñ ð ×ÑØœ bÐ/Oð ñ ð ×ÑØ¤#¨tØmð ñ ð ×Ñ˜¤U°DÐ?OÐÑPØ
×Ñ˜	¬°tÀ.ÐÑQØ
×Ñ˜	¬°tÀ.ÐÑQØ
×Ñ˜¤e°TÀÐÑPØ
×Ñ˜¤U°C¸oÐÑNØ
×Ñ˜¬5¸$ÐEfÐÑgØ
×ÑØœ eÐ2Rð ñ ð ×ÑØ”c 7Øfð ñ ð ×ÑØØØØ.ð	 ñ 0ð
 ×ÑØØØØ=ð	 ñ ð ×ÑØÜØØ{ð	 ñ ð ×ÑØ¤%°ØBð ñ ð ×ÑØ¤E°3ØRð ñ ð ×ÑØ¤¨aÐ6Vð ñ ð ×ÑØØØØLð	 ñ ð ×ÑØ¤S°!Ð:Wð ñ ð ×ÑØ¤¨QÐ5að ñ ð ×ÑØØÜØ8ð	 ñ ð ×ÑØÚeØØ(ð	 ñ ð ×ÑØÜØØ2ð	 ñ ð ×ÑØØÜØWð	 ñ ð ×ÑØØØØVð	 ñ ð ×ÑØØØØ<ð	 ñ ð ×ÑØ&ÜØØ>ð	 ñ ð ×ÑØ&ØØØSð	 ñ ð ×ÑØœU¨#°tÀVØ;ð ñ =ð ×ÑØœE¨°dÀEØAð ñ Cð ×ÑØØœ3Ò(IØ:ð ñ ð
 ×ÑØØœ3Ò(IØKð ñ ð
 ×Ñ˜¨3¸Ä;ÐÑOØ
×ÑØØØØ-ð	 ñ ð ×ÑØØØØkð	 ñ ð ×ÑØØØØBð	 ñ ð ×ÑØ ¤s°DØ.ð ñ ð ×ÑØ¤3¨c¸4Ø*ð ñ ð ×ÑØØØØSð	 ñ ð ×ÑØØÜØwð	 ñ ð ×ÑØØØØGð	 ñ ð ×ÑØØØØið	 ñ ð ×ÑØØØØHð	 ñ ð ×ÑØØØØBð	 ñ ð ×ÑØœS¨!Ð2]ð ñ ð ×ÑØ˜F¬Ð3Hð ñ ð ×ÑØØÜØ6ð	 ñ ð ×ÑØØÜØMð	 ñ ð ×ÑØØÜØHð	 ñ ð ×ÑØØÜØ*ð	 ñ ð ×ÑØÜØØ9ð	 ñ ð ×ÑØØØØ3ð	 ñ ð ×ÑØØØØ]ð	 ñ ð ×ÑØØØØ4ð	 ñ ð ×ÑØØØØKð	 ñ ð ×ÑØØØØmð	 ñ ð ×ÑØ”s AÐ,Bð ñ ð ×ÑØ¤°Ð;Kð ñ ð ×ÑØØØØ;ð	 ñ ð ×ÑØ%ÜØØ=ð	 ñ ð ×ÑØ'ØØØRð	 ñ ð ×ÑØÜØØ>ð	 ñ ð ×ÑØ$ÜØØ7ð	 ñ ð ×ÑØ(ÜØØFð	 ñ ð ×ÑØÜØØGð	 ñ ð ×ÑØ!ÜØØXð	 ñ ð ×ÑØ Ø�xÐ ØØMð	 ñ ð ×ÑØ&ØØØKð	 ñ ð ×ÑØØØ8ð ñ ð
 ×ÑØØØAð ñ ð
 ×ÑØØð/ð ñ ð ×ÑØØØØ)ð	 ñ ð ×ÑØØÜØNð	 ñ ð ×Ñ˜TÓ"€Dà�T—X‘XÓä+¨D¯J©JÓ7ˆØ'×-Ñ-Ö/‰IˆDÜ�tÓ"Ó*Ü˜ CÖ(ñ 0ð €Kr   )rZ   r   r   ÚActionr   r_   r$   r   r   Ú<module>ri      s'   ðÛ Û 
òKô	*�(—/‘/ô 	*óRr   