


'''simple docstring'''





from __future__ import annotations

import unittest

from transformers import EsmConfig, is_tf_available
from transformers.testing_utils import require_tf, slow

from ...test_configuration_common import ConfigTester
from ...test_modeling_tf_common import TFModelTesterMixin, floats_tensor, ids_tensor, random_attention_mask
from ...test_pipeline_mixin import PipelineTesterMixin


if is_tf_available():
							import numpy
							import tensorflow as tf

							from transformers.models.esm.modeling_tf_esm import (
							    TF_ESM_PRETRAINED_MODEL_ARCHIVE_LIST,
							    TFEsmForMaskedLM,
							    TFEsmForSequenceClassification,
							    TFEsmForTokenClassification,
							    TFEsmModel,
							)

class 						A__							:




						def __init__(       self					:      str				,    _a					:      Union[str, Any]				,    )							->     Dict:


										"""simple docstring"""





										_SCREAMING_SNAKE_CASE			  =parent
										_SCREAMING_SNAKE_CASE			  =13
										_SCREAMING_SNAKE_CASE			  =7
										_SCREAMING_SNAKE_CASE			  =True
										_SCREAMING_SNAKE_CASE			  =True
										_SCREAMING_SNAKE_CASE			  =True
										_SCREAMING_SNAKE_CASE			  =99
										_SCREAMING_SNAKE_CASE			  =32
										_SCREAMING_SNAKE_CASE			  =2
										_SCREAMING_SNAKE_CASE			  =4
										_SCREAMING_SNAKE_CASE			  =37
										_SCREAMING_SNAKE_CASE			  ='''gelu'''
										_SCREAMING_SNAKE_CASE			  =0.1
										_SCREAMING_SNAKE_CASE			  =0.1
										_SCREAMING_SNAKE_CASE			  =512
										_SCREAMING_SNAKE_CASE			  =16
										_SCREAMING_SNAKE_CASE			  =2
										_SCREAMING_SNAKE_CASE			  =0.02
										_SCREAMING_SNAKE_CASE			  =3
										_SCREAMING_SNAKE_CASE			  =4
										_SCREAMING_SNAKE_CASE			  =None




						def 							__UpperCamelCase				(       self					:      Union[str, Any]  )							->     Optional[int]:


										"""simple docstring"""





										_SCREAMING_SNAKE_CASE			  =ids_tensor([self.batch_size, self.seq_length]				,    self.vocab_size  )

										_SCREAMING_SNAKE_CASE			  =None
										if self.use_input_mask:
														_SCREAMING_SNAKE_CASE			  =random_attention_mask([self.batch_size, self.seq_length]  )

										_SCREAMING_SNAKE_CASE			  =None
										_SCREAMING_SNAKE_CASE			  =None
										_SCREAMING_SNAKE_CASE			  =None
										if self.use_labels:
														_SCREAMING_SNAKE_CASE			  =ids_tensor([self.batch_size]				,    self.type_sequence_label_size  )
														_SCREAMING_SNAKE_CASE			  =ids_tensor([self.batch_size, self.seq_length]				,    self.num_labels  )
														_SCREAMING_SNAKE_CASE			  =ids_tensor([self.batch_size]				,    self.num_choices  )

										_SCREAMING_SNAKE_CASE			  =EsmConfig(
										    vocab_size=self.vocab_size				,    hidden_size=self.hidden_size				,    num_hidden_layers=self.num_hidden_layers				,    pad_token_id=1				,    num_attention_heads=self.num_attention_heads				,    intermediate_size=self.intermediate_size				,    hidden_act=self.hidden_act				,    hidden_dropout_prob=self.hidden_dropout_prob				,    attention_probs_dropout_prob=self.attention_probs_dropout_prob				,    max_position_embeddings=self.max_position_embeddings				,    type_vocab_size=self.type_vocab_size				,    initializer_range=self.initializer_range				,    )

										return config, input_ids, input_mask, sequence_labels, token_labels, choice_labels




						def 							__UpperCamelCase				(       self					:      List[Any]  )							->     int:


										"""simple docstring"""





										(
										    (
										    _SCREAMING_SNAKE_CASE				
										)  ,				(
										    _SCREAMING_SNAKE_CASE				
										)  ,				(
										    _SCREAMING_SNAKE_CASE				
										)  ,				(
										    _SCREAMING_SNAKE_CASE				
										)  ,				(
										    _SCREAMING_SNAKE_CASE				
										)  ,				(
										    _SCREAMING_SNAKE_CASE				
										)  ,								
										)			  =self.prepare_config_and_inputs()

										_SCREAMING_SNAKE_CASE			  =True
										_SCREAMING_SNAKE_CASE			  =floats_tensor([self.batch_size, self.seq_length, self.hidden_size]  )
										_SCREAMING_SNAKE_CASE			  =ids_tensor([self.batch_size, self.seq_length]				,    vocab_size=2  )

										return (
										    config,
										    input_ids,
										    input_mask,
										    sequence_labels,
										    token_labels,
										    choice_labels,
										    encoder_hidden_states,
										    encoder_attention_mask,
										)




						def 							__UpperCamelCase				(       self					:      Dict				,    _a					:      Dict				,    _a					:      str				,    _a					:      Optional[Any]				,    _a					:      List[Any]				,    _a					:      Optional[Any]				,    _a					:      int  )							->     Optional[int]:


										"""simple docstring"""





										_SCREAMING_SNAKE_CASE			  =TFEsmModel(config=_a  )
										_SCREAMING_SNAKE_CASE			  ={'''input_ids''': input_ids, '''attention_mask''': input_mask}
										_SCREAMING_SNAKE_CASE			  =model(_a  )

										_SCREAMING_SNAKE_CASE			  =[input_ids, input_mask]
										_SCREAMING_SNAKE_CASE			  =model(_a  )

										_SCREAMING_SNAKE_CASE			  =model(_a  )

										self.parent.assertEqual(result.last_hidden_state.shape				,    (self.batch_size, self.seq_length, self.hidden_size)  )




						def 							__UpperCamelCase				(       self					:      List[str]				,    _a					:      int				,    _a					:      Any				,    _a					:      Tuple				,    _a					:      Any				,    _a					:      Optional[Any]				,    _a					:      Union[str, Any]				,    _a					:      Any				,    _a					:      List[str]				,    )							->     List[str]:


										"""simple docstring"""





										_SCREAMING_SNAKE_CASE			  =True

										_SCREAMING_SNAKE_CASE			  =TFEsmModel(config=_a  )
										_SCREAMING_SNAKE_CASE			  ={
										    '''input_ids''': input_ids,
										    '''attention_mask''': input_mask,
										    '''encoder_hidden_states''': encoder_hidden_states,
										    '''encoder_attention_mask''': encoder_attention_mask,
										}
										_SCREAMING_SNAKE_CASE			  =model(_a  )

										_SCREAMING_SNAKE_CASE			  =[input_ids, input_mask]
										_SCREAMING_SNAKE_CASE			  =model(_a				,    encoder_hidden_states=_a  )

										# Also check the case where encoder outputs are not passed
										_SCREAMING_SNAKE_CASE			  =model(_a				,    attention_mask=_a  )

										self.parent.assertEqual(result.last_hidden_state.shape				,    (self.batch_size, self.seq_length, self.hidden_size)  )




						def 							__UpperCamelCase				(       self					:      Optional[Any]				,    _a					:      List[Any]				,    _a					:      List[Any]				,    _a					:      Dict				,    _a					:      int				,    _a					:      List[str]				,    _a					:      Dict  )							->     Union[str, Any]:


										"""simple docstring"""





										_SCREAMING_SNAKE_CASE			  =TFEsmForMaskedLM(config=_a  )
										_SCREAMING_SNAKE_CASE			  =model([input_ids, input_mask]  )
										self.parent.assertEqual(result.logits.shape				,    (self.batch_size, self.seq_length, self.vocab_size)  )




						def 							__UpperCamelCase				(       self					:      int				,    _a					:      List[Any]				,    _a					:      Any				,    _a					:      Optional[Any]				,    _a					:      Dict				,    _a					:      List[Any]				,    _a					:      str  )							->     str:


										"""simple docstring"""





										_SCREAMING_SNAKE_CASE			  =self.num_labels
										_SCREAMING_SNAKE_CASE			  =TFEsmForTokenClassification(config=_a  )
										_SCREAMING_SNAKE_CASE			  ={'''input_ids''': input_ids, '''attention_mask''': input_mask}
										_SCREAMING_SNAKE_CASE			  =model(_a  )
										self.parent.assertEqual(result.logits.shape				,    (self.batch_size, self.seq_length, self.num_labels)  )




						def 							__UpperCamelCase				(       self					:      str  )							->     str:


										"""simple docstring"""





										_SCREAMING_SNAKE_CASE			  =self.prepare_config_and_inputs()
										(
										    (
										    _SCREAMING_SNAKE_CASE				
										)  ,				(
										    _SCREAMING_SNAKE_CASE				
										)  ,				(
										    _SCREAMING_SNAKE_CASE				
										)  ,				(
										    _SCREAMING_SNAKE_CASE				
										)  ,				(
										    _SCREAMING_SNAKE_CASE				
										)  ,				(
										    _SCREAMING_SNAKE_CASE				
										)  ,								
										)			  =config_and_inputs
										_SCREAMING_SNAKE_CASE			  ={'''input_ids''': input_ids, '''attention_mask''': input_mask}
										return config, inputs_dict

@require_tf
class 						A__							(		UpperCamelCase__   ,     UpperCamelCase__   ,     unittest.TestCase  ):
						UpperCAmelCase             =						(
						    (
						        TFEsmModel,
						        TFEsmForMaskedLM,
						        TFEsmForSequenceClassification,
						        TFEsmForTokenClassification,
						    )
						    if is_tf_available()
						    else ()
						)
						UpperCAmelCase             =						(
						    {
						        "feature-extraction": TFEsmModel,
						        "fill-mask": TFEsmForMaskedLM,
						        "text-classification": TFEsmForSequenceClassification,
						        "token-classification": TFEsmForTokenClassification,
						        "zero-shot": TFEsmForSequenceClassification,
						    }
						    if is_tf_available()
						    else {}
						)
						UpperCAmelCase             =						False
						UpperCAmelCase             =						False




						def 							__UpperCamelCase				(       self					:      List[Any]  )							->     Tuple:


										"""simple docstring"""





										_SCREAMING_SNAKE_CASE			  =TFEsmModelTester(self  )
										_SCREAMING_SNAKE_CASE			  =ConfigTester(self				,    config_class=_a				,    hidden_size=37  )




						def 							__UpperCamelCase				(       self					:      Union[str, Any]  )							->     str:


										"""simple docstring"""





										self.config_tester.run_common_tests()




						def 							__UpperCamelCase				(       self					:      List[str]  )							->     List[str]:


										"""simple docstring"""





										_SCREAMING_SNAKE_CASE			  =self.model_tester.prepare_config_and_inputs()
										self.model_tester.create_and_check_model(*_a  )




						def 							__UpperCamelCase				(       self					:      Union[str, Any]  )							->     str:


										"""simple docstring"""





										_SCREAMING_SNAKE_CASE			  =self.model_tester.prepare_config_and_inputs_for_decoder()
										self.model_tester.create_and_check_model_as_decoder(*_a  )




						def 							__UpperCamelCase				(       self					:      int  )							->     Tuple:


										"""simple docstring"""





										_SCREAMING_SNAKE_CASE			  =self.model_tester.prepare_config_and_inputs()
										self.model_tester.create_and_check_for_masked_lm(*_a  )




						def 							__UpperCamelCase				(       self					:      Any  )							->     Dict:


										"""simple docstring"""





										_SCREAMING_SNAKE_CASE			  =self.model_tester.prepare_config_and_inputs()
										self.model_tester.create_and_check_for_token_classification(*_a  )




						@slow
						def 							__UpperCamelCase				(       self					:      int  )							->     Dict:


										"""simple docstring"""





										for model_name in TF_ESM_PRETRAINED_MODEL_ARCHIVE_LIST[:1]:
														_SCREAMING_SNAKE_CASE			  =TFEsmModel.from_pretrained(_a  )
														self.assertIsNotNone(_a  )




						@unittest.skip('''Protein models do not support embedding resizing.'''  )
						def 							__UpperCamelCase				(       self					:      int  )							->     str:


										"""simple docstring"""





										pass




						@unittest.skip('''Protein models do not support embedding resizing.'''  )
						def 							__UpperCamelCase				(       self					:      Optional[Any]  )							->     Tuple:


										"""simple docstring"""





										pass




						def 							__UpperCamelCase				(       self					:      Tuple  )							->     str:


										"""simple docstring"""





										_SCREAMING_SNAKE_CASE  ,				_SCREAMING_SNAKE_CASE			  =self.model_tester.prepare_config_and_inputs_for_common()

										for model_class in self.all_model_classes:
														_SCREAMING_SNAKE_CASE			  =model_class(_a  )
														assert isinstance(model.get_input_embeddings()				,    tf.keras.layers.Layer  )
														if model_class is TFEsmForMaskedLM:
																		# Output embedding test differs from the main test because they're a matrix, not a layer
																		_SCREAMING_SNAKE_CASE			  =model.get_bias()
																		assert isinstance(_a				,    _a  )
																		for k, v in name.items():
																						assert isinstance(_a				,    tf.Variable  )
														else:
																		_SCREAMING_SNAKE_CASE			  =model.get_output_embeddings()
																		assert x is None
																		_SCREAMING_SNAKE_CASE			  =model.get_bias()
																		assert name is None

@require_tf
class 						A__							(		unittest.TestCase  ):




						@slow
						def 							__UpperCamelCase				(       self					:      Any  )							->     Dict:


										"""simple docstring"""





										_SCREAMING_SNAKE_CASE			  =TFEsmForMaskedLM.from_pretrained('''facebook/esm2_t6_8M_UR50D'''  )

										_SCREAMING_SNAKE_CASE			  =tf.constant([[0, 1, 2, 3, 4, 5]]  )
										_SCREAMING_SNAKE_CASE			  =model(_a  )[0]
										_SCREAMING_SNAKE_CASE			  =[1, 6, 33]
										self.assertEqual(list(output.numpy().shape  )				,    _a  )
										# compare the actual values for a slice.
										_SCREAMING_SNAKE_CASE			  =tf.constant(
										    [
										        [
										            [8.92_15_18, -10.58_98_14, -6.4_67_13_07],
										            [-6.3_96_71_56, -13.91_13_77, -1.1_21_19_15],
										            [-7.78_12_47, -13.95_15_57, -3.74_05_92],
										        ]
										    ]  )
										self.assertTrue(numpy.allclose(output[:, :3, :3].numpy()				,    expected_slice.numpy()				,    atol=1E-2  )  )




						@slow
						def 							__UpperCamelCase				(       self					:      Union[str, Any]  )							->     Optional[Any]:


										"""simple docstring"""





										_SCREAMING_SNAKE_CASE			  =TFEsmModel.from_pretrained('''facebook/esm2_t6_8M_UR50D'''  )

										_SCREAMING_SNAKE_CASE			  =tf.constant([[0, 6, 4, 13, 5, 4, 16, 12, 11, 7, 2]]  )
										_SCREAMING_SNAKE_CASE			  =model(_a  )[0]
										# compare the actual values for a slice.
										_SCREAMING_SNAKE_CASE			  =tf.constant(
										    [
										        [
										            [0.14_44_30_92, 0.54_12_53_27, 0.3_24_77_39],
										            [0.30_34_04_84, 0.00_52_66_76, 0.31_07_77_22],
										            [0.32_27_80_43, -0.24_98_70_96, 0.3_41_46_28],
										        ]
										    ]  )
										self.assertTrue(numpy.allclose(output[:, :3, :3].numpy()				,    expected_slice.numpy()				,    atol=1E-4  )  )



import itertools
from dataclasses import dataclass
from typing import Any, Callable, Dict, List, Optional, Union

import pandas as pd
import pyarrow as pa

import datasets
import datasets.config
from datasets.features.features import require_storage_cast
from datasets.table import table_cast
from datasets.utils.py_utils import Literal


snake_case_						:			Any													=							datasets.utils.logging.get_logger(__name__)

snake_case_						:			List[Any]													=							['''names''', '''prefix''']
snake_case_						:			Dict													=							['''warn_bad_lines''', '''error_bad_lines''', '''mangle_dupe_cols''']
snake_case_						:			Dict													=							['''encoding_errors''', '''on_bad_lines''']
snake_case_						:			Optional[Any]													=							['''date_format''']

@dataclass
class 						A__							(		datasets.BuilderConfig  ):
						UpperCAmelCase             =						","
						UpperCAmelCase             =						None
						UpperCAmelCase             =						"infer"
						UpperCAmelCase             =						None
						UpperCAmelCase             =						None
						UpperCAmelCase             =						None
						UpperCAmelCase             =						None
						UpperCAmelCase             =						None
						UpperCAmelCase             =						True
						UpperCAmelCase             =						None
						UpperCAmelCase             =						None
						UpperCAmelCase             =						None
						UpperCAmelCase             =						None
						UpperCAmelCase             =						False
						UpperCAmelCase             =						None
						UpperCAmelCase             =						None
						UpperCAmelCase             =						None
						UpperCAmelCase             =						True
						UpperCAmelCase             =						True
						UpperCAmelCase             =						False
						UpperCAmelCase             =						True
						UpperCAmelCase             =						None
						UpperCAmelCase             =						"."
						UpperCAmelCase             =						None
						UpperCAmelCase             =						'"'
						UpperCAmelCase             =						0
						UpperCAmelCase             =						None
						UpperCAmelCase             =						None
						UpperCAmelCase             =						None
						UpperCAmelCase             =						None
						UpperCAmelCase             =						True
						UpperCAmelCase             =						True
						UpperCAmelCase             =						0
						UpperCAmelCase             =						True
						UpperCAmelCase             =						False
						UpperCAmelCase             =						None
						UpperCAmelCase             =						10000
						UpperCAmelCase             =						None
						UpperCAmelCase             =						"strict"
						UpperCAmelCase             =						"error"
						UpperCAmelCase             =						None




						def 							__UpperCamelCase				(       self					:      int  )							->     Union[str, Any]:


										"""simple docstring"""





										if self.delimiter is not None:
														_SCREAMING_SNAKE_CASE			  =self.delimiter
										if self.column_names is not None:
														_SCREAMING_SNAKE_CASE			  =self.column_names




						@property
						def 							__UpperCamelCase				(       self					:      Dict  )							->     List[Any]:


										"""simple docstring"""





										_SCREAMING_SNAKE_CASE			  ={
										    '''sep''': self.sep,
										    '''header''': self.header,
										    '''names''': self.names,
										    '''index_col''': self.index_col,
										    '''usecols''': self.usecols,
										    '''prefix''': self.prefix,
										    '''mangle_dupe_cols''': self.mangle_dupe_cols,
										    '''engine''': self.engine,
										    '''converters''': self.converters,
										    '''true_values''': self.true_values,
										    '''false_values''': self.false_values,
										    '''skipinitialspace''': self.skipinitialspace,
										    '''skiprows''': self.skiprows,
										    '''nrows''': self.nrows,
										    '''na_values''': self.na_values,
										    '''keep_default_na''': self.keep_default_na,
										    '''na_filter''': self.na_filter,
										    '''verbose''': self.verbose,
										    '''skip_blank_lines''': self.skip_blank_lines,
										    '''thousands''': self.thousands,
										    '''decimal''': self.decimal,
										    '''lineterminator''': self.lineterminator,
										    '''quotechar''': self.quotechar,
										    '''quoting''': self.quoting,
										    '''escapechar''': self.escapechar,
										    '''comment''': self.comment,
										    '''encoding''': self.encoding,
										    '''dialect''': self.dialect,
										    '''error_bad_lines''': self.error_bad_lines,
										    '''warn_bad_lines''': self.warn_bad_lines,
										    '''skipfooter''': self.skipfooter,
										    '''doublequote''': self.doublequote,
										    '''memory_map''': self.memory_map,
										    '''float_precision''': self.float_precision,
										    '''chunksize''': self.chunksize,
										    '''encoding_errors''': self.encoding_errors,
										    '''on_bad_lines''': self.on_bad_lines,
										    '''date_format''': self.date_format,
										}

										# some kwargs must not be passed if they don't have a default value
										# some others are deprecated and we can also not pass them if they are the default value
										for pd_read_csv_parameter in _PANDAS_READ_CSV_NO_DEFAULT_PARAMETERS + _PANDAS_READ_CSV_DEPRECATED_PARAMETERS:
														if pd_read_csv_kwargs[pd_read_csv_parameter] == getattr(CsvConfig()				,    _a  ):
																		del pd_read_csv_kwargs[pd_read_csv_parameter]

        # Remove 2.0 new arguments
										if not (datasets.config.PANDAS_VERSION.major >= 2):
														for pd_read_csv_parameter in _PANDAS_READ_CSV_NEW_2_0_0_PARAMETERS:
																		del pd_read_csv_kwargs[pd_read_csv_parameter]

        # Remove 1.3 new arguments
										if not (datasets.config.PANDAS_VERSION.major >= 1 and datasets.config.PANDAS_VERSION.minor >= 3):
														for pd_read_csv_parameter in _PANDAS_READ_CSV_NEW_1_3_0_PARAMETERS:
																		del pd_read_csv_kwargs[pd_read_csv_parameter]

										return pd_read_csv_kwargs

class 						A__							(		datasets.ArrowBasedBuilder  ):
						UpperCAmelCase             =						CsvConfig




						def 							__UpperCamelCase				(       self					:      Optional[int]  )							->     int:


										"""simple docstring"""





										return datasets.DatasetInfo(features=self.config.features  )




						def 							__UpperCamelCase				(       self					:      Dict				,    _a					:      str  )							->     List[str]:


										"""simple docstring"""





										if not self.config.data_files:
														raise ValueError(f"At least one data file must be specified, but got data_files={self.config.data_files}"  )
										_SCREAMING_SNAKE_CASE			  =dl_manager.download_and_extract(self.config.data_files  )
										if isinstance(_a				,    (str, list, tuple)  ):
														_SCREAMING_SNAKE_CASE			  =data_files
														if isinstance(_a				,    _a  ):
																		_SCREAMING_SNAKE_CASE			  =[files]
														_SCREAMING_SNAKE_CASE			  =[dl_manager.iter_files(_a  ) for file in files]
														return [datasets.SplitGenerator(name=datasets.Split.TRAIN				,    gen_kwargs={'''files''': files}  )]
										_SCREAMING_SNAKE_CASE			  =[]
										for split_name, files in data_files.items():
														if isinstance(_a				,    _a  ):
																		_SCREAMING_SNAKE_CASE			  =[files]
														_SCREAMING_SNAKE_CASE			  =[dl_manager.iter_files(_a  ) for file in files]
														splits.append(datasets.SplitGenerator(name=_a				,    gen_kwargs={'''files''': files}  )  )
										return splits




						def 							__UpperCamelCase				(       self					:      Tuple				,    _a					:      pa.Table  )							->     pa.Table:


										"""simple docstring"""





										if self.config.features is not None:
														_SCREAMING_SNAKE_CASE			  =self.config.features.arrow_schema
														if all(not require_storage_cast(_a  ) for feature in self.config.features.values()  ):
																		# cheaper cast
																		_SCREAMING_SNAKE_CASE			  =pa.Table.from_arrays([pa_table[field.name] for field in schema]				,    schema=_a  )
														else:
																		# more expensive cast; allows str <-> int/float or str to Audio for example
																		_SCREAMING_SNAKE_CASE			  =table_cast(_a				,    _a  )
										return pa_table




						def 							__UpperCamelCase				(       self					:      str				,    _a					:      Union[str, Any]  )							->     int:


										"""simple docstring"""





										_SCREAMING_SNAKE_CASE			  =self.config.features.arrow_schema if self.config.features else None
										# dtype allows reading an int column as str
										_SCREAMING_SNAKE_CASE			  =(
										    {
										        name: dtype.to_pandas_dtype() if not require_storage_cast(_a  ) else object
										        for name, dtype, feature in zip(schema.names				,    schema.types				,    self.config.features.values()  )
										    }
										    if schema is not None
										    else None
										)
										for file_idx, file in enumerate(itertools.chain.from_iterable(_a  )  ):
														_SCREAMING_SNAKE_CASE			  =pd.read_csv(_a				,    iterator=_a				,    dtype=_a				,    **self.config.pd_read_csv_kwargs  )
														try:
																		for batch_idx, df in enumerate(_a  ):
																						_SCREAMING_SNAKE_CASE			  =pa.Table.from_pandas(_a  )
																						# Uncomment for debugging (will print the Arrow table size and elements)
																						# logger.warning(f"pa_table: {pa_table} num rows: {pa_table.num_rows}")
																						# logger.warning('\n'.join(str(pa_table.slice(i, 1).to_pydict()) for i in range(pa_table.num_rows)))
																						yield (file_idx, batch_idx), self._cast_table(_a  )
														except ValueError as e:
																		logger.error(f"Failed to read file '{file}' with error {type(_a  )}: {e}"  )
																		raise