




import copy
import os
from typing import Union

from ...configuration_utils import PretrainedConfig
from ...utils import logging


UpperCamelCase								=					logging.get_logger(__name__)

UpperCamelCase								=					{
    'Salesforce/blip-vqa-base': 'https://huggingface.co/Salesforce/blip-vqa-base/resolve/main/config.json',
    'Salesforce/blip-vqa-capfit-large': (
        'https://huggingface.co/Salesforce/blip-vqa-base-capfit/resolve/main/config.json'
    ),
    'Salesforce/blip-image-captioning-base': (
        'https://huggingface.co/Salesforce/blip-image-captioning-base/resolve/main/config.json'
    ),
    'Salesforce/blip-image-captioning-large': (
        'https://huggingface.co/Salesforce/blip-image-captioning-large/resolve/main/config.json'
    ),
    'Salesforce/blip-itm-base-coco': 'https://huggingface.co/Salesforce/blip-itm-base-coco/resolve/main/config.json',
    'Salesforce/blip-itm-large-coco': 'https://huggingface.co/Salesforce/blip-itm-large-coco/resolve/main/config.json',
    'Salesforce/blip-itm-base-flikr': 'https://huggingface.co/Salesforce/blip-itm-base-flikr/resolve/main/config.json',
    'Salesforce/blip-itm-large-flikr': (
        'https://huggingface.co/Salesforce/blip-itm-large-flikr/resolve/main/config.json'
    ),
}





class 			__lowerCamelCase	(   UpperCamelCase__   ):




    """simple docstring"""

    snake_case__ =				"blip_text_model"


    def __init__(	self					:					Any       ,     SCREAMING_SNAKE_CASE__					:					List[Any]=30_524       ,     SCREAMING_SNAKE_CASE__					:					Tuple=768       ,     SCREAMING_SNAKE_CASE__					:					Tuple=768       ,     SCREAMING_SNAKE_CASE__					:					str=3_072       ,     SCREAMING_SNAKE_CASE__					:					Tuple=768       ,     SCREAMING_SNAKE_CASE__					:					int=12       ,     SCREAMING_SNAKE_CASE__					:					int=8       ,     SCREAMING_SNAKE_CASE__					:					List[str]=512       ,     SCREAMING_SNAKE_CASE__					:					List[Any]="gelu"       ,     SCREAMING_SNAKE_CASE__					:					str=1e-1_2       ,     SCREAMING_SNAKE_CASE__					:					List[Any]=0.0       ,     SCREAMING_SNAKE_CASE__					:					Tuple=0.0       ,     SCREAMING_SNAKE_CASE__					:					List[str]=0.02       ,     SCREAMING_SNAKE_CASE__					:					int=30_522       ,     SCREAMING_SNAKE_CASE__					:					Dict=2       ,     SCREAMING_SNAKE_CASE__					:					int=0       ,     SCREAMING_SNAKE_CASE__					:					Dict=102       ,     SCREAMING_SNAKE_CASE__					:					Optional[int]=True       ,     SCREAMING_SNAKE_CASE__					:					Dict=True       ,     **SCREAMING_SNAKE_CASE__					:					str       ,     )				->	List[str]:
         super().__init__(
             pad_token_id=SCREAMING_SNAKE_CASE__       ,     bos_token_id=SCREAMING_SNAKE_CASE__       ,     eos_token_id=SCREAMING_SNAKE_CASE__       ,     sep_token_id=SCREAMING_SNAKE_CASE__       ,     **SCREAMING_SNAKE_CASE__       ,     )

         lowerCAmelCase__          =			vocab_size
         lowerCAmelCase__          =			hidden_size
         lowerCAmelCase__          =			encoder_hidden_size
         lowerCAmelCase__          =			intermediate_size
         lowerCAmelCase__          =			projection_dim
         lowerCAmelCase__          =			hidden_dropout_prob
         lowerCAmelCase__          =			num_hidden_layers
         lowerCAmelCase__          =			num_attention_heads
         lowerCAmelCase__          =			max_position_embeddings
         lowerCAmelCase__          =			layer_norm_eps
         lowerCAmelCase__          =			hidden_act
         lowerCAmelCase__          =			initializer_range
         lowerCAmelCase__          =			attention_probs_dropout_prob
         lowerCAmelCase__          =			is_decoder
         lowerCAmelCase__          =			use_cache


    @classmethod
    def        a				(	cls					:					Optional[int]       ,     SCREAMING_SNAKE_CASE__					:					Union[str, os.PathLike]       ,     **SCREAMING_SNAKE_CASE__					:					List[Any]       )				->	"PretrainedConfig":
         cls._set_token_in_kwargs(SCREAMING_SNAKE_CASE__       )

         lowerCAmelCase__     ,		lowerCAmelCase__          =			cls.get_config_dict(SCREAMING_SNAKE_CASE__       ,     **SCREAMING_SNAKE_CASE__       )

         # get the text config dict if we are loading from BlipConfig
         if config_dict.get("model_type"       ) == "blip":
              lowerCAmelCase__          =			config_dict["text_config"]

         if "model_type" in config_dict and hasattr(cls       ,     "model_type"       ) and config_dict["model_type"] != cls.model_type:
              logger.warning(
                  f'You are using a model of type {config_dict["model_type"]} to instantiate a model of type '
                  f'{cls.model_type}. This is not supported for all configurations of models and can yield errors.'       )

         return cls.from_dict(SCREAMING_SNAKE_CASE__       ,     **SCREAMING_SNAKE_CASE__       )






class 			__lowerCamelCase	(   UpperCamelCase__   ):




    """simple docstring"""

    snake_case__ =				"blip_vision_model"


    def __init__(	self					:					Dict       ,     SCREAMING_SNAKE_CASE__					:					List[str]=768       ,     SCREAMING_SNAKE_CASE__					:					str=3_072       ,     SCREAMING_SNAKE_CASE__					:					Any=512       ,     SCREAMING_SNAKE_CASE__					:					Dict=12       ,     SCREAMING_SNAKE_CASE__					:					Optional[int]=12       ,     SCREAMING_SNAKE_CASE__					:					int=384       ,     SCREAMING_SNAKE_CASE__					:					int=16       ,     SCREAMING_SNAKE_CASE__					:					Any="gelu"       ,     SCREAMING_SNAKE_CASE__					:					Optional[Any]=1e-5       ,     SCREAMING_SNAKE_CASE__					:					Dict=0.0       ,     SCREAMING_SNAKE_CASE__					:					Tuple=1e-1_0       ,     **SCREAMING_SNAKE_CASE__					:					Optional[Any]       ,     )				->	Union[str, Any]:
         super().__init__(**SCREAMING_SNAKE_CASE__       )

         lowerCAmelCase__          =			hidden_size
         lowerCAmelCase__          =			intermediate_size
         lowerCAmelCase__          =			projection_dim
         lowerCAmelCase__          =			num_hidden_layers
         lowerCAmelCase__          =			num_attention_heads
         lowerCAmelCase__          =			patch_size
         lowerCAmelCase__          =			image_size
         lowerCAmelCase__          =			initializer_range
         lowerCAmelCase__          =			attention_dropout
         lowerCAmelCase__          =			layer_norm_eps
         lowerCAmelCase__          =			hidden_act


    @classmethod
    def        a				(	cls					:					Any       ,     SCREAMING_SNAKE_CASE__					:					Union[str, os.PathLike]       ,     **SCREAMING_SNAKE_CASE__					:					int       )				->	"PretrainedConfig":
         cls._set_token_in_kwargs(SCREAMING_SNAKE_CASE__       )

         lowerCAmelCase__     ,		lowerCAmelCase__          =			cls.get_config_dict(SCREAMING_SNAKE_CASE__       ,     **SCREAMING_SNAKE_CASE__       )

         # get the vision config dict if we are loading from BlipConfig
         if config_dict.get("model_type"       ) == "blip":
              lowerCAmelCase__          =			config_dict["vision_config"]

         if "model_type" in config_dict and hasattr(cls       ,     "model_type"       ) and config_dict["model_type"] != cls.model_type:
              logger.warning(
                  f'You are using a model of type {config_dict["model_type"]} to instantiate a model of type '
                  f'{cls.model_type}. This is not supported for all configurations of models and can yield errors.'       )

         return cls.from_dict(SCREAMING_SNAKE_CASE__       ,     **SCREAMING_SNAKE_CASE__       )






class 			__lowerCamelCase	(   UpperCamelCase__   ):




    """simple docstring"""

    snake_case__ =				"blip"
    snake_case__ =				True


    def __init__(	self					:					Union[str, Any]       ,     SCREAMING_SNAKE_CASE__					:					List[Any]=None       ,     SCREAMING_SNAKE_CASE__					:					Optional[Any]=None       ,     SCREAMING_SNAKE_CASE__					:					Any=512       ,     SCREAMING_SNAKE_CASE__					:					Union[str, Any]=2.6_592       ,     SCREAMING_SNAKE_CASE__					:					str=256       ,     **SCREAMING_SNAKE_CASE__					:					Dict       ,     )				->	List[Any]:
         super().__init__(**SCREAMING_SNAKE_CASE__       )

         if text_config is None:
              lowerCAmelCase__          =			{}
              logger.info("`text_config` is `None`. Initializing the `BlipTextConfig` with default values."       )

         if vision_config is None:
              lowerCAmelCase__          =			{}
              logger.info("`vision_config` is `None`. Initializing the `BlipVisionConfig` with default values."       )

         lowerCAmelCase__          =			BlipTextConfig(**SCREAMING_SNAKE_CASE__       )
         lowerCAmelCase__          =			BlipVisionConfig(**SCREAMING_SNAKE_CASE__       )

         lowerCAmelCase__          =			self.vision_config.hidden_size

         lowerCAmelCase__          =			projection_dim
         lowerCAmelCase__          =			logit_scale_init_value
         lowerCAmelCase__          =			1.0
         lowerCAmelCase__          =			0.02
         lowerCAmelCase__          =			image_text_hidden_size


    @classmethod
    def        a				(	cls					:					Tuple       ,     SCREAMING_SNAKE_CASE__					:					BlipTextConfig       ,     SCREAMING_SNAKE_CASE__					:					BlipVisionConfig       ,     **SCREAMING_SNAKE_CASE__					:					Union[str, Any]       )				->	str:
         return cls(text_config=text_config.to_dict()       ,     vision_config=vision_config.to_dict()       ,     **SCREAMING_SNAKE_CASE__       )


    def        a				(	self					:					int       )				->	Union[str, Any]:
         lowerCAmelCase__          =			copy.deepcopy(self.__dict__       )
         lowerCAmelCase__          =			self.text_config.to_dict()
         lowerCAmelCase__          =			self.vision_config.to_dict()
         lowerCAmelCase__          =			self.__class__.model_type
         return output






import os
import tempfile
import unittest
from pathlib import Path

from transformers import AutoConfig, is_torch_available
from transformers.testing_utils import require_torch, torch_device


if is_torch_available():
     from transformers import PyTorchBenchmark, PyTorchBenchmarkArguments





@require_torch
class 			__lowerCamelCase	(   unittest.TestCase   ):




    """simple docstring"""

    def        a				(	self					:					Any       ,     SCREAMING_SNAKE_CASE__					:					Any       )				->	int:
         for model_result in results.values():
              for batch_size, sequence_length in zip(model_result["bs"]       ,     model_result["ss"]       ):
                   lowerCAmelCase__          =			model_result["result"][batch_size][sequence_length]
                   self.assertIsNotNone(SCREAMING_SNAKE_CASE__       )


    def        a				(	self					:					Optional[Any]       )				->	Any:
         lowerCAmelCase__          =			"sshleifer/tiny-gpt2"
         lowerCAmelCase__          =			PyTorchBenchmarkArguments(
             models=[MODEL_ID]       ,     training=SCREAMING_SNAKE_CASE__       ,     inference=SCREAMING_SNAKE_CASE__       ,     sequence_lengths=[8]       ,     batch_sizes=[1]       ,     multi_process=SCREAMING_SNAKE_CASE__       ,     )
         lowerCAmelCase__          =			PyTorchBenchmark(SCREAMING_SNAKE_CASE__       )
         lowerCAmelCase__          =			benchmark.run()
         self.check_results_dict_not_empty(results.time_inference_result       )
         self.check_results_dict_not_empty(results.memory_inference_result       )


    def        a				(	self					:					int       )				->	Optional[Any]:
         lowerCAmelCase__          =			"sgugger/tiny-distilbert-classification"
         lowerCAmelCase__          =			PyTorchBenchmarkArguments(
             models=[MODEL_ID]       ,     training=SCREAMING_SNAKE_CASE__       ,     inference=SCREAMING_SNAKE_CASE__       ,     sequence_lengths=[8]       ,     batch_sizes=[1]       ,     multi_process=SCREAMING_SNAKE_CASE__       ,     only_pretrain_model=SCREAMING_SNAKE_CASE__       ,     )
         lowerCAmelCase__          =			PyTorchBenchmark(SCREAMING_SNAKE_CASE__       )
         lowerCAmelCase__          =			benchmark.run()
         self.check_results_dict_not_empty(results.time_inference_result       )
         self.check_results_dict_not_empty(results.memory_inference_result       )


    def        a				(	self					:					Optional[Any]       )				->	int:
         lowerCAmelCase__          =			"sshleifer/tiny-gpt2"
         lowerCAmelCase__          =			PyTorchBenchmarkArguments(
             models=[MODEL_ID]       ,     training=SCREAMING_SNAKE_CASE__       ,     inference=SCREAMING_SNAKE_CASE__       ,     torchscript=SCREAMING_SNAKE_CASE__       ,     sequence_lengths=[8]       ,     batch_sizes=[1]       ,     multi_process=SCREAMING_SNAKE_CASE__       ,     )
         lowerCAmelCase__          =			PyTorchBenchmark(SCREAMING_SNAKE_CASE__       )
         lowerCAmelCase__          =			benchmark.run()
         self.check_results_dict_not_empty(results.time_inference_result       )
         self.check_results_dict_not_empty(results.memory_inference_result       )


    @unittest.skipIf(torch_device == "cpu"       ,     "Cant do half precision"       )
    def        a				(	self					:					Dict       )				->	Optional[Any]:
         lowerCAmelCase__          =			"sshleifer/tiny-gpt2"
         lowerCAmelCase__          =			PyTorchBenchmarkArguments(
             models=[MODEL_ID]       ,     training=SCREAMING_SNAKE_CASE__       ,     inference=SCREAMING_SNAKE_CASE__       ,     fpaa=SCREAMING_SNAKE_CASE__       ,     sequence_lengths=[8]       ,     batch_sizes=[1]       ,     multi_process=SCREAMING_SNAKE_CASE__       ,     )
         lowerCAmelCase__          =			PyTorchBenchmark(SCREAMING_SNAKE_CASE__       )
         lowerCAmelCase__          =			benchmark.run()
         self.check_results_dict_not_empty(results.time_inference_result       )
         self.check_results_dict_not_empty(results.memory_inference_result       )


    def        a				(	self					:					Union[str, Any]       )				->	Tuple:
         lowerCAmelCase__          =			"sshleifer/tiny-gpt2"
         lowerCAmelCase__          =			AutoConfig.from_pretrained(SCREAMING_SNAKE_CASE__       )
         # set architectures equal to `None`
         lowerCAmelCase__          =			None
         lowerCAmelCase__          =			PyTorchBenchmarkArguments(
             models=[MODEL_ID]       ,     training=SCREAMING_SNAKE_CASE__       ,     inference=SCREAMING_SNAKE_CASE__       ,     sequence_lengths=[8]       ,     batch_sizes=[1]       ,     multi_process=SCREAMING_SNAKE_CASE__       ,     )
         lowerCAmelCase__          =			PyTorchBenchmark(SCREAMING_SNAKE_CASE__       ,     configs=[config]       )
         lowerCAmelCase__          =			benchmark.run()
         self.check_results_dict_not_empty(results.time_inference_result       )
         self.check_results_dict_not_empty(results.memory_inference_result       )


    def        a				(	self					:					Any       )				->	Optional[Any]:
         lowerCAmelCase__          =			"sshleifer/tiny-gpt2"
         lowerCAmelCase__          =			PyTorchBenchmarkArguments(
             models=[MODEL_ID]       ,     training=SCREAMING_SNAKE_CASE__       ,     inference=SCREAMING_SNAKE_CASE__       ,     sequence_lengths=[8]       ,     batch_sizes=[1]       ,     multi_process=SCREAMING_SNAKE_CASE__       ,     )
         lowerCAmelCase__          =			PyTorchBenchmark(SCREAMING_SNAKE_CASE__       )
         lowerCAmelCase__          =			benchmark.run()
         self.check_results_dict_not_empty(results.time_train_result       )
         self.check_results_dict_not_empty(results.memory_train_result       )


    @unittest.skipIf(torch_device == "cpu"       ,     "Can't do half precision"       )
    def        a				(	self					:					int       )				->	Dict:
         lowerCAmelCase__          =			"sshleifer/tiny-gpt2"
         lowerCAmelCase__          =			PyTorchBenchmarkArguments(
             models=[MODEL_ID]       ,     training=SCREAMING_SNAKE_CASE__       ,     inference=SCREAMING_SNAKE_CASE__       ,     sequence_lengths=[8]       ,     batch_sizes=[1]       ,     fpaa=SCREAMING_SNAKE_CASE__       ,     multi_process=SCREAMING_SNAKE_CASE__       ,     )
         lowerCAmelCase__          =			PyTorchBenchmark(SCREAMING_SNAKE_CASE__       )
         lowerCAmelCase__          =			benchmark.run()
         self.check_results_dict_not_empty(results.time_train_result       )
         self.check_results_dict_not_empty(results.memory_train_result       )


    def        a				(	self					:					Optional[int]       )				->	Union[str, Any]:
         lowerCAmelCase__          =			"sshleifer/tiny-gpt2"
         lowerCAmelCase__          =			AutoConfig.from_pretrained(SCREAMING_SNAKE_CASE__       )
         lowerCAmelCase__          =			PyTorchBenchmarkArguments(
             models=[MODEL_ID]       ,     training=SCREAMING_SNAKE_CASE__       ,     inference=SCREAMING_SNAKE_CASE__       ,     sequence_lengths=[8]       ,     batch_sizes=[1]       ,     multi_process=SCREAMING_SNAKE_CASE__       ,     )
         lowerCAmelCase__          =			PyTorchBenchmark(SCREAMING_SNAKE_CASE__       ,     configs=[config]       )
         lowerCAmelCase__          =			benchmark.run()
         self.check_results_dict_not_empty(results.time_inference_result       )
         self.check_results_dict_not_empty(results.memory_inference_result       )


    def        a				(	self					:					Optional[Any]       )				->	Optional[Any]:
         lowerCAmelCase__          =			"sshleifer/tinier_bart"
         lowerCAmelCase__          =			AutoConfig.from_pretrained(SCREAMING_SNAKE_CASE__       )
         lowerCAmelCase__          =			PyTorchBenchmarkArguments(
             models=[MODEL_ID]       ,     training=SCREAMING_SNAKE_CASE__       ,     inference=SCREAMING_SNAKE_CASE__       ,     sequence_lengths=[8]       ,     batch_sizes=[1]       ,     multi_process=SCREAMING_SNAKE_CASE__       ,     )
         lowerCAmelCase__          =			PyTorchBenchmark(SCREAMING_SNAKE_CASE__       ,     configs=[config]       )
         lowerCAmelCase__          =			benchmark.run()
         self.check_results_dict_not_empty(results.time_inference_result       )
         self.check_results_dict_not_empty(results.memory_inference_result       )


    def        a				(	self					:					List[str]       )				->	Dict:
         lowerCAmelCase__          =			"sshleifer/tiny-gpt2"
         lowerCAmelCase__          =			AutoConfig.from_pretrained(SCREAMING_SNAKE_CASE__       )
         lowerCAmelCase__          =			PyTorchBenchmarkArguments(
             models=[MODEL_ID]       ,     training=SCREAMING_SNAKE_CASE__       ,     inference=SCREAMING_SNAKE_CASE__       ,     sequence_lengths=[8]       ,     batch_sizes=[1]       ,     multi_process=SCREAMING_SNAKE_CASE__       ,     )
         lowerCAmelCase__          =			PyTorchBenchmark(SCREAMING_SNAKE_CASE__       ,     configs=[config]       )
         lowerCAmelCase__          =			benchmark.run()
         self.check_results_dict_not_empty(results.time_train_result       )
         self.check_results_dict_not_empty(results.memory_train_result       )


    def        a				(	self					:					Optional[int]       )				->	Optional[int]:
         lowerCAmelCase__          =			"sshleifer/tinier_bart"
         lowerCAmelCase__          =			AutoConfig.from_pretrained(SCREAMING_SNAKE_CASE__       )
         lowerCAmelCase__          =			PyTorchBenchmarkArguments(
             models=[MODEL_ID]       ,     training=SCREAMING_SNAKE_CASE__       ,     inference=SCREAMING_SNAKE_CASE__       ,     sequence_lengths=[8]       ,     batch_sizes=[1]       ,     multi_process=SCREAMING_SNAKE_CASE__       ,     )
         lowerCAmelCase__          =			PyTorchBenchmark(SCREAMING_SNAKE_CASE__       ,     configs=[config]       )
         lowerCAmelCase__          =			benchmark.run()
         self.check_results_dict_not_empty(results.time_train_result       )
         self.check_results_dict_not_empty(results.memory_train_result       )


    def        a				(	self					:					List[Any]       )				->	Optional[int]:
         lowerCAmelCase__          =			"sshleifer/tiny-gpt2"
         with tempfile.TemporaryDirectory() as tmp_dir:
              lowerCAmelCase__          =			PyTorchBenchmarkArguments(
                  models=[MODEL_ID]       ,     training=SCREAMING_SNAKE_CASE__       ,     inference=SCREAMING_SNAKE_CASE__       ,     save_to_csv=SCREAMING_SNAKE_CASE__       ,     sequence_lengths=[8]       ,     batch_sizes=[1]       ,     inference_time_csv_file=os.path.join(SCREAMING_SNAKE_CASE__       ,     "inf_time.csv"       )       ,     train_memory_csv_file=os.path.join(SCREAMING_SNAKE_CASE__       ,     "train_mem.csv"       )       ,     inference_memory_csv_file=os.path.join(SCREAMING_SNAKE_CASE__       ,     "inf_mem.csv"       )       ,     train_time_csv_file=os.path.join(SCREAMING_SNAKE_CASE__       ,     "train_time.csv"       )       ,     env_info_csv_file=os.path.join(SCREAMING_SNAKE_CASE__       ,     "env.csv"       )       ,     multi_process=SCREAMING_SNAKE_CASE__       ,     )
              lowerCAmelCase__          =			PyTorchBenchmark(SCREAMING_SNAKE_CASE__       )
              benchmark.run()
              self.assertTrue(Path(os.path.join(SCREAMING_SNAKE_CASE__       ,     "inf_time.csv"       )       ).exists()       )
              self.assertTrue(Path(os.path.join(SCREAMING_SNAKE_CASE__       ,     "train_time.csv"       )       ).exists()       )
              self.assertTrue(Path(os.path.join(SCREAMING_SNAKE_CASE__       ,     "inf_mem.csv"       )       ).exists()       )
              self.assertTrue(Path(os.path.join(SCREAMING_SNAKE_CASE__       ,     "train_mem.csv"       )       ).exists()       )
              self.assertTrue(Path(os.path.join(SCREAMING_SNAKE_CASE__       ,     "env.csv"       )       ).exists()       )


    def        a				(	self					:					Optional[Any]       )				->	Any:
         lowerCAmelCase__          =			"sshleifer/tiny-gpt2"

         def _check_summary_is_not_empty(SCREAMING_SNAKE_CASE__					:					List[Any]       ):
              self.assertTrue(hasattr(SCREAMING_SNAKE_CASE__       ,     "sequential"       )       )
              self.assertTrue(hasattr(SCREAMING_SNAKE_CASE__       ,     "cumulative"       )       )
              self.assertTrue(hasattr(SCREAMING_SNAKE_CASE__       ,     "current"       )       )
              self.assertTrue(hasattr(SCREAMING_SNAKE_CASE__       ,     "total"       )       )

         with tempfile.TemporaryDirectory() as tmp_dir:
              lowerCAmelCase__          =			PyTorchBenchmarkArguments(
                  models=[MODEL_ID]       ,     training=SCREAMING_SNAKE_CASE__       ,     inference=SCREAMING_SNAKE_CASE__       ,     sequence_lengths=[8]       ,     batch_sizes=[1]       ,     log_filename=os.path.join(SCREAMING_SNAKE_CASE__       ,     "log.txt"       )       ,     log_print=SCREAMING_SNAKE_CASE__       ,     trace_memory_line_by_line=SCREAMING_SNAKE_CASE__       ,     multi_process=SCREAMING_SNAKE_CASE__       ,     )
              lowerCAmelCase__          =			PyTorchBenchmark(SCREAMING_SNAKE_CASE__       )
              lowerCAmelCase__          =			benchmark.run()
              _check_summary_is_not_empty(result.inference_summary       )
              _check_summary_is_not_empty(result.train_summary       )
              self.assertTrue(Path(os.path.join(SCREAMING_SNAKE_CASE__       ,     "log.txt"       )       ).exists()       )
