o
    ߥir                     @   s  d dl mZ d dlmZmZ ddlmZ erddlmZm	Z	m
Z
 ddlmZ ddlmZmZ ddlmZmZ dd	lmZmZ dd
lmZmZ ddlmZmZmZmZmZmZm Z m!Z!m"Z"m#Z#m$Z$m%Z%m&Z&m'Z'm(Z(m)Z)m*Z*m+Z+m,Z,m-Z-m.Z.m/Z/m0Z0m1Z1m2Z2m3Z3 ddl4m5Z5m6Z6 ddl7m8Z8 ddl9m:Z:m;Z; ddl<m=Z= ddl>m?Z?m@Z@mAZAmBZBmCZC ddlDmEZE e rddlFmGZGmHZHmIZImJZJ ddlFmKZKmLZLmMZMmNZNmOZOmPZPmQZQmRZRmSZS neTd ddlUmVZVmWZW ddlXmYZY ddlZm[Z[m\Z\ nji dddgdg ddg dddgd d!d"gd#d$d%gd&d'd(gd)d*d+gd,g d-d.d/d0gd1d2gd3d4d5gd6d7d8gd9d:gd;d<gd=d>gZ]e rFg d?e]d@< d dAl^Z^ee_e` dB e]eai dCe^jbe_< e rbe  dAS dAS )D    )TYPE_CHECKING)LazyImportModuleis_transformers_available   )fix_transformers_upgrade)ExporterTfModelExporterTorchModelExporter)HubApi)check_local_model_is_latestcheck_model_is_id)push_to_hubpush_to_hub_async)snapshot_downloaddataset_snapshot_download)model_file_downloaddataset_file_download)AccuracyMetricAudioNoiseMetric
BleuMetricImageColorEnhanceMetricImageColorizationMetricImageDenoiseMetricImageInpaintingMetric#ImageInstanceSegmentationCOCOMetricImagePortraitEnhancementMetric'ImageQualityAssessmentDegradationMetricImageQualityAssessmentMosMetric
LossMetricMetricMovieSceneSegmentationMetricOCRRecognitionMetric	PplMetric&ReferringVideoObjectSegmentationMetricSequenceClassificationMetricTextGenerationMetricTextRankingMetricTokenClassificationMetricVideoFrameInterpolationMetricVideoStabilizationMetricVideoSummarizationMetricVideoSuperResolutionMetrictask_default_metrics)Model
TorchModel)	MsDataset)Pipelinepipeline)Preprocessor)EpochBasedTrainerHookPriorityTrainingArgsbuild_dataset_from_file)Tasks)
AutoConfig
GPTQConfig	AwqConfigBitsAndBytesConfig)		AutoModelAutoModelForCausalLMAutoModelForSeq2SeqLM"AutoModelForSequenceClassificationAutoModelForTokenClassificationAutoTokenizerGenerationConfigAutoImageProcessorBatchFeaturezRtransformer is not installed, please install it if you want to use related modules)create_model_if_not_existread_config)
get_logger)__release_datetime____version__versionrI   rJ   trainers)r3   r6   r4   r5   r7   	exporterszhub.apir
   zhub.snapshot_downloadr   r   zhub.file_downloadr   r   zhub.push_to_hubr   r   zhub.check_modelr   r   metrics)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!   modelsr-   r.   preprocessorsr2   	pipelinesr0   r1   z	utils.hubrG   rF   zutils.loggerrH   zutils.constantr8   
msdatasetsr/   )r9   rC   r=   r:   r;   r<   r>   r?   rB   r@   rA   rD   rE   zutils.hf_utilN__file__)module_specextra_objects)ctypingr   modelscope.utils.import_utilsr   r   utils.automodel_utilsr   rM   r   r   r	   hub.apir
   hub.check_modelr   r   hub.push_to_hubr   r   hub.snapshot_downloadr   r   hub.file_downloadr   r   rN   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,   rO   r-   r.   rR   r/   rQ   r0   r1   rP   r2   rL   r3   r4   r5   r6   r7   utils.constantr8   utils.hf_utilr9   r:   r;   r<   r=   r>   r?   r@   rA   rB   rC   rD   rE   print	utils.hubrF   rG   utils.loggerrH   rK   rI   rJ   _import_structuresys__name__globals__spec__modules ri   ri   G/home/ubuntu/.local/lib/python3.10/site-packages/modelscope/__init__.py<module>   s   p.!"#$%&'*	
