





'''simple docstring'''


import json
import os
import pickle
import subprocess
from hashlib import mda
from pathlib import Path
from tempfile import gettempdir
from textwrap import dedent
from types import CodeType, FunctionType
from unittest import TestCase
from unittest.mock import patch

import pytest
from multiprocess import Pool
from packaging import version

import datasets
from datasets.fingerprint import Hasher, fingerprint_transform
from datasets.table import InMemoryTable

from .utils import (
    require_regex,
    require_spacy,
    require_spacy_model,
    require_tiktoken,
    require_torch,
    require_transformers,
)



class 				__UpperCAmelCase	:







		'''simple docstring'''







		def __init__(self    :   List[Any]   ,   _lowerCAmelCase    :   Tuple   ):
			A					=   foo







		def __call__(self    :   Dict   ):
			return self.foo






class 				__UpperCAmelCase	(							datasets.Dataset    ):







		'''simple docstring'''







		@fingerprint_transform(inplace=_lowerCAmelCase   )
		def 							A  (self    :   str   ,   _lowerCAmelCase    :   List[str]   ,   *_lowerCAmelCase    :   str   ,   **_lowerCAmelCase    :   List[str]   ):
			return DatasetChild(self.data   ,   fingerprint=_lowerCAmelCase   )







		@fingerprint_transform(inplace=_lowerCAmelCase   )
		def 							A  (self    :   str   ,   _lowerCAmelCase    :   Optional[int]   ,   *_lowerCAmelCase    :   Optional[int]   ,   **_lowerCAmelCase    :   Tuple   ):
			return DatasetChild(self.data   ,   fingerprint=_lowerCAmelCase   )






class 				__UpperCAmelCase	:







		'''simple docstring'''







		def __init__(self    :   Optional[int]   ,   _lowerCAmelCase    :   Union[str, Any]   ):
			A					=   callable







		def __call__(self    :   str   ,   *_lowerCAmelCase    :   List[str]   ,   **_lowerCAmelCase    :   Union[str, Any]   ):
			if self.callable is not None:
				return self.callable(*_lowerCAmelCase   ,   **_lowerCAmelCase   )







		def __getstate__(self    :   Union[str, Any]   ):
			raise pickle.PicklingError()






class 				__UpperCAmelCase	(							A__    ):







		'''simple docstring'''







		@require_transformers
		@pytest.mark.integration
		def 							A  (self    :   Optional[Any]   ):
			from transformers import AutoTokenizer

			def encode(_lowerCAmelCase    :   Union[str, Any]   ):
				return tokenizer(_lowerCAmelCase   )

			# TODO: add hash consistency tests across sessions
			A					=   AutoTokenizer.from_pretrained("""bert-base-uncased"""   )
			A					=   mda(datasets.utils.py_utils.dumps(_lowerCAmelCase   )   ).hexdigest()
			A					=   mda(datasets.utils.py_utils.dumps(lambda _lowerCAmelCase   : tokenizer(_lowerCAmelCase   )   )   ).hexdigest()
			A					=   mda(datasets.utils.py_utils.dumps(_lowerCAmelCase   )   ).hexdigest()
			A					=   AutoTokenizer.from_pretrained("""bert-base-cased"""   )
			A					=   mda(datasets.utils.py_utils.dumps(_lowerCAmelCase   )   ).hexdigest()
			A					=   mda(datasets.utils.py_utils.dumps(lambda _lowerCAmelCase   : tokenizer(_lowerCAmelCase   )   )   ).hexdigest()
			A					=   mda(datasets.utils.py_utils.dumps(_lowerCAmelCase   )   ).hexdigest()
			A					=   AutoTokenizer.from_pretrained("""bert-base-uncased"""   )
			A					=   mda(datasets.utils.py_utils.dumps(_lowerCAmelCase   )   ).hexdigest()
			A					=   mda(datasets.utils.py_utils.dumps(lambda _lowerCAmelCase   : tokenizer(_lowerCAmelCase   )   )   ).hexdigest()
			A					=   mda(datasets.utils.py_utils.dumps(_lowerCAmelCase   )   ).hexdigest()
			self.assertEqual(_lowerCAmelCase   ,   _lowerCAmelCase   )
			self.assertNotEqual(_lowerCAmelCase   ,   _lowerCAmelCase   )
			self.assertEqual(_lowerCAmelCase   ,   _lowerCAmelCase   )
			self.assertNotEqual(_lowerCAmelCase   ,   _lowerCAmelCase   )
			self.assertEqual(_lowerCAmelCase   ,   _lowerCAmelCase   )
			self.assertNotEqual(_lowerCAmelCase   ,   _lowerCAmelCase   )







		@require_transformers
		@pytest.mark.integration
		def 							A  (self    :   Union[str, Any]   ):
			from transformers import AutoTokenizer

			A					=   AutoTokenizer.from_pretrained("""gpt2"""   )
			A					=   mda(datasets.utils.py_utils.dumps(_lowerCAmelCase   )   ).hexdigest()
			tokenizer("""Hello world !"""   )  # call once to change the tokenizer's cache
			A					=   mda(datasets.utils.py_utils.dumps(_lowerCAmelCase   )   ).hexdigest()
			self.assertEqual(_lowerCAmelCase   ,   _lowerCAmelCase   )







		@require_regex
		def 							A  (self    :   str   ):
			import regex

			A					=   regex.Regex("""foo"""   )
			A					=   mda(datasets.utils.py_utils.dumps(_lowerCAmelCase   )   ).hexdigest()
			A					=   regex.Regex("""bar"""   )
			A					=   mda(datasets.utils.py_utils.dumps(_lowerCAmelCase   )   ).hexdigest()
			A					=   regex.Regex("""foo"""   )
			A					=   mda(datasets.utils.py_utils.dumps(_lowerCAmelCase   )   ).hexdigest()
			self.assertEqual(_lowerCAmelCase   ,   _lowerCAmelCase   )
			self.assertNotEqual(_lowerCAmelCase   ,   _lowerCAmelCase   )






class 				__UpperCAmelCase	(							A__    ):







		'''simple docstring'''







		def 							A  (self    :   str   ):
			def func():
				return foo

			A					=   [0]
			A					=   mda(datasets.utils.py_utils.dumps(_lowerCAmelCase   )   ).hexdigest()
			A					=   [1]
			A					=   mda(datasets.utils.py_utils.dumps(_lowerCAmelCase   )   ).hexdigest()
			A					=   [0]
			A					=   mda(datasets.utils.py_utils.dumps(_lowerCAmelCase   )   ).hexdigest()
			self.assertEqual(_lowerCAmelCase   ,   _lowerCAmelCase   )
			self.assertNotEqual(_lowerCAmelCase   ,   _lowerCAmelCase   )







		def 							A  (self    :   Any   ):
			def func():
				pass

			A					=   mda(datasets.utils.py_utils.dumps(_lowerCAmelCase   )   ).hexdigest()

			def func():
				pass

			A					=   mda(datasets.utils.py_utils.dumps(_lowerCAmelCase   )   ).hexdigest()
			self.assertEqual(_lowerCAmelCase   ,   _lowerCAmelCase   )







		def 							A  (self    :   int   ):
			A					=   mda(datasets.utils.py_utils.dumps(Foo([0]   )   )   ).hexdigest()
			A					=   mda(datasets.utils.py_utils.dumps(Foo([1]   )   )   ).hexdigest()
			A					=   mda(datasets.utils.py_utils.dumps(Foo([0]   )   )   ).hexdigest()
			self.assertEqual(_lowerCAmelCase   ,   _lowerCAmelCase   )
			self.assertNotEqual(_lowerCAmelCase   ,   _lowerCAmelCase   )







		def 							A  (self    :   Tuple   ):
			A					=   mda(datasets.utils.py_utils.dumps(Foo([0]   ).__call__   )   ).hexdigest()
			A					=   mda(datasets.utils.py_utils.dumps(Foo([1]   ).__call__   )   ).hexdigest()
			A					=   mda(datasets.utils.py_utils.dumps(Foo([0]   ).__call__   )   ).hexdigest()
			self.assertEqual(_lowerCAmelCase   ,   _lowerCAmelCase   )
			self.assertNotEqual(_lowerCAmelCase   ,   _lowerCAmelCase   )







		def 							A  (self    :   str   ):
			A					=   (
			    """co_argcount""",
			    """co_kwonlyargcount""",
			    """co_nlocals""",
			    """co_stacksize""",
			    """co_flags""",
			    """co_code""",
			    """co_consts""",
			    """co_names""",
			    """co_varnames""",
			    """co_filename""",
			    """co_name""",
			    """co_firstlineno""",
			    """co_lnotab""",
			    """co_freevars""",
			    """co_cellvars""",
			)

			def _create_code_pyaa(*_lowerCAmelCase    :   List[str]   ):
				if hasattr(args[-3]   ,   """encode"""   ):
					A					=   list(_lowerCAmelCase   )
					A					=   args[-3].encode()  # co_lnotab
					A					=   args[-10].encode()  # co_code
				if hasattr(_lowerCAmelCase   ,   """co_posonlyargcount"""   ):
					if len(_lowerCAmelCase   ) == 16:
						return CodeType(*_lowerCAmelCase   )
					elif len(_lowerCAmelCase   ) == 15:
						return CodeType(args[0]   ,   0   ,   *args[1:]   )
					return CodeType(args[0]   ,   0   ,   0   ,   *args[1:]   )
				elif hasattr(_lowerCAmelCase   ,   """co_kwonlyargcount"""   ):
					if len(_lowerCAmelCase   ) == 16:
						return CodeType(args[0]   ,   *args[2:]   )
					elif len(_lowerCAmelCase   ) == 15:
						return CodeType(*_lowerCAmelCase   )
					return CodeType(args[0]   ,   0   ,   *args[1:]   )
				if len(_lowerCAmelCase   ) == 16:
					return CodeType(args[0]   ,   *args[3:]   )
				elif len(_lowerCAmelCase   ) == 15:
					return CodeType(args[0]   ,   *args[2:]   )
				return CodeType(*_lowerCAmelCase   )

			def create_ipython_func(_lowerCAmelCase    :   str   ,   _lowerCAmelCase    :   Optional[Any]   ):
				def func():
					return returned_obj

				A					=   func.__code__
				# Use _create_code from dill in order to make it work for different python versions
				if datasets.config.PY_VERSION < version.parse("""3.8"""   ):
					A					=   _create_code_pyaa(
					    *[getattr(_lowerCAmelCase   ,   _lowerCAmelCase   ) if k != """co_filename""" else co_filename for k in code_args_pyaa]   )
				else:
					A					=   code.replace(co_filename=_lowerCAmelCase   )
				return FunctionType(_lowerCAmelCase   ,   func.__globals__   ,   func.__name__   ,   func.__defaults__   ,   func.__closure__   )

			A	,     A					=   """<ipython-input-2-e0383a102aae>""", [0]
			A					=   mda(datasets.utils.py_utils.dumps(create_ipython_func(_lowerCAmelCase   ,   _lowerCAmelCase   )   )   ).hexdigest()
			A	,     A					=   """<ipython-input-2-e0383a102aae>""", [1]
			A					=   mda(datasets.utils.py_utils.dumps(create_ipython_func(_lowerCAmelCase   ,   _lowerCAmelCase   )   )   ).hexdigest()
			A	,     A					=   """<ipython-input-5-713f6613acf3>""", [0]
			A					=   mda(datasets.utils.py_utils.dumps(create_ipython_func(_lowerCAmelCase   ,   _lowerCAmelCase   )   )   ).hexdigest()
			self.assertEqual(_lowerCAmelCase   ,   _lowerCAmelCase   )
			self.assertNotEqual(_lowerCAmelCase   ,   _lowerCAmelCase   )

			A	,     A					=   os.path.join(gettempdir()   ,   """ipykernel_12345"""   ,   """321456789.py"""   ), [0]
			A					=   mda(datasets.utils.py_utils.dumps(create_ipython_func(_lowerCAmelCase   ,   _lowerCAmelCase   )   )   ).hexdigest()
			A	,     A					=   os.path.join(gettempdir()   ,   """ipykernel_12345"""   ,   """321456789.py"""   ), [1]
			A					=   mda(datasets.utils.py_utils.dumps(create_ipython_func(_lowerCAmelCase   ,   _lowerCAmelCase   )   )   ).hexdigest()
			A	,     A					=   os.path.join(gettempdir()   ,   """ipykernel_12345"""   ,   """654123987.py"""   ), [0]
			A					=   mda(datasets.utils.py_utils.dumps(create_ipython_func(_lowerCAmelCase   ,   _lowerCAmelCase   )   )   ).hexdigest()
			self.assertEqual(_lowerCAmelCase   ,   _lowerCAmelCase   )
			self.assertNotEqual(_lowerCAmelCase   ,   _lowerCAmelCase   )







		def 							A  (self    :   Tuple   ):
			A	,     A					=   [0], [1]

			def func():
				return foo, bar

			A					=   """__main__"""

			def globalvars_mocka_side_effect(_lowerCAmelCase    :   Any   ,   *_lowerCAmelCase    :   str   ,   **_lowerCAmelCase    :   Tuple   ):
				return {"foo": foo, "bar": bar}

			def globalvars_mocka_side_effect(_lowerCAmelCase    :   str   ,   *_lowerCAmelCase    :   Any   ,   **_lowerCAmelCase    :   List[Any]   ):
				return {"bar": bar, "foo": foo}

			with patch("""dill.detect.globalvars"""   ,   side_effect=_lowerCAmelCase   ) as globalvars_mocka:
				A					=   mda(datasets.utils.py_utils.dumps(_lowerCAmelCase   )   ).hexdigest()
				self.assertGreater(globalvars_mocka.call_count   ,   0   )
			with patch("""dill.detect.globalvars"""   ,   side_effect=_lowerCAmelCase   ) as globalvars_mocka:
				A					=   mda(datasets.utils.py_utils.dumps(_lowerCAmelCase   )   ).hexdigest()
				self.assertGreater(globalvars_mocka.call_count   ,   0   )
			self.assertEqual(_lowerCAmelCase   ,   _lowerCAmelCase   )






class 				__UpperCAmelCase	(							A__    ):







		'''simple docstring'''







		def 							A  (self    :   Tuple   ):
			A					=   Hasher.hash("""hello"""   )
			A					=   Hasher.hash("""hello"""   )
			A					=   Hasher.hash("""there"""   )
			self.assertEqual(_lowerCAmelCase   ,   _lowerCAmelCase   )
			self.assertNotEqual(_lowerCAmelCase   ,   _lowerCAmelCase   )







		def 							A  (self    :   int   ):
			A					=   Hasher.hash(Foo("""hello"""   )   )
			A					=   Hasher.hash(Foo("""hello"""   )   )
			A					=   Hasher.hash(Foo("""there"""   )   )
			self.assertEqual(_lowerCAmelCase   ,   _lowerCAmelCase   )
			self.assertNotEqual(_lowerCAmelCase   ,   _lowerCAmelCase   )







		def 							A  (self    :   Optional[Any]   ):
			A					=   Hasher()
			for x in ["hello", Foo("""hello"""   )]:
				hasher.update(_lowerCAmelCase   )
			A					=   hasher.hexdigest()
			A					=   Hasher()
			for x in ["hello", Foo("""hello"""   )]:
				hasher.update(_lowerCAmelCase   )
			A					=   hasher.hexdigest()
			A					=   Hasher()
			for x in ["there", Foo("""there"""   )]:
				hasher.update(_lowerCAmelCase   )
			A					=   hasher.hexdigest()
			self.assertEqual(_lowerCAmelCase   ,   _lowerCAmelCase   )
			self.assertNotEqual(_lowerCAmelCase   ,   _lowerCAmelCase   )







		def 							A  (self    :   Optional[Any]   ):
			with self.assertRaises(pickle.PicklingError   ):
				Hasher.hash(UnpicklableCallable(Foo("""hello"""   )   )   )







		def 							A  (self    :   List[Any]   ):
			A					=   """abc"""
			A					=   [string, string]  # two strings have the same ids
			A					=   [string, string]
			A					=   json.loads(F"""[\"{string}\", \"{string}\"]"""   )  # two strings have different ids
			self.assertIs(obja[0]   ,   _lowerCAmelCase   )
			self.assertIs(obja[0]   ,   obja[1]   )
			self.assertIs(obja[0]   ,   _lowerCAmelCase   )
			self.assertIs(obja[0]   ,   obja[1]   )
			self.assertIsNot(obja[0]   ,   _lowerCAmelCase   )
			self.assertIsNot(obja[0]   ,   obja[1]   )
			A					=   Hasher.hash(_lowerCAmelCase   )
			A					=   Hasher.hash(_lowerCAmelCase   )
			A					=   Hasher.hash(_lowerCAmelCase   )
			self.assertEqual(_lowerCAmelCase   ,   _lowerCAmelCase   )
			self.assertEqual(_lowerCAmelCase   ,   _lowerCAmelCase   )







		@require_tiktoken
		def 							A  (self    :   List[str]   ):
			import tiktoken

			A					=   tiktoken.get_encoding("""gpt2"""   )
			A					=   mda(datasets.utils.py_utils.dumps(_lowerCAmelCase   )   ).hexdigest()
			A					=   tiktoken.get_encoding("""r50k_base"""   )
			A					=   mda(datasets.utils.py_utils.dumps(_lowerCAmelCase   )   ).hexdigest()
			A					=   tiktoken.get_encoding("""gpt2"""   )
			A					=   mda(datasets.utils.py_utils.dumps(_lowerCAmelCase   )   ).hexdigest()
			self.assertEqual(_lowerCAmelCase   ,   _lowerCAmelCase   )
			self.assertNotEqual(_lowerCAmelCase   ,   _lowerCAmelCase   )







		@require_torch
		def 							A  (self    :   List[Any]   ):
			import torch

			A					=   torch.tensor([1.0]   )
			A					=   mda(datasets.utils.py_utils.dumps(_lowerCAmelCase   )   ).hexdigest()
			A					=   torch.tensor([2.0]   )
			A					=   mda(datasets.utils.py_utils.dumps(_lowerCAmelCase   )   ).hexdigest()
			A					=   torch.tensor([1.0]   )
			A					=   mda(datasets.utils.py_utils.dumps(_lowerCAmelCase   )   ).hexdigest()
			self.assertEqual(_lowerCAmelCase   ,   _lowerCAmelCase   )
			self.assertNotEqual(_lowerCAmelCase   ,   _lowerCAmelCase   )







		@require_spacy
		@require_spacy_model("""en_core_web_sm"""   )
		@require_spacy_model("""fr_core_news_sm"""   )
		@pytest.mark.integration
		def 							A  (self    :   Optional[int]   ):
			import spacy

			A					=   spacy.load("""en_core_web_sm"""   )
			A					=   mda(datasets.utils.py_utils.dumps(_lowerCAmelCase   )   ).hexdigest()
			A					=   spacy.load("""fr_core_news_sm"""   )
			A					=   mda(datasets.utils.py_utils.dumps(_lowerCAmelCase   )   ).hexdigest()
			A					=   spacy.load("""en_core_web_sm"""   )
			A					=   mda(datasets.utils.py_utils.dumps(_lowerCAmelCase   )   ).hexdigest()
			self.assertEqual(_lowerCAmelCase   ,   _lowerCAmelCase   )
			self.assertNotEqual(_lowerCAmelCase   ,   _lowerCAmelCase   )






@pytest.mark.integration
def  __a			(  UpperCAmelCase     )   ->Optional[int]:



	"""simple docstring"""







	A					=   tmp_path / """dir1"""
	A					=   tmp_path / """dir2"""
	dira.mkdir()
	dira.mkdir()
	A					=   """script.py"""
	A					=   dedent(
	    """
    from datasets.fingerprint import Hasher
    def foo():
        pass
    print(Hasher.hash(foo))
    """     )
	A					=   dira / script_filename
	A					=   dira / script_filename
	with script_patha.open("""w"""     ) as f:
		f.write(UpperCAmelCase     )
	with script_patha.open("""w"""     ) as f:
		f.write(UpperCAmelCase     )
	A					=   subprocess.check_output(["""python""", str(UpperCAmelCase     )]     )
	A					=   subprocess.check_output(["""python""", str(UpperCAmelCase     )]     )
	assert fingerprinta == fingerprinta




def  __a			(  )   ->Optional[Any]:



	"""simple docstring"""







	A					=   {"""a""": [0, 1, 2]}
	A					=   DatasetChild(InMemoryTable.from_pydict(UpperCAmelCase     )     )
	A					=   dataset.funca()._fingerprint
	assert expected_fingerprint == dataset.funca()._fingerprint
	assert expected_fingerprint != dataset.funca()._fingerprint

	with Pool(2     ) as p:
		assert expected_fingerprint == p.apply_async(dataset.funca     ).get()._fingerprint
		assert expected_fingerprint != p.apply_async(dataset.funca     ).get()._fingerprint




def  __a			(  )   ->str:



	"""simple docstring"""







	A					=   {"""a""": [0, 1, 2]}



	class 				__UpperCAmelCase	(							datasets.Dataset    ):







			'''simple docstring'''







			@fingerprint_transform(inplace=_lowerCAmelCase   )
			def 							A  (self    :   Dict   ,   _lowerCAmelCase    :   Dict   ):
				return DummyDatasetChild(self.data   ,   fingerprint=_lowerCAmelCase   )






	A					=   DummyDatasetChild(InMemoryTable.from_pydict(UpperCAmelCase     )     ).func()



	class 				__UpperCAmelCase	(							datasets.Dataset    ):







			'''simple docstring'''







			@fingerprint_transform(inplace=_lowerCAmelCase   ,   version="""1.0.0"""   )
			def 							A  (self    :   Union[str, Any]   ,   _lowerCAmelCase    :   str   ):
				return DummyDatasetChild(self.data   ,   fingerprint=_lowerCAmelCase   )






	A					=   DummyDatasetChild(InMemoryTable.from_pydict(UpperCAmelCase     )     ).func()



	class 				__UpperCAmelCase	(							datasets.Dataset    ):







			'''simple docstring'''







			@fingerprint_transform(inplace=_lowerCAmelCase   ,   version="""2.0.0"""   )
			def 							A  (self    :   List[str]   ,   _lowerCAmelCase    :   List[Any]   ):
				return DummyDatasetChild(self.data   ,   fingerprint=_lowerCAmelCase   )






	A					=   DummyDatasetChild(InMemoryTable.from_pydict(UpperCAmelCase     )     ).func()

	assert len({fingeprint_no_version, fingeprint_a, fingeprint_a}     ) == 3




def  __a			(  )   ->Dict:



	"""simple docstring"""







	A					=   Hasher()
	hasher.update(lambda UpperCAmelCase     : x     )








'''simple docstring'''


import argparse

import torch

from transformers import HubertConfig, HubertForSequenceClassification, WavaVecaFeatureExtractor, logging


logging.set_verbosity_info()
_lowerCamelCase					:						Dict					     =							logging.get_logger(__name__)

_lowerCamelCase					:						List[Any]					     =							['UtteranceLevel']




@torch.no_grad()
def  __a			(  UpperCAmelCase							,      UpperCAmelCase							,      UpperCAmelCase							,      UpperCAmelCase     )   ->Union[str, Any]:



	"""simple docstring"""







	A					=   torch.load(UpperCAmelCase							,      map_location="""cpu"""     )
	if checkpoint["Config"]["downstream_expert"]["modelrc"]["select"] not in SUPPORTED_MODELS:
		raise NotImplementedError(f"""The supported s3prl models are {SUPPORTED_MODELS}"""     )

	A					=   checkpoint["""Downstream"""]

	A					=   HubertConfig.from_pretrained(UpperCAmelCase     )
	A					=   HubertForSequenceClassification.from_pretrained(UpperCAmelCase							,      config=UpperCAmelCase     )
	A					=   WavaVecaFeatureExtractor.from_pretrained(
	    UpperCAmelCase							,      return_attention_mask=UpperCAmelCase							,      do_normalize=UpperCAmelCase     )

	if hf_congfig.use_weighted_layer_sum:
		A					=   checkpoint["""Featurizer"""]["""weights"""]

	A					=   downstream_dict["""projector.weight"""]
	A					=   downstream_dict["""projector.bias"""]
	A					=   downstream_dict["""model.post_net.linear.weight"""]
	A					=   downstream_dict["""model.post_net.linear.bias"""]

	hf_feature_extractor.save_pretrained(UpperCAmelCase     )
	hf_model.save_pretrained(UpperCAmelCase     )


if __name__ == "__main__":
				_lowerCamelCase					:						List[str]					     =							argparse.ArgumentParser()
				parser.add_argument(
				    '--base_model_name', default=None, type=str, help='Name of the huggingface pretrained base model.'
				)
				parser.add_argument('--config_path', default=None, type=str, help='Path to the huggingface classifier config.')
				parser.add_argument('--checkpoint_path', default=None, type=str, help='Path to the s3prl checkpoint.')
				parser.add_argument('--model_dump_path', default=None, type=str, help='Path to the final converted model.')
				_lowerCamelCase					:						List[Any]					     =							parser.parse_args()
				convert_saprl_checkpoint(args.base_model_name, args.config_path, args.checkpoint_path, args.model_dump_path)

