Upload folder using huggingface_hub
Browse files- inference.py +56 -1
- loaders.py +3 -1
- task.py +2 -0
- version.py +1 -1
inference.py
CHANGED
|
@@ -2823,7 +2823,15 @@ class LiteLLMInferenceEngine(
|
|
| 2823 |
|
| 2824 |
|
| 2825 |
_supported_apis = Literal[
|
| 2826 |
-
"watsonx",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2827 |
]
|
| 2828 |
|
| 2829 |
|
|
@@ -2897,6 +2905,52 @@ class CrossProviderInferenceEngine(InferenceEngine, StandardAPIParamsMixin):
|
|
| 2897 |
"mistral-large-instruct": "mistralai/mistral-large-instruct-2407",
|
| 2898 |
"mixtral-8x7b-instruct": "mistralai/mixtral-8x7B-instruct-v0.1",
|
| 2899 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2900 |
}
|
| 2901 |
|
| 2902 |
_provider_to_base_class = {
|
|
@@ -2908,6 +2962,7 @@ class CrossProviderInferenceEngine(InferenceEngine, StandardAPIParamsMixin):
|
|
| 2908 |
"bam": IbmGenAiInferenceEngine,
|
| 2909 |
"watsonx-sdk": WMLInferenceEngine,
|
| 2910 |
"rits": RITSInferenceEngine,
|
|
|
|
| 2911 |
}
|
| 2912 |
|
| 2913 |
_provider_param_renaming = {
|
|
|
|
| 2823 |
|
| 2824 |
|
| 2825 |
_supported_apis = Literal[
|
| 2826 |
+
"watsonx",
|
| 2827 |
+
"together-ai",
|
| 2828 |
+
"open-ai",
|
| 2829 |
+
"aws",
|
| 2830 |
+
"ollama",
|
| 2831 |
+
"bam",
|
| 2832 |
+
"watsonx-sdk",
|
| 2833 |
+
"rits",
|
| 2834 |
+
"azure",
|
| 2835 |
]
|
| 2836 |
|
| 2837 |
|
|
|
|
| 2905 |
"mistral-large-instruct": "mistralai/mistral-large-instruct-2407",
|
| 2906 |
"mixtral-8x7b-instruct": "mistralai/mixtral-8x7B-instruct-v0.1",
|
| 2907 |
},
|
| 2908 |
+
"open-ai": {
|
| 2909 |
+
"o1-mini": "o1-mini",
|
| 2910 |
+
"o1-preview": "o1-preview",
|
| 2911 |
+
"gpt-4o-mini": "gpt-4o-mini",
|
| 2912 |
+
"gpt-4o-mini-2024-07-18": "gpt-4o-mini-2024-07-18",
|
| 2913 |
+
"gpt-4o": "gpt-4o",
|
| 2914 |
+
"gpt-4o-2024-08-06": "gpt-4o-2024-08-06",
|
| 2915 |
+
"gpt-4o-2024-05-13": "gpt-4o-2024-05-13",
|
| 2916 |
+
"gpt-4-turbo": "gpt-4-turbo",
|
| 2917 |
+
"gpt-4-turbo-preview": "gpt-4-0125-preview",
|
| 2918 |
+
"gpt-4-0125-preview": "gpt-4-0125-preview",
|
| 2919 |
+
"gpt-4-1106-preview": "gpt-4-1106-preview",
|
| 2920 |
+
"gpt-3.5-turbo-1106": "gpt-3.5-turbo-1106",
|
| 2921 |
+
"gpt-3.5-turbo": "gpt-3.5-turbo",
|
| 2922 |
+
"gpt-3.5-turbo-0301": "gpt-3.5-turbo-0301",
|
| 2923 |
+
"gpt-3.5-turbo-0613": "gpt-3.5-turbo-0613",
|
| 2924 |
+
"gpt-3.5-turbo-16k": "gpt-3.5-turbo-16k",
|
| 2925 |
+
"gpt-3.5-turbo-16k-0613": "gpt-3.5-turbo-16k-0613",
|
| 2926 |
+
"gpt-4": "gpt-4",
|
| 2927 |
+
"gpt-4-0314": "gpt-4-0314",
|
| 2928 |
+
"gpt-4-0613": "gpt-4-0613",
|
| 2929 |
+
"gpt-4-32k": "gpt-4-32k",
|
| 2930 |
+
"gpt-4-32k-0314": "gpt-4-32k-0314",
|
| 2931 |
+
"gpt-4-32k-0613": "gpt-4-32k-0613",
|
| 2932 |
+
"gpt-4-vision-preview": "gpt-4-vision-preview",
|
| 2933 |
+
},
|
| 2934 |
+
"azure": {
|
| 2935 |
+
"o1-mini": "azure/o1-mini",
|
| 2936 |
+
"o1-preview": "azure/o1-preview",
|
| 2937 |
+
"gpt-4o-mini": "azure/gpt-4o-mini",
|
| 2938 |
+
"gpt-4o": "azure/gpt-4o",
|
| 2939 |
+
"gpt-4": "azure/gpt-4",
|
| 2940 |
+
"gpt-4-0314": "azure/gpt-4-0314",
|
| 2941 |
+
"gpt-4-0613": "azure/gpt-4-0613",
|
| 2942 |
+
"gpt-4-32k": "azure/gpt-4-32k",
|
| 2943 |
+
"gpt-4-32k-0314": "azure/gpt-4-32k-0314",
|
| 2944 |
+
"gpt-4-32k-0613": "azure/gpt-4-32k-0613",
|
| 2945 |
+
"gpt-4-1106-preview": "azure/gpt-4-1106-preview",
|
| 2946 |
+
"gpt-4-0125-preview": "azure/gpt-4-0125-preview",
|
| 2947 |
+
"gpt-3.5-turbo": "azure/gpt-3.5-turbo",
|
| 2948 |
+
"gpt-3.5-turbo-0301": "azure/gpt-3.5-turbo-0301",
|
| 2949 |
+
"gpt-3.5-turbo-0613": "azure/gpt-3.5-turbo-0613",
|
| 2950 |
+
"gpt-3.5-turbo-16k": "azure/gpt-3.5-turbo-16k",
|
| 2951 |
+
"gpt-3.5-turbo-16k-0613": "azure/gpt-3.5-turbo-16k-0613",
|
| 2952 |
+
"gpt-4-vision": "azure/gpt-4-vision",
|
| 2953 |
+
},
|
| 2954 |
}
|
| 2955 |
|
| 2956 |
_provider_to_base_class = {
|
|
|
|
| 2962 |
"bam": IbmGenAiInferenceEngine,
|
| 2963 |
"watsonx-sdk": WMLInferenceEngine,
|
| 2964 |
"rits": RITSInferenceEngine,
|
| 2965 |
+
"azure": LiteLLMInferenceEngine,
|
| 2966 |
}
|
| 2967 |
|
| 2968 |
_provider_param_renaming = {
|
loaders.py
CHANGED
|
@@ -356,7 +356,9 @@ class LoadCSV(Loader):
|
|
| 356 |
file_path, nrows=self.get_limit(), sep=self.sep
|
| 357 |
).to_dict("records")
|
| 358 |
else:
|
| 359 |
-
iterables[split_name] = pd.read_csv(file_path).to_dict(
|
|
|
|
|
|
|
| 360 |
return iterables
|
| 361 |
|
| 362 |
|
|
|
|
| 356 |
file_path, nrows=self.get_limit(), sep=self.sep
|
| 357 |
).to_dict("records")
|
| 358 |
else:
|
| 359 |
+
iterables[split_name] = pd.read_csv(file_path, sep=self.sep).to_dict(
|
| 360 |
+
"records"
|
| 361 |
+
)
|
| 362 |
return iterables
|
| 363 |
|
| 364 |
|
task.py
CHANGED
|
@@ -75,6 +75,8 @@ class Task(InstanceOperator, ArtifactFetcherMixin):
|
|
| 75 |
|
| 76 |
def prepare_args(self):
|
| 77 |
super().prepare_args()
|
|
|
|
|
|
|
| 78 |
|
| 79 |
if self.input_fields is not None and self.inputs is not None:
|
| 80 |
raise UnitxtError(
|
|
|
|
| 75 |
|
| 76 |
def prepare_args(self):
|
| 77 |
super().prepare_args()
|
| 78 |
+
if isinstance(self.metrics, str):
|
| 79 |
+
self.metrics = [self.metrics]
|
| 80 |
|
| 81 |
if self.input_fields is not None and self.inputs is not None:
|
| 82 |
raise UnitxtError(
|
version.py
CHANGED
|
@@ -1 +1 @@
|
|
| 1 |
-
version = "1.16.
|
|
|
|
| 1 |
+
version = "1.16.3"
|