
    9i                     F    S SK r S SKJr  SSKJr  SSKJr   " S S\5      rg)	    N)Path   )BaseEvaluator   )MODELSc                   6    \ rS rSrSr\rS rS rS\	4S jr
Srg)	UadEvaluator   z%Semantic Segmentation Model Evaluatorc                     U R                   R                  U R                  R                  S5        U R                   R	                  SSS9  g)zupdate evaluation config
SegDatasetNT)is_backbone)
pdx_configupdate_datasetglobal_configdataset_dirupdate_pretrained_weights)selfs    k/var/www/html/land-doc-ocr/venv/lib/python3.13/site-packages/paddlex/modules/anomaly_detection/evaluator.pyupdate_configUadEvaluator.update_config   s9    &&t'9'9'E'E|T11$D1I    c                 J    [        U5      R                  R                  S-  nU$ )z
get config path

Args:
    weight_path (str): The path to the weight

Returns:
    config_path (str): The path to the config

zconfig.yaml)r   parent)r   weight_pathconfig_paths      r   get_config_pathUadEvaluator.get_config_path!   s%     ;'..55Er   returnc                     U R                  5       n[        R                  R                  SS5        U R                  R
                  US.$ )zoget key-value arguments of model evaluation function

Returns:
    dict: the arguments of evaluation function.
FLAGS_npu_jit_compileN)r   device)
get_deviceosenvironpopeval_configr   )r   r!   s     r   get_eval_kwargsUadEvaluator.get_eval_kwargs1   s:     "


.5#//;;vNNr    N)__name__
__module____qualname____firstlineno____doc__r   entitiesr   r   dictr'   __static_attributes__r)   r   r   r	   r	      s#    /HJ
 	O 	Or   r	   )r#   pathlibr   baser   
model_listr   r	   r)   r   r   <module>r5      s!     
    #O= #Or   