Add benchmark_util for transformers >= 4.44.0 (#12171)
				
					
				
			* Create benchmark_util_4_45.py * Update __init__.py * Update lint-python * Update benchmark_util_4_45.py * Update benchmark_util_4_45.py * Create benchmark_util_4_44.py
This commit is contained in:
		
							parent
							
								
									8e35800abe
								
							
						
					
					
						commit
						7d80db710e
					
				
					 4 changed files with 9290 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -21,7 +21,7 @@ SCRIPT_DIR="$( cd "$( dirname "$0" )" && pwd )"
 | 
			
		|||
PYTHON_ROOT_DIR="$SCRIPT_DIR/.."
 | 
			
		||||
echo $PYTHON_ROOT_DIR
 | 
			
		||||
PATHS_TO_CHECK="$SCRIPT_DIR/../../src"
 | 
			
		||||
PATTERNS_TO_EXCLUDE="__init__.py,log4Error.py,$SCRIPT_DIR/../../src/ipex_llm/langchain/*,$SCRIPT_DIR/../../src/ipex_llm/transformers/gguf/models/model_implement/yuan2/*,benchmark_util_4_29.py,benchmark_util_4_42.py,benchmark_util_4_43.py,tgi_api_server.py,api_server.py"
 | 
			
		||||
PATTERNS_TO_EXCLUDE="__init__.py,log4Error.py,$SCRIPT_DIR/../../src/ipex_llm/langchain/*,$SCRIPT_DIR/../../src/ipex_llm/transformers/gguf/models/model_implement/yuan2/*,benchmark_util_4_29.py,benchmark_util_4_42.py,benchmark_util_4_43.py,benchmark_util_4_44.py,benchmark_util_4_45.py,tgi_api_server.py,api_server.py"
 | 
			
		||||
PEP8_REPORT_PATH="$PYTHON_ROOT_DIR/test/pep8-report.txt"
 | 
			
		||||
PYLINT_REPORT_PATH="$PYTHON_ROOT_DIR/test/pylint-report.txt"
 | 
			
		||||
PYLINT_INSTALL_INFO="$PYTHON_ROOT_DIR/test/pylint-info.txt"
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -23,7 +23,9 @@ import transformers
 | 
			
		|||
trans_version = transformers.__version__
 | 
			
		||||
 | 
			
		||||
if trans_version >= "4.45.0":
 | 
			
		||||
    pass
 | 
			
		||||
    from .benchmark_util_4_45 import BenchmarkWrapper
 | 
			
		||||
elif trans_version >= "4.44.0":
 | 
			
		||||
    from .benchmark_util_4_44 import BenchmarkWrapper
 | 
			
		||||
elif trans_version >= "4.43.0":
 | 
			
		||||
    from .benchmark_util_4_43 import BenchmarkWrapper
 | 
			
		||||
elif trans_version >= "4.42.0":
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										4630
									
								
								python/llm/src/ipex_llm/utils/benchmark_util_4_44.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										4630
									
								
								python/llm/src/ipex_llm/utils/benchmark_util_4_44.py
									
									
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because it is too large
												Load diff
											
										
									
								
							
							
								
								
									
										4656
									
								
								python/llm/src/ipex_llm/utils/benchmark_util_4_45.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										4656
									
								
								python/llm/src/ipex_llm/utils/benchmark_util_4_45.py
									
									
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because it is too large
												Load diff
											
										
									
								
							
		Loading…
	
		Reference in a new issue