/usr/local/lib/python3.6/site-packages/transformers/utils/__pycache__
NameSizeModeActions
doc.cpython-36.pyc345520644editdlrm
dummy_detectron2_objects.cpython-36.pyc7650644editdlrm
dummy_flax_objects.cpython-36.pyc476390644editdlrm
dummy_pt_objects.cpython-36.pyc2099100644editdlrm
dummy_pytorch_quantization_and_torch_objects.cpython-36.pyc38530644editdlrm
dummy_scatter_objects.cpython-36.pyc20440644editdlrm
dummy_sentencepiece_and_speech_objects.cpython-36.pyc6410644editdlrm
dummy_sentencepiece_and_tokenizers_objects.cpython-36.pyc4580644editdlrm
dummy_sentencepiece_objects.cpython-36.pyc76300644editdlrm
dummy_speech_objects.cpython-36.pyc6130644editdlrm
dummy_tf_objects.cpython-36.pyc985960644editdlrm
dummy_timm_and_vision_objects.cpython-36.pyc16240644editdlrm
dummy_timm_objects.cpython-36.pyc16470644editdlrm
dummy_tokenizers_objects.cpython-36.pyc147460644editdlrm
dummy_vision_objects.cpython-36.pyc65940644editdlrm
fx.cpython-36.pyc179760644editdlrm
fx_transformations.cpython-36.pyc95630644editdlrm
generic.cpython-36.pyc104930644editdlrm
hp_naming.cpython-36.pyc37510644editdlrm
hub.cpython-36.pyc316490644editdlrm
import_utils.cpython-36.pyc227740644editdlrm
logging.cpython-36.pyc95570644editdlrm
model_parallel_utils.cpython-36.pyc19760644editdlrm
notebook.cpython-36.pyc121900644editdlrm
sentencepiece_model_pb2.cpython-36.pyc128230644editdlrm
versions.cpython-36.pyc30620644editdlrm
__init__.cpython-36.pyc46450644editdlrm
Edit: /usr/local/lib/python3.6/site-packages/transformers/utils/__pycache__/logging.cpython-36.pyc (9557B)
3 Eg,%@sDUdZddlZddlZddlZddlZddlmZddlmZddlmZddlmZddlm Z ddlm Z dd lm Z dd lm Z dd l mZdd lmZejZdaeejejej ej ejejd Zej ZdaddZedddZejdddZddddZddddZddZ dIeeejdddZ!e"ddd Z#e"dd!d"d#Z$d$d%Z%d&d'Z&d(d)Z'd*d+Z(ddd,d-Z)ddd.d/Z*ejdd0d1d2Z+ejdd0d3d4Z,ddd5d6Z-ddd7d8Z.ddd9d:Z/ddd;d<Z0d=d>Z1e1ej_1Gd?d@d@Z2GdAdBdBZ3e3Ze4ddCdDZ5dEdFZ6dGdHZ7dS)Jz Logging utilities.N)CRITICAL)DEBUG)ERROR)FATAL)INFO)NOTSET)WARN)WARNING)Optional)auto)debuginfowarningerrorcriticalTcCsHtjdd}|rD|tkr t|Stjjd|ddjtjtS)z If TRANSFORMERS_VERBOSITY env var is set to one of the valid choices return that as the new default level. If it is not - fall back to `_default_log_level` ZTRANSFORMERS_VERBOSITYNz&Unknown option TRANSFORMERS_VERBOSITY=z, has to be one of: z, ) osgetenv log_levelslogging getLoggerrjoinkeys_default_log_level)Z env_level_strrD/usr/local/lib/python3.6/site-packages/transformers/utils/logging.py_get_default_logging_level2s r)returncCstjddS)N.r)__name__splitrrrr_get_library_nameCsr cCs tjtS)N)rrr rrrr_get_library_root_loggerHsr!c CsPtBtrdStjatjjt_t}|jt|j t d|_ WdQRXdS)NF) _lock_default_handlerr StreamHandlersysstderrflushr! addHandlersetLevelr propagate)library_root_loggerrrr_configure_library_root_loggerMs   r,c Cs<t.tsdSt}|jt|jtjdaWdQRXdS)N)r"r#r! removeHandlerr)rr)r+rrr_reset_library_root_logger_s  r.cCstS)N)rrrrrget_log_levels_dictmsr/)namercCs|dkrt}ttj|S)z Return a logger with the specified name. This function is not supposed to be directly accessed unless you are writing a custom transformers module. N)r r,rr)r0rrr get_loggerqsr1cCsttjS)u Return the current level for the 🤗 Transformers's root logger as an int. Returns: `int`: The logging level. 🤗 Transformers has following logging levels: - 50: `transformers.logging.CRITICAL` or `transformers.logging.FATAL` - 40: `transformers.logging.ERROR` - 30: `transformers.logging.WARNING` or `transformers.logging.WARN` - 20: `transformers.logging.INFO` - 10: `transformers.logging.DEBUG` )r,r!getEffectiveLevelrrrr get_verbositysr3) verbosityrcCsttj|dS)u Set the verbosity level for the 🤗 Transformers's root logger. Args: verbosity (`int`): Logging level, e.g., one of: - `transformers.logging.CRITICAL` or `transformers.logging.FATAL` - `transformers.logging.ERROR` - `transformers.logging.WARNING` or `transformers.logging.WARN` - `transformers.logging.INFO` - `transformers.logging.DEBUG` N)r,r!r))r4rrr set_verbositysr5cCsttS)z&Set the verbosity to the `INFO` level.)r5rrrrrset_verbosity_infosr6cCsttS)z)Set the verbosity to the `WARNING` level.)r5r rrrrset_verbosity_warningsr7cCsttS)z'Set the verbosity to the `DEBUG` level.)r5rrrrrset_verbosity_debugsr8cCsttS)z'Set the verbosity to the `ERROR` level.)r5rrrrrset_verbosity_errorsr9cCs"ttdk sttjtdS)zJDisable the default handler of the HuggingFace Transformers's root logger.N)r,r#AssertionErrorr!r-rrrrdisable_default_handlers r;cCs"ttdk sttjtdS)zIEnable the default handler of the HuggingFace Transformers's root logger.N)r,r#r:r!r(rrrrenable_default_handlers r<)handlerrcCs"t|dk sttj|dS)z=adds a handler to the HuggingFace Transformers's root logger.N)r,r:r!r()r=rrr add_handlers r>cCs.t|dk r|tjksttj|dS)zFremoves given handler from the HuggingFace Transformers's root logger.N)r,r!handlersr:r-)r=rrrremove_handlersr@cCstdt_dS)zk Disable propagation of the library log outputs. Note that log propagation is disabled by default. FN)r,r!r*rrrrdisable_propagationsrAcCstdt_dS)z Enable propagation of the library log outputs. Please disable the HuggingFace Transformers's default handler to prevent double logging if the root logger has been configured. TN)r,r!r*rrrrenable_propagationsrBcCs.tj}x |D]}tjd}|j|qWdS)a Enable explicit formatting for every HuggingFace Transformers's logger. The explicit formatter is as follows: ``` [LEVELNAME|FILENAME|LINE NUMBER] TIME >> MESSAGE ``` All handlers currently bound to the root logger are affected by this method. zB[%(levelname)s|%(filename)s:%(lineno)s] %(asctime)s >> %(message)sN)r!r?r Formatter setFormatter)r?r= formatterrrrenable_explicit_formats  rFcCs$tj}x|D]}|jdqWdS)z Resets the formatting for HuggingFace Transformers's loggers. All handlers currently bound to the root logger are affected by this method. N)r!r?rD)r?r=rrr reset_formats rGcOs$tjdd}|rdS|j||dS)z This method is identical to `logger.warning()`, but if env var TRANSFORMERS_NO_ADVISORY_WARNINGS=1 is set, this warning will not be printed Z!TRANSFORMERS_NO_ADVISORY_WARNINGSFN)rrr)selfargskwargsZno_advisory_warningsrrrwarning_advices rKc@s8eZdZdZddZddZddZdd Zd d Zd S) EmptyTqdmz%Dummy tqdm which doesn't do anything.cOs|r |dnd|_dS)Nr) _iterator)rHrIrJrrr__init__ szEmptyTqdm.__init__cCs t|jS)N)iterrM)rHrrr__iter__#szEmptyTqdm.__iter__cCs dd}|S)zReturn empty function.c_sdS)Nr)rIrJrrrempty_fn)sz'EmptyTqdm.__getattr__..empty_fnr)rH_rQrrr __getattr__&szEmptyTqdm.__getattr__cCs|S)Nr)rHrrr __enter__.szEmptyTqdm.__enter__cCsdS)Nr)rHtype_value tracebackrrr__exit__1szEmptyTqdm.__exit__N) r __module__ __qualname____doc__rNrPrSrTrXrrrrrLs rLc@s$eZdZddZddZddZdS) _tqdm_clscOstrtj||St||SdS)N) _tqdm_activetqdm_libtqdmrL)rHrIrJrrr__call__6s z_tqdm_cls.__call__cOsd|_trtjj||SdS)N)r"r]r^r_set_lock)rHrIrJrrrra<sz_tqdm_cls.set_lockcCstrtjjSdS)N)r]r^r_get_lock)rHrrrrbAsz_tqdm_cls.get_lockN)rrYrZr`rarbrrrrr\5sr\cCsttS)zCReturn a boolean indicating whether tqdm progress bars are enabled.)boolr]rrrris_progress_bar_enabledIsrdcCsdadS)zEnable tqdm progress bar.TN)r]rrrrenable_progress_barOsrecCsdadS)zDisable tqdm progress bar.FN)r]rrrrdisable_progress_barUsrf)N)8r[rrr% threadingrrrrrrrr typingr r_r r^Lockr"r#Handlerrrr]rstrr Loggerr!r,r.r/r1intr3r5r6r7r8r9r;r<r>r@rArBrFrGrKrLr\rcrdrerfrrrrsh