





import numpy as np

from transformers import Pipeline


def 							SCREAMING_SNAKE_CASE__  (      __a				):
	snake_case_						:     str     =		np.max(lowerCAmelCase__				,	axis=-1				,	keepdims=lowerCAmelCase__				)
	snake_case_						:     str     =		np.exp(outputs - maxes				)
	return shifted_exp / shifted_exp.sum(axis=-1				,	keepdims=lowerCAmelCase__				)


class SCREAMING_SNAKE_CASE_  (   __lowercase   ):






						def UpperCAmelCase_			( self : Union[str, Any]						,				**_A : List[str]		)							->      Optional[Any]:







							"""simple docstring"""


							snake_case_						:     Any     =		{}
							if "second_text" in kwargs:
								snake_case_						:     Optional[int]     =		kwargs['''second_text''']
							return preprocess_kwargs, {}, {}






						def UpperCAmelCase_			( self : Optional[int]						,				_A : List[Any]						,				_A : Dict=None		)							->      Union[str, Any]:







							"""simple docstring"""


							return self.tokenizer(snake_case_						,				text_pair=snake_case_						,				return_tensors=self.framework		)






						def UpperCAmelCase_			( self : List[str]						,				_A : int		)							->      int:







							"""simple docstring"""


							return self.model(**snake_case_		)






						def UpperCAmelCase_			( self : int						,				_A : Dict		)							->      int:







							"""simple docstring"""


							snake_case_						:     Dict     =		model_outputs.logits[0].numpy()
							snake_case_						:     Tuple     =		softmax(snake_case_		)

							snake_case_						:     int     =		np.argmax(snake_case_		)
							snake_case_						:     int     =		self.model.config.idalabel[best_class]
							snake_case_						:     Optional[int]     =		probabilities[best_class].item()
							snake_case_						:     str     =		logits.tolist()
							return {"label": label, "score": score, "logits": logits}








# this script reports modified .py files under the desired list of top-level sub-dirs passed as a list of arguments, e.g.:
#   python ./utils/get_modified_files.py utils src tests examples
#
# it uses git to find the forking point and which files were modified - i.e. files not under git won't be considered
# since the output of this script is fed into Makefile commands it doesn't print a newline after the results

import re
import subprocess
import sys


_SCREAMING_SNAKE_CASE 		=						subprocess.check_output("""git merge-base main HEAD""".split()).decode("""utf-8""")
_SCREAMING_SNAKE_CASE 		=						(
    subprocess.check_output(F'''git diff --diff-filter=d --name-only {fork_point_sha}'''.split()).decode("""utf-8""").split()
)

_SCREAMING_SNAKE_CASE 		=						"""|""".join(sys.argv[1:])
_SCREAMING_SNAKE_CASE 		=						re.compile(RF'''^({joined_dirs}).*?\.py$''')

_SCREAMING_SNAKE_CASE 		=						[x for x in modified_files if regex.match(x)]
print(""" """.join(relevant_modified_files), end="""""")

