Skip to content

Commit

Permalink
Fix merge issues
Browse files Browse the repository at this point in the history
Signed-off-by: Yoav Katz <katz@il.ibm.com>
  • Loading branch information
yoavkatz committed Nov 18, 2024
1 parent 4c91d5e commit eaead52
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/unitxt/inference.py
Original file line number Diff line number Diff line change
Expand Up @@ -1736,19 +1736,21 @@ def prepare_engine(self):
raise UnitxtError(
f"{provider} a known API. Supported apis: {','.join(self.provider_model_map.keys())}"
)
if self.model not in self.provider_model_map[api]:
if self.model not in self.provider_model_map[provider]:
raise UnitxtError(
f"{self.model} is not configured for provider {provider}. Supported models: {','.join(self.provider_model_map[api].keys())}"
f"{self.model} is not configured for provider {provider}. Supported models: {','.join(self.provider_model_map[provider].keys())}"
)
cls = self.__class__._provider_to_base_class[provider]
args = self.to_dict([StandardAPIParamsMixin])
args["model"] = self.provider_model_map[provider][self.model]
args["model"] = self.provider_model_map[provider][self.model]
params = list(args.keys())
if provider in self._provider_param_renaming:
for param in params:
if args[param] is not None:
if param in self._provider_param_renaming[provider]:
args[self._provider_param_renaming[provider][param]] = args[param]
args[self._provider_param_renaming[provider][param]] = args[
param
]
del args[param]
else:
del args[param]
Expand Down

0 comments on commit eaead52

Please sign in to comment.