From 469b1c79426f905630958670851488c12187456a Mon Sep 17 00:00:00 2001 From: Fahim Dalvi Date: Sun, 10 Sep 2023 11:07:34 +0300 Subject: [PATCH] Add support for env files for model configuration (#204) This commit implements the models reading environment variables directly to pick up model configuration, instead of relying on the assets to pass them in. Specific settings can still be passed in the assets as before, and they will have priority over env variables. A side effect of this is that OpenAI models also work now, not just Azure based ones. Finally, a new --env options enables loading env variables from .env files, and sample .env files are provided in the repo. * Add support for .env files * Add support for environment variables based configuration for OpenAI model * Remove all hardcoded model config options from assets * Add support for environment variable based configuration for Petals model * Remove all hardcoded model config options from BLOOMZ assets * Simplify tests as assets do not read environment variables by default * Fix missing check for model parameters in OpenAI model * Add sample env files * Fix model param reading bug * Update new assets * Add tests for OpenAI model configuration * Add tests for Petals model configuration * Remove unused os import from assets * Removed spurious class labels --- .gitignore | 3 + .../ar/MT/AraBench_ar2en_BLOOMZ_ZeroShot.py | 3 - assets/ar/MT/AraBench_ar2en_GPT35_ZeroShot.py | 7 - assets/ar/MT/AraBench_ar2en_GPT4_ZeroShot.py | 7 - assets/ar/QA/ARCD_BLOOMZ_ZeroShot.py | 3 - assets/ar/QA/ARCD_GPT35_ZeroShot.py | 7 - assets/ar/QA/ARCD_GPT4_FewShot.py | 7 - assets/ar/QA/ARCD_GPT4_ZeroShot.py | 8 - assets/ar/QA/MLQA_BLOOMZ_ZeroShot.py | 3 - assets/ar/QA/MLQA_GPT35_ZeroShot.py | 7 - assets/ar/QA/MLQA_GPT4_FewShot.py | 7 - assets/ar/QA/MLQA_GPT4_ZeroShot.py | 8 - assets/ar/QA/TyDiQA_BLOOMZ_ZeroShot.py | 3 - assets/ar/QA/TyDiQA_GPT35_ZeroShot.py | 7 - assets/ar/QA/TyDiQA_GPT4_FewShot.py | 7 - assets/ar/QA/TydiQA_GPT4_ZeroShot.py | 8 - assets/ar/QA/XQuAD_BLOOMZ_ZeroShot.py | 3 - assets/ar/QA/XQuAD_GPT35_ZeroShot.py | 7 - assets/ar/QA/XQuAD_GPT4_ZeroShot.py | 8 - assets/ar/QA/XQuaD_GPT4_FewShot.py | 7 - .../gender/ArabGend_BLOOMZ_ZeroShot.py | 3 - .../gender/ArabGend_GPT35_ZeroShot.py | 7 - .../gender/ArabGend_GPT4_ZeroShot.py | 7 - .../gender/ArapTweet_BLOOMZ_ZeroShot.py | 3 - .../gender/ArapTweet_GPT35_ZeroShot.py | 7 - .../gender/ArapTweet_GPT4_FewShot.py | 7 - .../gender/ArapTweet_GPT4_ZeroShot.py | 7 - .../location/Location_BLOOMZ_ZeroShot.py | 3 - .../location/Location_GPT35_ZeroShot.py | 7 - .../location/Location_GPT4_FewShot.py | 7 - .../location/Location_GPT4_ZeroShot.py | 7 - .../name_info/NameInfo_BLOOMZ_ZeroShot.py | 2 - .../name_info/NameInfo_GPT35_ZeroShot.py | 7 - .../name_info/NameInfo_GPT4_FewShot.py | 7 - .../name_info/NameInfo_GPT4_ZeroShot.py | 7 - .../Adult_BLOOMZ_ZeroShot.py | 3 - .../Adult_GPT35_ZeroShot.py | 7 - .../Adult_GPT4_FewShot.py | 7 - .../Adult_GPT4_ZeroShot.py | 7 - .../CT22Attentionworthy_BLOOMZ_ZeroShot.py | 3 - .../CT22Attentionworthy_GPT35_ZeroShot.py | 6 - .../CT22Attentionworthy_GPT4_FewShot.py | 7 - .../CT22Attentionworthy_GPT4_ZeroShot.py | 7 - .../CT22Checkworthiness_BLOOMZ_ZeroShot.py | 3 - .../CT22Checkworthiness_GPT35_ZeroShot.py | 7 - .../CT22Checkworthiness_GPT4_FewShot.py | 6 - .../CT22Checkworthiness_GPT4_ZeroShot.py | 6 - .../CT22Claim_BLOOMZ_ZeroShot.py | 3 - .../CT22Claim_GPT35_ZeroShot.py | 7 - .../claim_detection/CT22Claim_GPT4_FewShot.py | 7 - .../CT22Claim_GPT4_ZeroShot.py | 7 - .../COVID19Factuality_BLOOMZ_ZeroShot.py | 3 - .../COVID19Factuality_GPT4_FewShot.py | 7 - .../COVID19Factuality_GPT4_ZeroShot.py | 7 - .../Khouja20Factuality_BLOOMZ_ZeroShot.py | 3 - .../Khouja20Factuality_GPT35_ZeroShot.py | 7 - .../Khouja20Factuality_GPT4_FewShot.py | 7 - .../Khouja20Factuality_GPT4_ZeroShot.py | 7 - .../UnifiedFCFactuality_BLOOMZ_ZeroShot.py | 3 - .../UnifiedFCFactuality_GPT4_FewShot.py | 7 - .../UnifiedFCFactuality_GPT4_ZeroShot.py | 7 - .../CT22Harmful_BLOOMZ_ZeroShot.py | 3 - .../CT22Harmful_GPT35_ZeroShot.py | 7 - .../CT22Harmful_GPT4_FewShot.py | 7 - .../CT22Harmful_GPT4_ZeroShot.py | 6 - .../OSACT4SubtaskB_GPT35_ZeroShot.py | 7 - .../OSACT4SubtaskB_GPT4_FewShot.py | 7 - .../OSACT4SubtaskA_BLOOMZ_ZeroShot.py | 3 - .../OSACT4SubtaskA_GPT35_ZeroShot.py | 7 - .../OSACT4SubtaskA_GPT4_FewShot.py | 7 - .../OSACT4SubtaskA_GPT4_ZeroShot.py | 7 - .../propaganda/WANLP22T3_BLOOMZ_ZeroShot.py | 2 - .../propaganda/WANLP22T3_GPT35_ZeroShot.py | 7 - .../propaganda/WANLP22T3_GPT4_FewShot.py | 6 - .../propaganda/WANLP22T3_GPT4_ZeroShot.py | 6 - .../spam/Spam_BLOOMZ_ZeroShot.py | 3 - .../spam/Spam_GPT35_ZeroShot.py | 7 - .../spam/Spam_GPT4_ZeroShot.py | 7 - .../CT23Subjectivity_BLOOMZ_ZeroShot.py | 3 - .../CT23Subjectivity_GPT35_ZeroShot.py | 7 - .../CT23Subjectivity_GPT4_FewShot.py | 7 - .../CT23Subjectivity_GPT4_ZeroShot.py | 6 - .../ASND_BLOOMZ_ZeroShot.py | 3 - .../ASND_GPT35_ZeroShot.py | 7 - .../news_categorization/ASND_GPT4_FewShot.py | 7 - .../news_categorization/ASND_GPT4_ZeroShot.py | 7 - .../Akhbarona_BLOOMZ_ZeroShot.py | 2 - .../Akhbarona_GPT35_ZeroShot.py | 6 - .../Akhbarona_GPT4_FewShot.py | 6 - .../Akhbarona_GPT4_ZeroShot.py | 6 - .../AlArabiya_BLOOMZ_ZeroShot.py | 2 - .../AlArabiya_GPT35_ZeroShot.py | 6 - .../AlArabiya_GPT4_FewShot.py | 6 - .../AlArabiya_GPT4_ZeroShot.py | 6 - .../AlKhaleej_BLOOMZ_ZeroShot.py | 2 - .../AlKhaleej_GPT35_ZeroShot.py | 6 - .../AlKhaleej_GPT4_FewShot.py | 6 - .../AlKhaleej_GPT4_ZeroShot.py | 6 - .../ar/semantics/NLI/XNLI_BLOOMZ_ZeroShot.py | 3 - .../ar/semantics/NLI/XNLI_GPT35_ZeroShot.py | 7 - assets/ar/semantics/NLI/XNLI_GPT4_FewShot.py | 7 - assets/ar/semantics/NLI/XNLI_GPT4_ZeroShot.py | 7 - .../semantics/STS/Q2QSim_BLOOMZ_ZeroShot.py | 2 - .../ar/semantics/STS/Q2QSim_GPT35_ZeroShot.py | 7 - .../ar/semantics/STS/Q2QSim_GPT4_FewShot.py | 6 - .../ar/semantics/STS/Q2QSim_GPT4_ZeroShot.py | 6 - .../STS/SemEval17T1STS_BLOOMZ_ZeroShot.py | 2 - .../STS/SemEval17T1STS_GPT35_ZeroShot.py | 7 - .../STS/SemEval17T1STS_GPT4_FewShot.py | 7 - .../STS/SemEval17T1STS_GPT4_ZeroShot.py | 6 - .../STS/SemEval17T2STS_BLOOMZ_ZeroShot.py | 2 - .../STS/SemEval17T2STS_GPT35_ZeroShot.py | 8 - .../STS/SemEval17T2STS_GPT4_FewShot.py | 7 - .../STS/SemEval17T2STS_GPT4_ZeroShot.py | 6 - .../emotion/Emotion_BLOOMZ_ZeroShot.py | 3 - .../emotion/Emotion_GPT35_ZeroShot.py | 7 - .../emotion/Emotion_GPT4_FewShot.py | 7 - .../emotion/Emotion_GPT4_ZeroShot.py | 7 - .../sarcasm/ArSarcasm2_BLOOMZ_Zeroshot.py | 3 - .../sarcasm/ArSarcasm2_GPT3_ZeroShot.py | 7 - .../sarcasm/ArSarcasm2_GPT4_FewShot.py | 7 - .../sarcasm/ArSarcasm2_GPT4_ZeroShot.py | 7 - .../sarcasm/ArSarcasm_BLOOMZ_ZeroShot.py | 3 - .../sarcasm/ArSarcasm_GPT3_ZeroShot.py | 7 - .../sarcasm/ArSarcasm_GPT4_FewShot.py | 7 - .../sarcasm/ArSarcasm_GPT4_ZeroShot.py | 7 - .../sentiment/ArSAS_BLOOMZ_ZeroShot.py | 3 - .../sentiment/ArSAS_GPT35_ZeroShot.py | 7 - .../sentiment/ArSAS_GPT4_ZeroShot.py | 7 - .../Khouja20Stance_BLOOMZ_ZeroShot.py | 3 - .../Khouja20Stance_GPT35_ZeroShot.py | 7 - .../Khouja20Stance_GPT4_FewShot.py | 7 - .../Khouja20Stance_GPT4_ZeroShot.py | 7 - .../UnifiedFCStance_BLOOMZ_ZeroShot.py | 3 - .../UnifiedFCStance_GPT35_ZeroShot.py | 7 - .../UnifiedFCStance_GPT4_FewShot.py | 6 - .../UnifiedFCStance_GPT4_ZeroShot.py | 6 - .../NER/ANERcorp_GPT35_ZeroShot.py | 6 - .../NER/ANERcorp_GPT4_FewShot.py | 6 - .../NER/ANERcorp_GPT4_ZeroShot.py | 6 - .../NER/Aqmar_GPT35_ZeroShot.py | 6 - .../NER/Aqmar_GPT4_FewShot.py | 6 - .../NER/Aqmar_GPT4_ZeroShot.py | 6 - .../NER/MGBWords_GPT35_ZeroShot.py | 6 - .../NER/MGBWords_GPT4_ZeroShot.py | 6 - .../QCRIDialectalArabicPOS_GPT4_ZeroShot.py | 6 - .../POS/QCRIDialectalArabic_GPT35_ZeroShot.py | 6 - .../POS/QCRIDialectalArabic_GPT4_FewShot.py | 6 - .../POS/WikiNews_GPT35_ZeroShot.py | 6 - .../POS/WikiNews_GPT4_FewShot.py | 6 - .../POS/WikiNews_GPT4_ZeroShot.py | 6 - .../POS/XGLUE_GPT35_ZeroShot.py | 6 - .../POS/XGLUE_GPT4_FewShot.py | 6 - .../POS/XGLUE_GPT4_ZeroShot.py | 6 - .../BibleMaghrebi_GPT35_ZeroShot.py | 7 - .../BibleMaghrebi_GPT4_ZeroShot.py | 7 - .../diacritization/WikiNews_GPT35_ZeroShot.py | 7 - .../diacritization/WikiNews_GPT4_ZeroShot.py | 7 - .../ADI_BLOOMZ_ZeroShot.py | 3 - .../ADI_GPT35_ZeroShot.py | 7 - .../ADI_GPT4_FewShot.py | 7 - .../ADI_GPT4_ZeroShot.py | 7 - .../QADI_BLOOMZ_ZeroShot.py | 3 - .../QADI_GPT35_ZeroShot.py | 7 - .../QADI_GPT4_ZeroShot.py | 7 - .../lemmatization/WikiNews_BLOOMZ_ZeroShot.py | 3 - .../lemmatization/WikiNews_GPT35_ZeroShot.py | 7 - .../lemmatization/WikiNews_GPT4_ZeroShot.py | 7 - .../parsing/PADT_GPT35_ZeroShot.py | 7 - .../parsing/PADT_GPT4_ZeroShot.py | 7 - .../QCRIDialectalArabic_GPT35_ZeroShot.py | 6 - .../QCRIDialectalArabic_GPT4_ZeroShot.py | 6 - .../segmentation/WikiNews_GPT35_ZeroShot.py | 6 - .../segmentation/WikiNews_GPT4_ZeroShot.py | 6 - .../CT22Checkworthiness_BLOOMZ_ZeroShot.py | 3 - .../CT22Checkworthiness_GPT4_FewShot.py | 6 - .../CT22Checkworthiness_GPT4_ZeroShot.py | 6 - .../BanglaSentiment_BLOOMZ_ZeroShot.py | 3 - .../sentiment/BanglaSentiment_GPT4_FewShot.py | 7 - .../BanglaSentiment_GPT4_ZeroShot.py | 7 - .../SemEval23T3Propaganda_BLOOMZ_ZeroShot.py | 2 - .../SemEval23T3Propaganda_GPT4_FewShot.py | 6 - .../SemEval23T3Propaganda_GPT4_ZeroShot.py | 7 - .../CT22Checkworthiness_BLOOMZ_ZeroShot.py | 3 - .../CT22Checkworthiness_GPT4_FewShot.py | 6 - .../CT22Checkworthiness_GPT4_ZeroShot.py | 6 - .../SemEval23T3Propaganda_BLOOMZ_ZeroShot.py | 2 - .../SemEval23T3Propaganda_GPT4_FewShot.py | 6 - .../SemEval23T3Propaganda_GPT4_ZeroShot.py | 7 - .../CT22Checkworthiness_BLOOMZ_ZeroShot.py | 3 - .../CT22Checkworthiness_GPT4_FewShot.py | 6 - .../CT22Checkworthiness_GPT4_ZeroShot.py | 6 - .../SemEval23T3Propaganda_BLOOMZ_ZeroShot.py | 2 - .../SemEval23T3Propaganda_GPT4_FewShot.py | 6 - .../SemEval23T3Propaganda_GPT4_ZeroShot.py | 7 - .../SemEval23T3Propaganda_BLOOMZ_ZeroShot.py | 2 - .../SemEval23T3Propaganda_GPT4_FewShot.py | 6 - .../SemEval23T3Propaganda_GPT4_ZeroShot.py | 7 - .../CT22Checkworthiness_BLOOMZ_ZeroShot.py | 3 - .../CT22Checkworthiness_GPT4_FewShot.py | 6 - .../CT22Checkworthiness_GPT4_ZeroShot.py | 6 - .../SemEval23T3Propaganda_BLOOMZ_ZeroShot.py | 2 - .../SemEval23T3Propaganda_GPT4_FewShot.py | 6 - .../SemEval23T3Propaganda_GPT4_ZeroShot.py | 7 - .../SemEval23T3Propaganda_BLOOMZ_ZeroShot.py | 2 - .../SemEval23T3Propaganda_GPT4_FewShot.py | 6 - .../SemEval23T3Propaganda_GPT4_ZeroShot.py | 7 - .../CT22Checkworthiness_BLOOMZ_ZeroShot.py | 3 - .../CT22Checkworthiness_GPT4_FewShot.py | 6 - .../CT22Checkworthiness_GPT4_ZeroShot.py | 6 - envs/azure.env | 5 + envs/openai.env | 6 + envs/petals.env | 2 + llmebench/benchmark.py | 9 + llmebench/models/OpenAI.py | 171 +++++++++++------- llmebench/models/Petals.py | 15 +- setup.cfg | 1 + tests/models/test_LegacyOpenAI.py | 16 +- tests/models/test_OpenAIModel.py | 82 +++++++-- tests/models/test_Petals.py | 43 +++-- tests/tasks/test_evaluation.py | 16 +- tests/test_benchmark_assets.py | 7 +- 222 files changed, 249 insertions(+), 1322 deletions(-) create mode 100644 envs/azure.env create mode 100644 envs/openai.env create mode 100644 envs/petals.env diff --git a/.gitignore b/.gitignore index cbee3ea6..771000e9 100644 --- a/.gitignore +++ b/.gitignore @@ -21,3 +21,6 @@ data # Temporary tmp + +# Model configs +envs \ No newline at end of file diff --git a/assets/ar/MT/AraBench_ar2en_BLOOMZ_ZeroShot.py b/assets/ar/MT/AraBench_ar2en_BLOOMZ_ZeroShot.py index 3be4ec61..756c5ffc 100644 --- a/assets/ar/MT/AraBench_ar2en_BLOOMZ_ZeroShot.py +++ b/assets/ar/MT/AraBench_ar2en_BLOOMZ_ZeroShot.py @@ -1,5 +1,3 @@ -import os - from llmebench.datasets import AraBenchDataset from llmebench.models import PetalsModel from llmebench.tasks import MachineTranslationTask @@ -61,7 +59,6 @@ def config(): "task_args": {}, "model": PetalsModel, "model_args": { - "api_url": os.environ["API_URL"], "max_tries": 3, }, "general_args": {"data_path": "data/MT/"}, diff --git a/assets/ar/MT/AraBench_ar2en_GPT35_ZeroShot.py b/assets/ar/MT/AraBench_ar2en_GPT35_ZeroShot.py index d633f336..85b7ed3a 100644 --- a/assets/ar/MT/AraBench_ar2en_GPT35_ZeroShot.py +++ b/assets/ar/MT/AraBench_ar2en_GPT35_ZeroShot.py @@ -1,5 +1,3 @@ -import os - from llmebench.datasets import AraBenchDataset from llmebench.models import LegacyOpenAIModel from llmebench.tasks import MachineTranslationTask @@ -61,11 +59,6 @@ def config(): "task_args": {}, "model": LegacyOpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], "max_tries": 5, }, "general_args": {"data_path": "data/MT/"}, diff --git a/assets/ar/MT/AraBench_ar2en_GPT4_ZeroShot.py b/assets/ar/MT/AraBench_ar2en_GPT4_ZeroShot.py index a6f45284..84879af8 100644 --- a/assets/ar/MT/AraBench_ar2en_GPT4_ZeroShot.py +++ b/assets/ar/MT/AraBench_ar2en_GPT4_ZeroShot.py @@ -1,5 +1,3 @@ -import os - from llmebench.datasets import AraBenchDataset from llmebench.models import OpenAIModel from llmebench.tasks import MachineTranslationTask @@ -60,11 +58,6 @@ def config(): "task_args": {}, "model": OpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], "max_tries": 5, }, "general_args": {"data_path": "data/MT/"}, diff --git a/assets/ar/QA/ARCD_BLOOMZ_ZeroShot.py b/assets/ar/QA/ARCD_BLOOMZ_ZeroShot.py index ba7a7f86..a7296804 100644 --- a/assets/ar/QA/ARCD_BLOOMZ_ZeroShot.py +++ b/assets/ar/QA/ARCD_BLOOMZ_ZeroShot.py @@ -1,5 +1,3 @@ -import os - from llmebench.datasets import ARCDDataset from llmebench.models import PetalsModel from llmebench.tasks import QATask @@ -13,7 +11,6 @@ def config(): "task_args": {}, "model": PetalsModel, "model_args": { - "api_url": os.environ["API_URL"], "max_tries": 5, }, "general_args": {"data_path": "data/QA/ARCD/arcd-test.json"}, diff --git a/assets/ar/QA/ARCD_GPT35_ZeroShot.py b/assets/ar/QA/ARCD_GPT35_ZeroShot.py index a1e94529..94f9789a 100644 --- a/assets/ar/QA/ARCD_GPT35_ZeroShot.py +++ b/assets/ar/QA/ARCD_GPT35_ZeroShot.py @@ -1,5 +1,3 @@ -import os - from llmebench.datasets import ARCDDataset from llmebench.models import LegacyOpenAIModel from llmebench.tasks import QATask @@ -13,11 +11,6 @@ def config(): "task_args": {}, "model": LegacyOpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], "max_tries": 3, }, "general_args": {"data_path": "data/QA/ARCD/arcd-test.json"}, diff --git a/assets/ar/QA/ARCD_GPT4_FewShot.py b/assets/ar/QA/ARCD_GPT4_FewShot.py index c7b98bb2..4f966c59 100644 --- a/assets/ar/QA/ARCD_GPT4_FewShot.py +++ b/assets/ar/QA/ARCD_GPT4_FewShot.py @@ -1,4 +1,3 @@ -import os import random from llmebench.datasets import ARCDDataset @@ -16,12 +15,6 @@ def config(): "task_args": {}, "model": OpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], - "class_labels": "NA", "max_tries": 30, }, "general_args": { diff --git a/assets/ar/QA/ARCD_GPT4_ZeroShot.py b/assets/ar/QA/ARCD_GPT4_ZeroShot.py index d4826924..664c581a 100644 --- a/assets/ar/QA/ARCD_GPT4_ZeroShot.py +++ b/assets/ar/QA/ARCD_GPT4_ZeroShot.py @@ -1,5 +1,3 @@ -import os - from llmebench.datasets import ARCDDataset from llmebench.models import OpenAIModel from llmebench.tasks import QATask @@ -13,12 +11,6 @@ def config(): "task_args": {}, "model": OpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], - "class_labels": "NA", "max_tries": 50, }, "general_args": {"data_path": "data/QA/arcd/arcd-test.json"}, diff --git a/assets/ar/QA/MLQA_BLOOMZ_ZeroShot.py b/assets/ar/QA/MLQA_BLOOMZ_ZeroShot.py index c14aa890..5e4ea988 100644 --- a/assets/ar/QA/MLQA_BLOOMZ_ZeroShot.py +++ b/assets/ar/QA/MLQA_BLOOMZ_ZeroShot.py @@ -1,5 +1,3 @@ -import os - from llmebench.datasets import MLQADataset from llmebench.models import PetalsModel from llmebench.tasks import QATask @@ -13,7 +11,6 @@ def config(): "task_args": {}, "model": PetalsModel, "model_args": { - "api_url": os.environ["API_URL"], "max_tries": 5, }, "general_args": { diff --git a/assets/ar/QA/MLQA_GPT35_ZeroShot.py b/assets/ar/QA/MLQA_GPT35_ZeroShot.py index 7263c74d..a019acc9 100644 --- a/assets/ar/QA/MLQA_GPT35_ZeroShot.py +++ b/assets/ar/QA/MLQA_GPT35_ZeroShot.py @@ -1,5 +1,3 @@ -import os - from llmebench.datasets import MLQADataset from llmebench.models import LegacyOpenAIModel from llmebench.tasks import QATask @@ -13,11 +11,6 @@ def config(): "task_args": {}, "model": LegacyOpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], "max_tries": 3, }, "general_args": { diff --git a/assets/ar/QA/MLQA_GPT4_FewShot.py b/assets/ar/QA/MLQA_GPT4_FewShot.py index 85de700c..13eefdc1 100644 --- a/assets/ar/QA/MLQA_GPT4_FewShot.py +++ b/assets/ar/QA/MLQA_GPT4_FewShot.py @@ -1,4 +1,3 @@ -import os import random from llmebench.datasets import MLQADataset @@ -16,12 +15,6 @@ def config(): "task_args": {}, "model": OpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], - "class_labels": "NA", "max_tries": 30, }, "general_args": { diff --git a/assets/ar/QA/MLQA_GPT4_ZeroShot.py b/assets/ar/QA/MLQA_GPT4_ZeroShot.py index bc8568c9..813c5f5f 100644 --- a/assets/ar/QA/MLQA_GPT4_ZeroShot.py +++ b/assets/ar/QA/MLQA_GPT4_ZeroShot.py @@ -1,5 +1,3 @@ -import os - from llmebench.datasets import MLQADataset from llmebench.models import OpenAIModel from llmebench.tasks import QATask @@ -13,12 +11,6 @@ def config(): "task_args": {}, "model": OpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], - "class_labels": "NA", "max_tries": 50, }, "general_args": { diff --git a/assets/ar/QA/TyDiQA_BLOOMZ_ZeroShot.py b/assets/ar/QA/TyDiQA_BLOOMZ_ZeroShot.py index b7e6eae8..4a065a6e 100644 --- a/assets/ar/QA/TyDiQA_BLOOMZ_ZeroShot.py +++ b/assets/ar/QA/TyDiQA_BLOOMZ_ZeroShot.py @@ -1,5 +1,3 @@ -import os - from llmebench.datasets import TyDiQADataset from llmebench.models import PetalsModel from llmebench.tasks import QATask @@ -13,7 +11,6 @@ def config(): "task_args": {}, "model": PetalsModel, "model_args": { - "api_url": os.environ["API_URL"], "max_tries": 5, }, "general_args": {"data_path": "data/QA/tydiqa/tydiqa-goldp-dev-arabic.json"}, diff --git a/assets/ar/QA/TyDiQA_GPT35_ZeroShot.py b/assets/ar/QA/TyDiQA_GPT35_ZeroShot.py index 0760777c..1ee71123 100644 --- a/assets/ar/QA/TyDiQA_GPT35_ZeroShot.py +++ b/assets/ar/QA/TyDiQA_GPT35_ZeroShot.py @@ -1,5 +1,3 @@ -import os - from llmebench.datasets import TyDiQADataset from llmebench.models import LegacyOpenAIModel from llmebench.tasks import QATask @@ -13,11 +11,6 @@ def config(): "task_args": {}, "model": LegacyOpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], "max_tries": 3, }, "general_args": {"data_path": "data/QA/tydiqa/tydiqa-goldp-dev-arabic.json"}, diff --git a/assets/ar/QA/TyDiQA_GPT4_FewShot.py b/assets/ar/QA/TyDiQA_GPT4_FewShot.py index c78bc5e6..464d2f32 100644 --- a/assets/ar/QA/TyDiQA_GPT4_FewShot.py +++ b/assets/ar/QA/TyDiQA_GPT4_FewShot.py @@ -1,4 +1,3 @@ -import os import random from llmebench.datasets import TyDiQADataset @@ -16,12 +15,6 @@ def config(): "task_args": {}, "model": OpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], - "class_labels": "NA", "max_tries": 30, }, "general_args": { diff --git a/assets/ar/QA/TydiQA_GPT4_ZeroShot.py b/assets/ar/QA/TydiQA_GPT4_ZeroShot.py index d8287c44..245da513 100644 --- a/assets/ar/QA/TydiQA_GPT4_ZeroShot.py +++ b/assets/ar/QA/TydiQA_GPT4_ZeroShot.py @@ -1,5 +1,3 @@ -import os - from llmebench.datasets import TyDiQADataset from llmebench.models import OpenAIModel from llmebench.tasks import QATask @@ -13,12 +11,6 @@ def config(): "task_args": {}, "model": OpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], - "class_labels": "NA", "max_tries": 50, }, "general_args": {"data_path": "data/QA/tydiqa/tydiqa-goldp-dev-arabic.json"}, diff --git a/assets/ar/QA/XQuAD_BLOOMZ_ZeroShot.py b/assets/ar/QA/XQuAD_BLOOMZ_ZeroShot.py index a8f4b58a..9f6c76fc 100644 --- a/assets/ar/QA/XQuAD_BLOOMZ_ZeroShot.py +++ b/assets/ar/QA/XQuAD_BLOOMZ_ZeroShot.py @@ -1,5 +1,3 @@ -import os - from llmebench.datasets import XQuADDataset from llmebench.models import PetalsModel from llmebench.tasks import QATask @@ -13,7 +11,6 @@ def config(): "task_args": {}, "model": PetalsModel, "model_args": { - "api_url": os.environ["API_URL"], "max_tries": 5, }, "general_args": {"data_path": "data/QA/xquad/xquad.ar.json"}, diff --git a/assets/ar/QA/XQuAD_GPT35_ZeroShot.py b/assets/ar/QA/XQuAD_GPT35_ZeroShot.py index d1790705..872aa352 100644 --- a/assets/ar/QA/XQuAD_GPT35_ZeroShot.py +++ b/assets/ar/QA/XQuAD_GPT35_ZeroShot.py @@ -1,5 +1,3 @@ -import os - from llmebench.datasets import XQuADDataset from llmebench.models import LegacyOpenAIModel from llmebench.tasks import QATask @@ -13,11 +11,6 @@ def config(): "task_args": {}, "model": LegacyOpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], "max_tries": 3, }, "general_args": {"data_path": "data/QA/xquad/xquad.ar.json"}, diff --git a/assets/ar/QA/XQuAD_GPT4_ZeroShot.py b/assets/ar/QA/XQuAD_GPT4_ZeroShot.py index afa05166..bb83df4f 100644 --- a/assets/ar/QA/XQuAD_GPT4_ZeroShot.py +++ b/assets/ar/QA/XQuAD_GPT4_ZeroShot.py @@ -1,5 +1,3 @@ -import os - from llmebench.datasets import XQuADDataset from llmebench.models import OpenAIModel from llmebench.tasks import QATask @@ -13,12 +11,6 @@ def config(): "task_args": {}, "model": OpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], - "class_labels": "NA", "max_tries": 50, }, "general_args": {"data_path": "data/QA/xquad/xquad.ar.json"}, diff --git a/assets/ar/QA/XQuaD_GPT4_FewShot.py b/assets/ar/QA/XQuaD_GPT4_FewShot.py index 954a1a09..fdcab455 100644 --- a/assets/ar/QA/XQuaD_GPT4_FewShot.py +++ b/assets/ar/QA/XQuaD_GPT4_FewShot.py @@ -1,4 +1,3 @@ -import os import random from llmebench.datasets import XQuADDataset @@ -16,12 +15,6 @@ def config(): "task_args": {}, "model": OpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], - "class_labels": "NA", "max_tries": 30, }, "general_args": { diff --git a/assets/ar/demographic_attributes/gender/ArabGend_BLOOMZ_ZeroShot.py b/assets/ar/demographic_attributes/gender/ArabGend_BLOOMZ_ZeroShot.py index fd9af088..6bd166fd 100644 --- a/assets/ar/demographic_attributes/gender/ArabGend_BLOOMZ_ZeroShot.py +++ b/assets/ar/demographic_attributes/gender/ArabGend_BLOOMZ_ZeroShot.py @@ -1,5 +1,3 @@ -import os - from llmebench.datasets import ArabGendDataset from llmebench.models import PetalsModel from llmebench.tasks import DemographyGenderTask @@ -13,7 +11,6 @@ def config(): "task_args": {}, "model": PetalsModel, "model_args": { - "api_url": os.environ["API_URL"], "class_labels": ["m", "f"], "max_tries": 3, }, diff --git a/assets/ar/demographic_attributes/gender/ArabGend_GPT35_ZeroShot.py b/assets/ar/demographic_attributes/gender/ArabGend_GPT35_ZeroShot.py index 29597f48..4efca52b 100644 --- a/assets/ar/demographic_attributes/gender/ArabGend_GPT35_ZeroShot.py +++ b/assets/ar/demographic_attributes/gender/ArabGend_GPT35_ZeroShot.py @@ -1,5 +1,3 @@ -import os - from llmebench.datasets import ArabGendDataset from llmebench.models import LegacyOpenAIModel from llmebench.tasks import DemographyGenderTask @@ -13,11 +11,6 @@ def config(): "task_args": {}, "model": LegacyOpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], "class_labels": ["m", "f"], "max_tries": 3, }, diff --git a/assets/ar/demographic_attributes/gender/ArabGend_GPT4_ZeroShot.py b/assets/ar/demographic_attributes/gender/ArabGend_GPT4_ZeroShot.py index 2add4fe0..2aa750b3 100644 --- a/assets/ar/demographic_attributes/gender/ArabGend_GPT4_ZeroShot.py +++ b/assets/ar/demographic_attributes/gender/ArabGend_GPT4_ZeroShot.py @@ -1,5 +1,3 @@ -import os - from llmebench.datasets import ArabGendDataset from llmebench.models import OpenAIModel from llmebench.tasks import DemographyGenderTask @@ -13,11 +11,6 @@ def config(): "task_args": {}, "model": OpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], "class_labels": ["m", "f"], "max_tries": 3, }, diff --git a/assets/ar/demographic_attributes/gender/ArapTweet_BLOOMZ_ZeroShot.py b/assets/ar/demographic_attributes/gender/ArapTweet_BLOOMZ_ZeroShot.py index 13cf891f..6041f819 100644 --- a/assets/ar/demographic_attributes/gender/ArapTweet_BLOOMZ_ZeroShot.py +++ b/assets/ar/demographic_attributes/gender/ArapTweet_BLOOMZ_ZeroShot.py @@ -1,5 +1,3 @@ -import os - from llmebench.datasets import ArapTweetDataset from llmebench.models import PetalsModel from llmebench.tasks import DemographyGenderTask @@ -13,7 +11,6 @@ def config(): "task_args": {}, "model": PetalsModel, "model_args": { - "api_url": os.environ["API_URL"], "class_labels": ["Female", "Male"], "max_tries": 3, }, diff --git a/assets/ar/demographic_attributes/gender/ArapTweet_GPT35_ZeroShot.py b/assets/ar/demographic_attributes/gender/ArapTweet_GPT35_ZeroShot.py index 0e509396..a2aa412b 100644 --- a/assets/ar/demographic_attributes/gender/ArapTweet_GPT35_ZeroShot.py +++ b/assets/ar/demographic_attributes/gender/ArapTweet_GPT35_ZeroShot.py @@ -1,5 +1,3 @@ -import os - from llmebench.datasets import ArapTweetDataset from llmebench.models import LegacyOpenAIModel from llmebench.tasks import DemographyGenderTask @@ -13,11 +11,6 @@ def config(): "task_args": {}, "model": LegacyOpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], "class_labels": ["Female", "Male"], "max_tries": 20, }, diff --git a/assets/ar/demographic_attributes/gender/ArapTweet_GPT4_FewShot.py b/assets/ar/demographic_attributes/gender/ArapTweet_GPT4_FewShot.py index 65704361..f925c209 100644 --- a/assets/ar/demographic_attributes/gender/ArapTweet_GPT4_FewShot.py +++ b/assets/ar/demographic_attributes/gender/ArapTweet_GPT4_FewShot.py @@ -1,5 +1,3 @@ -import os - from llmebench.datasets import ArapTweetDataset from llmebench.models import OpenAIModel from llmebench.tasks import DemographyGenderTask @@ -13,11 +11,6 @@ def config(): "task_args": {}, "model": OpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], "class_labels": ["Female", "Male"], "max_tries": 30, }, diff --git a/assets/ar/demographic_attributes/gender/ArapTweet_GPT4_ZeroShot.py b/assets/ar/demographic_attributes/gender/ArapTweet_GPT4_ZeroShot.py index dfda5e80..26bddddb 100644 --- a/assets/ar/demographic_attributes/gender/ArapTweet_GPT4_ZeroShot.py +++ b/assets/ar/demographic_attributes/gender/ArapTweet_GPT4_ZeroShot.py @@ -1,5 +1,3 @@ -import os - from llmebench.datasets import ArapTweetDataset from llmebench.models import OpenAIModel from llmebench.tasks import DemographyGenderTask @@ -13,11 +11,6 @@ def config(): "task_args": {}, "model": OpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], "class_labels": ["Female", "Male"], "max_tries": 30, }, diff --git a/assets/ar/demographic_attributes/location/Location_BLOOMZ_ZeroShot.py b/assets/ar/demographic_attributes/location/Location_BLOOMZ_ZeroShot.py index d9a1deed..0675476d 100644 --- a/assets/ar/demographic_attributes/location/Location_BLOOMZ_ZeroShot.py +++ b/assets/ar/demographic_attributes/location/Location_BLOOMZ_ZeroShot.py @@ -1,5 +1,3 @@ -import os - from llmebench.datasets import LocationDataset from llmebench.models import PetalsModel from llmebench.tasks import DemographyLocationTask @@ -13,7 +11,6 @@ def config(): "task_args": {}, "model": PetalsModel, "model_args": { - "api_url": os.environ["API_URL"], "class_labels": [ "ae", "OTHERS", diff --git a/assets/ar/demographic_attributes/location/Location_GPT35_ZeroShot.py b/assets/ar/demographic_attributes/location/Location_GPT35_ZeroShot.py index 33a020b2..9c652517 100644 --- a/assets/ar/demographic_attributes/location/Location_GPT35_ZeroShot.py +++ b/assets/ar/demographic_attributes/location/Location_GPT35_ZeroShot.py @@ -1,5 +1,3 @@ -import os - from llmebench.datasets import LocationDataset from llmebench.models import LegacyOpenAIModel from llmebench.tasks import DemographyLocationTask @@ -13,11 +11,6 @@ def config(): "task_args": {}, "model": LegacyOpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], "class_labels": [ "ae", "OTHERS", diff --git a/assets/ar/demographic_attributes/location/Location_GPT4_FewShot.py b/assets/ar/demographic_attributes/location/Location_GPT4_FewShot.py index d2c49cfa..536814c6 100644 --- a/assets/ar/demographic_attributes/location/Location_GPT4_FewShot.py +++ b/assets/ar/demographic_attributes/location/Location_GPT4_FewShot.py @@ -1,5 +1,3 @@ -import os - from llmebench.datasets import LocationDataset from llmebench.models import OpenAIModel from llmebench.tasks import DemographyLocationTask @@ -13,11 +11,6 @@ def config(): "task_args": {}, "model": OpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], "class_labels": [ "ae", "OTHERS", diff --git a/assets/ar/demographic_attributes/location/Location_GPT4_ZeroShot.py b/assets/ar/demographic_attributes/location/Location_GPT4_ZeroShot.py index 6fd4d3a4..6c5fbef2 100644 --- a/assets/ar/demographic_attributes/location/Location_GPT4_ZeroShot.py +++ b/assets/ar/demographic_attributes/location/Location_GPT4_ZeroShot.py @@ -1,5 +1,3 @@ -import os - from llmebench.datasets import LocationDataset from llmebench.models import OpenAIModel from llmebench.tasks import DemographyLocationTask @@ -13,11 +11,6 @@ def config(): "task_args": {}, "model": OpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], "class_labels": [ "ae", "OTHERS", diff --git a/assets/ar/demographic_attributes/name_info/NameInfo_BLOOMZ_ZeroShot.py b/assets/ar/demographic_attributes/name_info/NameInfo_BLOOMZ_ZeroShot.py index e9f76aad..3e8df84a 100644 --- a/assets/ar/demographic_attributes/name_info/NameInfo_BLOOMZ_ZeroShot.py +++ b/assets/ar/demographic_attributes/name_info/NameInfo_BLOOMZ_ZeroShot.py @@ -1,4 +1,3 @@ -import os import re from llmebench.datasets import NameInfoDataset @@ -14,7 +13,6 @@ def config(): "task_args": {}, "model": PetalsModel, "model_args": { - "api_url": os.environ["API_URL"], "class_labels": [ "gb", "us", diff --git a/assets/ar/demographic_attributes/name_info/NameInfo_GPT35_ZeroShot.py b/assets/ar/demographic_attributes/name_info/NameInfo_GPT35_ZeroShot.py index 58178949..12ae9484 100644 --- a/assets/ar/demographic_attributes/name_info/NameInfo_GPT35_ZeroShot.py +++ b/assets/ar/demographic_attributes/name_info/NameInfo_GPT35_ZeroShot.py @@ -1,5 +1,3 @@ -import os - from llmebench.datasets import NameInfoDataset from llmebench.models import LegacyOpenAIModel from llmebench.tasks import DemographyNameInfoTask @@ -13,11 +11,6 @@ def config(): "task_args": {}, "model": LegacyOpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], "class_labels": [ "gb", "us", diff --git a/assets/ar/demographic_attributes/name_info/NameInfo_GPT4_FewShot.py b/assets/ar/demographic_attributes/name_info/NameInfo_GPT4_FewShot.py index 26941416..168c3e1b 100644 --- a/assets/ar/demographic_attributes/name_info/NameInfo_GPT4_FewShot.py +++ b/assets/ar/demographic_attributes/name_info/NameInfo_GPT4_FewShot.py @@ -1,5 +1,3 @@ -import os - from llmebench.datasets import NameInfoDataset from llmebench.models import OpenAIModel from llmebench.tasks import DemographyNameInfoTask @@ -13,11 +11,6 @@ def config(): "task_args": {}, "model": OpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], "class_labels": [ "gb", "us", diff --git a/assets/ar/demographic_attributes/name_info/NameInfo_GPT4_ZeroShot.py b/assets/ar/demographic_attributes/name_info/NameInfo_GPT4_ZeroShot.py index e0570ed3..64069d19 100644 --- a/assets/ar/demographic_attributes/name_info/NameInfo_GPT4_ZeroShot.py +++ b/assets/ar/demographic_attributes/name_info/NameInfo_GPT4_ZeroShot.py @@ -1,5 +1,3 @@ -import os - from llmebench.datasets import NameInfoDataset from llmebench.models import OpenAIModel from llmebench.tasks import DemographyNameInfoTask @@ -13,11 +11,6 @@ def config(): "task_args": {}, "model": OpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], "class_labels": [ "gb", "us", diff --git a/assets/ar/factuality_disinformation_harmful_content/adult_content_detection/Adult_BLOOMZ_ZeroShot.py b/assets/ar/factuality_disinformation_harmful_content/adult_content_detection/Adult_BLOOMZ_ZeroShot.py index fde43c3e..2e9c7927 100644 --- a/assets/ar/factuality_disinformation_harmful_content/adult_content_detection/Adult_BLOOMZ_ZeroShot.py +++ b/assets/ar/factuality_disinformation_harmful_content/adult_content_detection/Adult_BLOOMZ_ZeroShot.py @@ -1,5 +1,3 @@ -import os - from llmebench.datasets import AdultDataset from llmebench.models import PetalsModel from llmebench.tasks import AdultTask @@ -13,7 +11,6 @@ def config(): "task_args": {}, "model": PetalsModel, "model_args": { - "api_url": os.environ["API_URL"], "class_labels": ["ADULT", "NOT_ADULT"], "max_tries": 10, }, diff --git a/assets/ar/factuality_disinformation_harmful_content/adult_content_detection/Adult_GPT35_ZeroShot.py b/assets/ar/factuality_disinformation_harmful_content/adult_content_detection/Adult_GPT35_ZeroShot.py index eca817df..ad7b3a06 100644 --- a/assets/ar/factuality_disinformation_harmful_content/adult_content_detection/Adult_GPT35_ZeroShot.py +++ b/assets/ar/factuality_disinformation_harmful_content/adult_content_detection/Adult_GPT35_ZeroShot.py @@ -1,5 +1,3 @@ -import os - from llmebench.datasets import AdultDataset from llmebench.models import LegacyOpenAIModel from llmebench.tasks import AdultTask @@ -13,11 +11,6 @@ def config(): "task_args": {}, "model": LegacyOpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], "class_labels": ["ADULT", "NOT_ADULT"], "max_tries": 3, }, diff --git a/assets/ar/factuality_disinformation_harmful_content/adult_content_detection/Adult_GPT4_FewShot.py b/assets/ar/factuality_disinformation_harmful_content/adult_content_detection/Adult_GPT4_FewShot.py index 2bf541d0..16e9fbf7 100644 --- a/assets/ar/factuality_disinformation_harmful_content/adult_content_detection/Adult_GPT4_FewShot.py +++ b/assets/ar/factuality_disinformation_harmful_content/adult_content_detection/Adult_GPT4_FewShot.py @@ -1,5 +1,3 @@ -import os - from llmebench.datasets import AdultDataset from llmebench.models import OpenAIModel from llmebench.tasks import AdultTask @@ -13,11 +11,6 @@ def config(): "task_args": {}, "model": OpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], "class_labels": ["ADULT", "NOT_ADULT"], "max_tries": 30, }, diff --git a/assets/ar/factuality_disinformation_harmful_content/adult_content_detection/Adult_GPT4_ZeroShot.py b/assets/ar/factuality_disinformation_harmful_content/adult_content_detection/Adult_GPT4_ZeroShot.py index 2a8d8a96..3fbd08b2 100644 --- a/assets/ar/factuality_disinformation_harmful_content/adult_content_detection/Adult_GPT4_ZeroShot.py +++ b/assets/ar/factuality_disinformation_harmful_content/adult_content_detection/Adult_GPT4_ZeroShot.py @@ -1,5 +1,3 @@ -import os - from llmebench.datasets import AdultDataset from llmebench.models import OpenAIModel from llmebench.tasks import AdultTask @@ -13,11 +11,6 @@ def config(): "task_args": {}, "model": OpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], "class_labels": ["ADULT", "NOT_ADULT"], "max_tries": 3, }, diff --git a/assets/ar/factuality_disinformation_harmful_content/attentionworthy/CT22Attentionworthy_BLOOMZ_ZeroShot.py b/assets/ar/factuality_disinformation_harmful_content/attentionworthy/CT22Attentionworthy_BLOOMZ_ZeroShot.py index fa089d95..6b83efc3 100644 --- a/assets/ar/factuality_disinformation_harmful_content/attentionworthy/CT22Attentionworthy_BLOOMZ_ZeroShot.py +++ b/assets/ar/factuality_disinformation_harmful_content/attentionworthy/CT22Attentionworthy_BLOOMZ_ZeroShot.py @@ -1,5 +1,3 @@ -import os - from llmebench.datasets import CT22AttentionworthyDataset from llmebench.models import PetalsModel from llmebench.tasks import AttentionworthyTask @@ -13,7 +11,6 @@ def config(): "task_args": {}, "model": PetalsModel, "model_args": { - "api_url": os.environ["API_URL"], "max_tries": 3, }, "general_args": { diff --git a/assets/ar/factuality_disinformation_harmful_content/attentionworthy/CT22Attentionworthy_GPT35_ZeroShot.py b/assets/ar/factuality_disinformation_harmful_content/attentionworthy/CT22Attentionworthy_GPT35_ZeroShot.py index e2d47d08..1d1295ef 100644 --- a/assets/ar/factuality_disinformation_harmful_content/attentionworthy/CT22Attentionworthy_GPT35_ZeroShot.py +++ b/assets/ar/factuality_disinformation_harmful_content/attentionworthy/CT22Attentionworthy_GPT35_ZeroShot.py @@ -1,4 +1,3 @@ -import os import re from llmebench.datasets import CT22AttentionworthyDataset @@ -14,11 +13,6 @@ def config(): "task_args": {}, "model": LegacyOpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": "gpt", "class_labels": [ "yes_discusses_action_taken", "harmful", diff --git a/assets/ar/factuality_disinformation_harmful_content/attentionworthy/CT22Attentionworthy_GPT4_FewShot.py b/assets/ar/factuality_disinformation_harmful_content/attentionworthy/CT22Attentionworthy_GPT4_FewShot.py index acb27011..e7fa70f4 100644 --- a/assets/ar/factuality_disinformation_harmful_content/attentionworthy/CT22Attentionworthy_GPT4_FewShot.py +++ b/assets/ar/factuality_disinformation_harmful_content/attentionworthy/CT22Attentionworthy_GPT4_FewShot.py @@ -1,5 +1,3 @@ -import os - from llmebench.datasets import CT22AttentionworthyDataset from llmebench.models import OpenAIModel from llmebench.tasks import AttentionworthyTask @@ -13,11 +11,6 @@ def config(): "task_args": {}, "model": OpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], "class_labels": [ "yes_discusses_action_taken", "harmful", diff --git a/assets/ar/factuality_disinformation_harmful_content/attentionworthy/CT22Attentionworthy_GPT4_ZeroShot.py b/assets/ar/factuality_disinformation_harmful_content/attentionworthy/CT22Attentionworthy_GPT4_ZeroShot.py index f316d7d9..9eee58ed 100644 --- a/assets/ar/factuality_disinformation_harmful_content/attentionworthy/CT22Attentionworthy_GPT4_ZeroShot.py +++ b/assets/ar/factuality_disinformation_harmful_content/attentionworthy/CT22Attentionworthy_GPT4_ZeroShot.py @@ -1,5 +1,3 @@ -import os - from llmebench.datasets import CT22AttentionworthyDataset from llmebench.models import OpenAIModel from llmebench.tasks import AttentionworthyTask @@ -13,11 +11,6 @@ def config(): "task_args": {}, "model": OpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], "class_labels": [ "yes_discusses_action_taken", "harmful", diff --git a/assets/ar/factuality_disinformation_harmful_content/checkworthyness/CT22Checkworthiness_BLOOMZ_ZeroShot.py b/assets/ar/factuality_disinformation_harmful_content/checkworthyness/CT22Checkworthiness_BLOOMZ_ZeroShot.py index 870f1128..9aaa6618 100644 --- a/assets/ar/factuality_disinformation_harmful_content/checkworthyness/CT22Checkworthiness_BLOOMZ_ZeroShot.py +++ b/assets/ar/factuality_disinformation_harmful_content/checkworthyness/CT22Checkworthiness_BLOOMZ_ZeroShot.py @@ -1,5 +1,3 @@ -import os - from llmebench.datasets import CT22CheckworthinessDataset from llmebench.models import PetalsModel from llmebench.tasks import CheckworthinessTask @@ -13,7 +11,6 @@ def config(): "task_args": {}, "model": PetalsModel, "model_args": { - "api_url": os.environ["API_URL"], "class_labels": ["0", "1"], "max_tries": 3, }, diff --git a/assets/ar/factuality_disinformation_harmful_content/checkworthyness/CT22Checkworthiness_GPT35_ZeroShot.py b/assets/ar/factuality_disinformation_harmful_content/checkworthyness/CT22Checkworthiness_GPT35_ZeroShot.py index 5acab5e3..67d59b55 100644 --- a/assets/ar/factuality_disinformation_harmful_content/checkworthyness/CT22Checkworthiness_GPT35_ZeroShot.py +++ b/assets/ar/factuality_disinformation_harmful_content/checkworthyness/CT22Checkworthiness_GPT35_ZeroShot.py @@ -1,5 +1,3 @@ -import os - from llmebench.datasets import CT22CheckworthinessDataset from llmebench.models import LegacyOpenAIModel from llmebench.tasks import CheckworthinessTask @@ -13,11 +11,6 @@ def config(): "task_args": {}, "model": LegacyOpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": "gpt", "class_labels": ["0", "1"], "max_tries": 3, }, diff --git a/assets/ar/factuality_disinformation_harmful_content/checkworthyness/CT22Checkworthiness_GPT4_FewShot.py b/assets/ar/factuality_disinformation_harmful_content/checkworthyness/CT22Checkworthiness_GPT4_FewShot.py index ac167510..fa39528c 100644 --- a/assets/ar/factuality_disinformation_harmful_content/checkworthyness/CT22Checkworthiness_GPT4_FewShot.py +++ b/assets/ar/factuality_disinformation_harmful_content/checkworthyness/CT22Checkworthiness_GPT4_FewShot.py @@ -1,4 +1,3 @@ -import os import random import re @@ -18,11 +17,6 @@ def config(): "task_args": {}, "model": OpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], "class_labels": ["0", "1"], "max_tries": 30, }, diff --git a/assets/ar/factuality_disinformation_harmful_content/checkworthyness/CT22Checkworthiness_GPT4_ZeroShot.py b/assets/ar/factuality_disinformation_harmful_content/checkworthyness/CT22Checkworthiness_GPT4_ZeroShot.py index a8e49c7b..16b66362 100644 --- a/assets/ar/factuality_disinformation_harmful_content/checkworthyness/CT22Checkworthiness_GPT4_ZeroShot.py +++ b/assets/ar/factuality_disinformation_harmful_content/checkworthyness/CT22Checkworthiness_GPT4_ZeroShot.py @@ -1,4 +1,3 @@ -import os import random import re @@ -18,11 +17,6 @@ def config(): "task_args": {}, "model": OpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], "class_labels": ["0", "1"], "max_tries": 30, }, diff --git a/assets/ar/factuality_disinformation_harmful_content/claim_detection/CT22Claim_BLOOMZ_ZeroShot.py b/assets/ar/factuality_disinformation_harmful_content/claim_detection/CT22Claim_BLOOMZ_ZeroShot.py index 94a03a60..bf0e1c50 100644 --- a/assets/ar/factuality_disinformation_harmful_content/claim_detection/CT22Claim_BLOOMZ_ZeroShot.py +++ b/assets/ar/factuality_disinformation_harmful_content/claim_detection/CT22Claim_BLOOMZ_ZeroShot.py @@ -1,5 +1,3 @@ -import os - from llmebench.datasets import CT22ClaimDataset from llmebench.models import PetalsModel from llmebench.tasks import ClaimDetectionTask @@ -13,7 +11,6 @@ def config(): "task_args": {}, "model": PetalsModel, "model_args": { - "api_url": os.environ["API_URL"], "max_tries": 3, }, "general_args": { diff --git a/assets/ar/factuality_disinformation_harmful_content/claim_detection/CT22Claim_GPT35_ZeroShot.py b/assets/ar/factuality_disinformation_harmful_content/claim_detection/CT22Claim_GPT35_ZeroShot.py index dc6daed8..4006ece8 100644 --- a/assets/ar/factuality_disinformation_harmful_content/claim_detection/CT22Claim_GPT35_ZeroShot.py +++ b/assets/ar/factuality_disinformation_harmful_content/claim_detection/CT22Claim_GPT35_ZeroShot.py @@ -1,5 +1,3 @@ -import os - from llmebench.datasets import CT22ClaimDataset from llmebench.models import LegacyOpenAIModel from llmebench.tasks import ClaimDetectionTask @@ -13,11 +11,6 @@ def config(): "task_args": {}, "model": LegacyOpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], "class_labels": ["0", "1"], "max_tries": 3, }, diff --git a/assets/ar/factuality_disinformation_harmful_content/claim_detection/CT22Claim_GPT4_FewShot.py b/assets/ar/factuality_disinformation_harmful_content/claim_detection/CT22Claim_GPT4_FewShot.py index 0e1903ec..8221f958 100644 --- a/assets/ar/factuality_disinformation_harmful_content/claim_detection/CT22Claim_GPT4_FewShot.py +++ b/assets/ar/factuality_disinformation_harmful_content/claim_detection/CT22Claim_GPT4_FewShot.py @@ -1,5 +1,3 @@ -import os - from llmebench.datasets import CT22ClaimDataset from llmebench.models import OpenAIModel from llmebench.tasks import ClaimDetectionTask @@ -13,11 +11,6 @@ def config(): "task_args": {}, "model": OpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], "max_tries": 3, }, "general_args": { diff --git a/assets/ar/factuality_disinformation_harmful_content/claim_detection/CT22Claim_GPT4_ZeroShot.py b/assets/ar/factuality_disinformation_harmful_content/claim_detection/CT22Claim_GPT4_ZeroShot.py index d0e1796a..eeaea109 100644 --- a/assets/ar/factuality_disinformation_harmful_content/claim_detection/CT22Claim_GPT4_ZeroShot.py +++ b/assets/ar/factuality_disinformation_harmful_content/claim_detection/CT22Claim_GPT4_ZeroShot.py @@ -1,5 +1,3 @@ -import os - from llmebench.datasets import CT22CheckworthinessDataset from llmebench.models import OpenAIModel from llmebench.tasks import CheckworthinessTask @@ -13,11 +11,6 @@ def config(): "task_args": {}, "model": OpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], "class_labels": ["0", "1"], "max_tries": 30, }, diff --git a/assets/ar/factuality_disinformation_harmful_content/factuality/COVID19Factuality_BLOOMZ_ZeroShot.py b/assets/ar/factuality_disinformation_harmful_content/factuality/COVID19Factuality_BLOOMZ_ZeroShot.py index dcf6b67b..5fff5185 100644 --- a/assets/ar/factuality_disinformation_harmful_content/factuality/COVID19Factuality_BLOOMZ_ZeroShot.py +++ b/assets/ar/factuality_disinformation_harmful_content/factuality/COVID19Factuality_BLOOMZ_ZeroShot.py @@ -1,5 +1,3 @@ -import os - from llmebench.datasets import COVID19FactualityDataset from llmebench.models import PetalsModel from llmebench.tasks import FactualityTask @@ -13,7 +11,6 @@ def config(): "task_args": {}, "model": PetalsModel, "model_args": { - "api_url": os.environ["API_URL"], "class_labels": ["yes", "no"], "max_tries": 3, }, diff --git a/assets/ar/factuality_disinformation_harmful_content/factuality/COVID19Factuality_GPT4_FewShot.py b/assets/ar/factuality_disinformation_harmful_content/factuality/COVID19Factuality_GPT4_FewShot.py index 17aa0d02..ed55abf8 100644 --- a/assets/ar/factuality_disinformation_harmful_content/factuality/COVID19Factuality_GPT4_FewShot.py +++ b/assets/ar/factuality_disinformation_harmful_content/factuality/COVID19Factuality_GPT4_FewShot.py @@ -1,5 +1,3 @@ -import os - from llmebench.datasets import COVID19FactualityDataset from llmebench.models import OpenAIModel from llmebench.tasks import FactualityTask @@ -13,11 +11,6 @@ def config(): "task_args": {}, "model": OpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], "class_labels": ["yes", "no"], "max_tries": 30, }, diff --git a/assets/ar/factuality_disinformation_harmful_content/factuality/COVID19Factuality_GPT4_ZeroShot.py b/assets/ar/factuality_disinformation_harmful_content/factuality/COVID19Factuality_GPT4_ZeroShot.py index 394fb76d..20647c5c 100644 --- a/assets/ar/factuality_disinformation_harmful_content/factuality/COVID19Factuality_GPT4_ZeroShot.py +++ b/assets/ar/factuality_disinformation_harmful_content/factuality/COVID19Factuality_GPT4_ZeroShot.py @@ -1,5 +1,3 @@ -import os - from llmebench.datasets import COVID19FactualityDataset from llmebench.models import OpenAIModel from llmebench.tasks import FactualityTask @@ -13,11 +11,6 @@ def config(): "task_args": {}, "model": OpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], "class_labels": ["yes", "no"], "max_tries": 30, }, diff --git a/assets/ar/factuality_disinformation_harmful_content/factuality/Khouja20Factuality_BLOOMZ_ZeroShot.py b/assets/ar/factuality_disinformation_harmful_content/factuality/Khouja20Factuality_BLOOMZ_ZeroShot.py index 2e91575a..2cec59a7 100644 --- a/assets/ar/factuality_disinformation_harmful_content/factuality/Khouja20Factuality_BLOOMZ_ZeroShot.py +++ b/assets/ar/factuality_disinformation_harmful_content/factuality/Khouja20Factuality_BLOOMZ_ZeroShot.py @@ -1,5 +1,3 @@ -import os - from llmebench.datasets import Khouja20FactualityDataset from llmebench.models import PetalsModel from llmebench.tasks import FactualityTask @@ -13,7 +11,6 @@ def config(): "task_args": {}, "model": PetalsModel, "model_args": { - "api_url": os.environ["API_URL"], "class_labels": ["true", "false"], "max_tries": 3, }, diff --git a/assets/ar/factuality_disinformation_harmful_content/factuality/Khouja20Factuality_GPT35_ZeroShot.py b/assets/ar/factuality_disinformation_harmful_content/factuality/Khouja20Factuality_GPT35_ZeroShot.py index 0b484004..badc5a8b 100644 --- a/assets/ar/factuality_disinformation_harmful_content/factuality/Khouja20Factuality_GPT35_ZeroShot.py +++ b/assets/ar/factuality_disinformation_harmful_content/factuality/Khouja20Factuality_GPT35_ZeroShot.py @@ -1,5 +1,3 @@ -import os - from llmebench.datasets import Khouja20FactualityDataset from llmebench.models import LegacyOpenAIModel from llmebench.tasks import FactualityTask @@ -13,11 +11,6 @@ def config(): "task_args": {}, "model": LegacyOpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": "gpt", "class_labels": ["true", "false"], "max_tries": 30, }, diff --git a/assets/ar/factuality_disinformation_harmful_content/factuality/Khouja20Factuality_GPT4_FewShot.py b/assets/ar/factuality_disinformation_harmful_content/factuality/Khouja20Factuality_GPT4_FewShot.py index 2948f920..93af23c3 100644 --- a/assets/ar/factuality_disinformation_harmful_content/factuality/Khouja20Factuality_GPT4_FewShot.py +++ b/assets/ar/factuality_disinformation_harmful_content/factuality/Khouja20Factuality_GPT4_FewShot.py @@ -1,5 +1,3 @@ -import os - from llmebench.datasets import Khouja20FactualityDataset from llmebench.models import OpenAIModel from llmebench.tasks import FactualityTask @@ -13,11 +11,6 @@ def config(): "task_args": {}, "model": OpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], "max_tries": 3, }, "general_args": { diff --git a/assets/ar/factuality_disinformation_harmful_content/factuality/Khouja20Factuality_GPT4_ZeroShot.py b/assets/ar/factuality_disinformation_harmful_content/factuality/Khouja20Factuality_GPT4_ZeroShot.py index 52ef5d5d..c9d8de3c 100644 --- a/assets/ar/factuality_disinformation_harmful_content/factuality/Khouja20Factuality_GPT4_ZeroShot.py +++ b/assets/ar/factuality_disinformation_harmful_content/factuality/Khouja20Factuality_GPT4_ZeroShot.py @@ -1,5 +1,3 @@ -import os - from llmebench.datasets import Khouja20FactualityDataset from llmebench.models import OpenAIModel from llmebench.tasks import FactualityTask @@ -13,11 +11,6 @@ def config(): "task_args": {}, "model": OpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], "max_tries": 3, }, "general_args": { diff --git a/assets/ar/factuality_disinformation_harmful_content/factuality/UnifiedFCFactuality_BLOOMZ_ZeroShot.py b/assets/ar/factuality_disinformation_harmful_content/factuality/UnifiedFCFactuality_BLOOMZ_ZeroShot.py index d45644f1..b24310fe 100644 --- a/assets/ar/factuality_disinformation_harmful_content/factuality/UnifiedFCFactuality_BLOOMZ_ZeroShot.py +++ b/assets/ar/factuality_disinformation_harmful_content/factuality/UnifiedFCFactuality_BLOOMZ_ZeroShot.py @@ -1,5 +1,3 @@ -import os - from llmebench.datasets import UnifiedFCFactualityDataset from llmebench.models import PetalsModel from llmebench.tasks import FactualityTask @@ -13,7 +11,6 @@ def config(): "task_args": {}, "model": PetalsModel, "model_args": { - "api_url": os.environ["API_URL"], "class_labels": ["true", "false"], "max_tries": 3, }, diff --git a/assets/ar/factuality_disinformation_harmful_content/factuality/UnifiedFCFactuality_GPT4_FewShot.py b/assets/ar/factuality_disinformation_harmful_content/factuality/UnifiedFCFactuality_GPT4_FewShot.py index 051911cb..2a0e77ab 100644 --- a/assets/ar/factuality_disinformation_harmful_content/factuality/UnifiedFCFactuality_GPT4_FewShot.py +++ b/assets/ar/factuality_disinformation_harmful_content/factuality/UnifiedFCFactuality_GPT4_FewShot.py @@ -1,5 +1,3 @@ -import os - from llmebench.datasets import UnifiedFCFactualityDataset from llmebench.models import OpenAIModel from llmebench.tasks import FactualityTask @@ -13,11 +11,6 @@ def config(): "task_args": {}, "model": OpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], "max_tries": 3, }, "general_args": { diff --git a/assets/ar/factuality_disinformation_harmful_content/factuality/UnifiedFCFactuality_GPT4_ZeroShot.py b/assets/ar/factuality_disinformation_harmful_content/factuality/UnifiedFCFactuality_GPT4_ZeroShot.py index e4a02994..259c4b04 100644 --- a/assets/ar/factuality_disinformation_harmful_content/factuality/UnifiedFCFactuality_GPT4_ZeroShot.py +++ b/assets/ar/factuality_disinformation_harmful_content/factuality/UnifiedFCFactuality_GPT4_ZeroShot.py @@ -1,5 +1,3 @@ -import os - from llmebench.datasets import UnifiedFCFactualityDataset from llmebench.models import OpenAIModel from llmebench.tasks import FactualityTask @@ -13,11 +11,6 @@ def config(): "task_args": {}, "model": OpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], "class_labels": ["true", "false"], "max_tries": 30, }, diff --git a/assets/ar/factuality_disinformation_harmful_content/harmfulness_detection/CT22Harmful_BLOOMZ_ZeroShot.py b/assets/ar/factuality_disinformation_harmful_content/harmfulness_detection/CT22Harmful_BLOOMZ_ZeroShot.py index 889644b6..137c34c7 100644 --- a/assets/ar/factuality_disinformation_harmful_content/harmfulness_detection/CT22Harmful_BLOOMZ_ZeroShot.py +++ b/assets/ar/factuality_disinformation_harmful_content/harmfulness_detection/CT22Harmful_BLOOMZ_ZeroShot.py @@ -1,5 +1,3 @@ -import os - from llmebench.datasets import CT22HarmfulDataset from llmebench.models import PetalsModel from llmebench.tasks import HarmfulDetectionTask @@ -13,7 +11,6 @@ def config(): "task_args": {}, "model": PetalsModel, "model_args": { - "api_url": os.environ["API_URL"], "max_tries": 3, }, "general_args": { diff --git a/assets/ar/factuality_disinformation_harmful_content/harmfulness_detection/CT22Harmful_GPT35_ZeroShot.py b/assets/ar/factuality_disinformation_harmful_content/harmfulness_detection/CT22Harmful_GPT35_ZeroShot.py index 01af8205..15d4ba46 100644 --- a/assets/ar/factuality_disinformation_harmful_content/harmfulness_detection/CT22Harmful_GPT35_ZeroShot.py +++ b/assets/ar/factuality_disinformation_harmful_content/harmfulness_detection/CT22Harmful_GPT35_ZeroShot.py @@ -1,5 +1,3 @@ -import os - from llmebench.datasets import CT22HarmfulDataset from llmebench.models import LegacyOpenAIModel from llmebench.tasks import HarmfulDetectionTask @@ -13,11 +11,6 @@ def config(): "task_args": {}, "model": LegacyOpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], "class_labels": ["0", "1"], "max_tries": 3, }, diff --git a/assets/ar/factuality_disinformation_harmful_content/harmfulness_detection/CT22Harmful_GPT4_FewShot.py b/assets/ar/factuality_disinformation_harmful_content/harmfulness_detection/CT22Harmful_GPT4_FewShot.py index a5b0152c..d1d024f9 100644 --- a/assets/ar/factuality_disinformation_harmful_content/harmfulness_detection/CT22Harmful_GPT4_FewShot.py +++ b/assets/ar/factuality_disinformation_harmful_content/harmfulness_detection/CT22Harmful_GPT4_FewShot.py @@ -1,5 +1,3 @@ -import os - from llmebench.datasets import CT22HarmfulDataset from llmebench.models import OpenAIModel from llmebench.tasks import HarmfulDetectionTask @@ -13,11 +11,6 @@ def config(): "task_args": {}, "model": OpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], "max_tries": 3, }, "general_args": { diff --git a/assets/ar/factuality_disinformation_harmful_content/harmfulness_detection/CT22Harmful_GPT4_ZeroShot.py b/assets/ar/factuality_disinformation_harmful_content/harmfulness_detection/CT22Harmful_GPT4_ZeroShot.py index f3a6229b..93c887cd 100644 --- a/assets/ar/factuality_disinformation_harmful_content/harmfulness_detection/CT22Harmful_GPT4_ZeroShot.py +++ b/assets/ar/factuality_disinformation_harmful_content/harmfulness_detection/CT22Harmful_GPT4_ZeroShot.py @@ -1,4 +1,3 @@ -import os import random import re @@ -18,11 +17,6 @@ def config(): "task_args": {}, "model": OpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], "class_labels": ["0", "1"], "max_tries": 30, }, diff --git a/assets/ar/factuality_disinformation_harmful_content/hate_speech/OSACT4SubtaskB_GPT35_ZeroShot.py b/assets/ar/factuality_disinformation_harmful_content/hate_speech/OSACT4SubtaskB_GPT35_ZeroShot.py index bb92a4f5..8559f54b 100644 --- a/assets/ar/factuality_disinformation_harmful_content/hate_speech/OSACT4SubtaskB_GPT35_ZeroShot.py +++ b/assets/ar/factuality_disinformation_harmful_content/hate_speech/OSACT4SubtaskB_GPT35_ZeroShot.py @@ -1,5 +1,3 @@ -import os - from llmebench.datasets import OSACT4SubtaskBDataset from llmebench.models import LegacyOpenAIModel from llmebench.tasks import HateSpeechTask @@ -13,11 +11,6 @@ def config(): "task_args": {}, "model": LegacyOpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], "class_labels": ["HS", "NOT_HS"], "max_tries": 3, }, diff --git a/assets/ar/factuality_disinformation_harmful_content/hate_speech/OSACT4SubtaskB_GPT4_FewShot.py b/assets/ar/factuality_disinformation_harmful_content/hate_speech/OSACT4SubtaskB_GPT4_FewShot.py index e6100967..cee144e2 100644 --- a/assets/ar/factuality_disinformation_harmful_content/hate_speech/OSACT4SubtaskB_GPT4_FewShot.py +++ b/assets/ar/factuality_disinformation_harmful_content/hate_speech/OSACT4SubtaskB_GPT4_FewShot.py @@ -1,5 +1,3 @@ -import os - from llmebench.datasets import OSACT4SubtaskBDataset from llmebench.models import OpenAIModel from llmebench.tasks import HateSpeechTask @@ -13,11 +11,6 @@ def config(): "task_args": {}, "model": OpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], "max_tries": 3, }, "general_args": { diff --git a/assets/ar/factuality_disinformation_harmful_content/offensive_language/OSACT4SubtaskA_BLOOMZ_ZeroShot.py b/assets/ar/factuality_disinformation_harmful_content/offensive_language/OSACT4SubtaskA_BLOOMZ_ZeroShot.py index a0bdd2c5..ad6d1f55 100644 --- a/assets/ar/factuality_disinformation_harmful_content/offensive_language/OSACT4SubtaskA_BLOOMZ_ZeroShot.py +++ b/assets/ar/factuality_disinformation_harmful_content/offensive_language/OSACT4SubtaskA_BLOOMZ_ZeroShot.py @@ -1,5 +1,3 @@ -import os - from llmebench.datasets import OSACT4SubtaskADataset from llmebench.models import PetalsModel from llmebench.tasks import OffensiveTask @@ -13,7 +11,6 @@ def config(): "task_args": {}, "model": PetalsModel, "model_args": { - "api_url": os.environ["API_URL"], "class_labels": ["OFF", "NOT_OFF"], "max_tries": 3, }, diff --git a/assets/ar/factuality_disinformation_harmful_content/offensive_language/OSACT4SubtaskA_GPT35_ZeroShot.py b/assets/ar/factuality_disinformation_harmful_content/offensive_language/OSACT4SubtaskA_GPT35_ZeroShot.py index 26caba09..e13fb948 100644 --- a/assets/ar/factuality_disinformation_harmful_content/offensive_language/OSACT4SubtaskA_GPT35_ZeroShot.py +++ b/assets/ar/factuality_disinformation_harmful_content/offensive_language/OSACT4SubtaskA_GPT35_ZeroShot.py @@ -1,5 +1,3 @@ -import os - from llmebench.datasets import OSACT4SubtaskADataset from llmebench.models import LegacyOpenAIModel from llmebench.tasks import OffensiveTask @@ -13,11 +11,6 @@ def config(): "task_args": {}, "model": LegacyOpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], "class_labels": ["OFF", "NOT_OFF"], "max_tries": 3, }, diff --git a/assets/ar/factuality_disinformation_harmful_content/offensive_language/OSACT4SubtaskA_GPT4_FewShot.py b/assets/ar/factuality_disinformation_harmful_content/offensive_language/OSACT4SubtaskA_GPT4_FewShot.py index 98169ce5..54fc88a7 100644 --- a/assets/ar/factuality_disinformation_harmful_content/offensive_language/OSACT4SubtaskA_GPT4_FewShot.py +++ b/assets/ar/factuality_disinformation_harmful_content/offensive_language/OSACT4SubtaskA_GPT4_FewShot.py @@ -1,5 +1,3 @@ -import os - from llmebench.datasets import OSACT4SubtaskADataset from llmebench.models import OpenAIModel from llmebench.tasks import OffensiveTask @@ -13,11 +11,6 @@ def config(): "task_args": {}, "model": OpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], "class_labels": ["OFF", "NOT_OFF"], "max_tries": 3, }, diff --git a/assets/ar/factuality_disinformation_harmful_content/offensive_language/OSACT4SubtaskA_GPT4_ZeroShot.py b/assets/ar/factuality_disinformation_harmful_content/offensive_language/OSACT4SubtaskA_GPT4_ZeroShot.py index d2036f53..665c8cc9 100644 --- a/assets/ar/factuality_disinformation_harmful_content/offensive_language/OSACT4SubtaskA_GPT4_ZeroShot.py +++ b/assets/ar/factuality_disinformation_harmful_content/offensive_language/OSACT4SubtaskA_GPT4_ZeroShot.py @@ -1,5 +1,3 @@ -import os - from llmebench.datasets import OSACT4SubtaskADataset from llmebench.models import OpenAIModel from llmebench.tasks import OffensiveTask @@ -13,11 +11,6 @@ def config(): "task_args": {}, "model": OpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], "class_labels": ["OFF", "NOT_OFF"], "max_tries": 3, }, diff --git a/assets/ar/factuality_disinformation_harmful_content/propaganda/WANLP22T3_BLOOMZ_ZeroShot.py b/assets/ar/factuality_disinformation_harmful_content/propaganda/WANLP22T3_BLOOMZ_ZeroShot.py index a1ef29ae..f364c45c 100644 --- a/assets/ar/factuality_disinformation_harmful_content/propaganda/WANLP22T3_BLOOMZ_ZeroShot.py +++ b/assets/ar/factuality_disinformation_harmful_content/propaganda/WANLP22T3_BLOOMZ_ZeroShot.py @@ -1,4 +1,3 @@ -import os import random import re @@ -20,7 +19,6 @@ def config(): "task_args": {}, "model": PetalsModel, "model_args": { - "api_url": os.environ["API_URL"], "class_labels": [ "no technique", "Smears", diff --git a/assets/ar/factuality_disinformation_harmful_content/propaganda/WANLP22T3_GPT35_ZeroShot.py b/assets/ar/factuality_disinformation_harmful_content/propaganda/WANLP22T3_GPT35_ZeroShot.py index 0fcba58f..4db21ab5 100644 --- a/assets/ar/factuality_disinformation_harmful_content/propaganda/WANLP22T3_GPT35_ZeroShot.py +++ b/assets/ar/factuality_disinformation_harmful_content/propaganda/WANLP22T3_GPT35_ZeroShot.py @@ -1,5 +1,3 @@ -import os - import regex as re from llmebench.datasets import WANLP22T3PropagandaDataset @@ -17,11 +15,6 @@ def config(): "task_args": {}, "model": LegacyOpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": "gpt", "max_tries": 3, }, "general_args": { diff --git a/assets/ar/factuality_disinformation_harmful_content/propaganda/WANLP22T3_GPT4_FewShot.py b/assets/ar/factuality_disinformation_harmful_content/propaganda/WANLP22T3_GPT4_FewShot.py index 9fef243d..23de19b7 100644 --- a/assets/ar/factuality_disinformation_harmful_content/propaganda/WANLP22T3_GPT4_FewShot.py +++ b/assets/ar/factuality_disinformation_harmful_content/propaganda/WANLP22T3_GPT4_FewShot.py @@ -1,4 +1,3 @@ -import os import random import re @@ -20,11 +19,6 @@ def config(): "task_args": {}, "model": OpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], "class_labels": [ "no technique", "Smears", diff --git a/assets/ar/factuality_disinformation_harmful_content/propaganda/WANLP22T3_GPT4_ZeroShot.py b/assets/ar/factuality_disinformation_harmful_content/propaganda/WANLP22T3_GPT4_ZeroShot.py index 7695e005..f733a52b 100644 --- a/assets/ar/factuality_disinformation_harmful_content/propaganda/WANLP22T3_GPT4_ZeroShot.py +++ b/assets/ar/factuality_disinformation_harmful_content/propaganda/WANLP22T3_GPT4_ZeroShot.py @@ -1,4 +1,3 @@ -import os import random import re @@ -20,11 +19,6 @@ def config(): "task_args": {}, "model": OpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], "class_labels": [ "no technique", "Smears", diff --git a/assets/ar/factuality_disinformation_harmful_content/spam/Spam_BLOOMZ_ZeroShot.py b/assets/ar/factuality_disinformation_harmful_content/spam/Spam_BLOOMZ_ZeroShot.py index 8e6436e4..e3ea01ee 100644 --- a/assets/ar/factuality_disinformation_harmful_content/spam/Spam_BLOOMZ_ZeroShot.py +++ b/assets/ar/factuality_disinformation_harmful_content/spam/Spam_BLOOMZ_ZeroShot.py @@ -1,5 +1,3 @@ -import os - from llmebench.datasets import SpamDataset from llmebench.models import PetalsModel from llmebench.tasks import SpamTask @@ -13,7 +11,6 @@ def config(): "task_args": {}, "model": PetalsModel, "model_args": { - "api_url": os.environ["API_URL"], "class_labels": ["__label__ADS", "__label__NOTADS"], "max_tries": 3, }, diff --git a/assets/ar/factuality_disinformation_harmful_content/spam/Spam_GPT35_ZeroShot.py b/assets/ar/factuality_disinformation_harmful_content/spam/Spam_GPT35_ZeroShot.py index d3ec68cc..b7eefb93 100644 --- a/assets/ar/factuality_disinformation_harmful_content/spam/Spam_GPT35_ZeroShot.py +++ b/assets/ar/factuality_disinformation_harmful_content/spam/Spam_GPT35_ZeroShot.py @@ -1,5 +1,3 @@ -import os - from llmebench.datasets import SpamDataset from llmebench.models import LegacyOpenAIModel from llmebench.tasks import SpamTask @@ -13,11 +11,6 @@ def config(): "task_args": {}, "model": LegacyOpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], "class_labels": ["__label__ADS", "__label__NOTADS"], "max_tries": 3, }, diff --git a/assets/ar/factuality_disinformation_harmful_content/spam/Spam_GPT4_ZeroShot.py b/assets/ar/factuality_disinformation_harmful_content/spam/Spam_GPT4_ZeroShot.py index 3306e51e..58233cbc 100644 --- a/assets/ar/factuality_disinformation_harmful_content/spam/Spam_GPT4_ZeroShot.py +++ b/assets/ar/factuality_disinformation_harmful_content/spam/Spam_GPT4_ZeroShot.py @@ -1,5 +1,3 @@ -import os - from llmebench.datasets import SpamDataset from llmebench.models import OpenAIModel from llmebench.tasks import SpamTask @@ -13,11 +11,6 @@ def config(): "task_args": {}, "model": OpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], "class_labels": ["__label__ADS", "__label__NOTADS"], "max_tries": 3, }, diff --git a/assets/ar/factuality_disinformation_harmful_content/subjectivity/CT23Subjectivity_BLOOMZ_ZeroShot.py b/assets/ar/factuality_disinformation_harmful_content/subjectivity/CT23Subjectivity_BLOOMZ_ZeroShot.py index f7a47cdb..17867006 100644 --- a/assets/ar/factuality_disinformation_harmful_content/subjectivity/CT23Subjectivity_BLOOMZ_ZeroShot.py +++ b/assets/ar/factuality_disinformation_harmful_content/subjectivity/CT23Subjectivity_BLOOMZ_ZeroShot.py @@ -1,5 +1,3 @@ -import os - from llmebench.datasets import CT23SubjectivityDataset from llmebench.models import PetalsModel from llmebench.tasks import SubjectivityTask @@ -13,7 +11,6 @@ def config(): "task_args": {}, "model": PetalsModel, "model_args": { - "api_url": os.environ["API_URL"], "class_labels": ["SUBJ", "OBJ"], "max_tries": 3, }, diff --git a/assets/ar/factuality_disinformation_harmful_content/subjectivity/CT23Subjectivity_GPT35_ZeroShot.py b/assets/ar/factuality_disinformation_harmful_content/subjectivity/CT23Subjectivity_GPT35_ZeroShot.py index 2747b75d..c548634b 100644 --- a/assets/ar/factuality_disinformation_harmful_content/subjectivity/CT23Subjectivity_GPT35_ZeroShot.py +++ b/assets/ar/factuality_disinformation_harmful_content/subjectivity/CT23Subjectivity_GPT35_ZeroShot.py @@ -1,5 +1,3 @@ -import os - from llmebench.datasets import CT23SubjectivityDataset from llmebench.models import LegacyOpenAIModel from llmebench.tasks import SubjectivityTask @@ -13,11 +11,6 @@ def config(): "task_args": {}, "model": LegacyOpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": "gpt", "class_labels": ["SUBJ", "OBJ"], "max_tries": 3, }, diff --git a/assets/ar/factuality_disinformation_harmful_content/subjectivity/CT23Subjectivity_GPT4_FewShot.py b/assets/ar/factuality_disinformation_harmful_content/subjectivity/CT23Subjectivity_GPT4_FewShot.py index cba00277..a5bd61c9 100644 --- a/assets/ar/factuality_disinformation_harmful_content/subjectivity/CT23Subjectivity_GPT4_FewShot.py +++ b/assets/ar/factuality_disinformation_harmful_content/subjectivity/CT23Subjectivity_GPT4_FewShot.py @@ -1,5 +1,3 @@ -import os - from llmebench.datasets import CT23SubjectivityDataset from llmebench.models import OpenAIModel from llmebench.tasks import SubjectivityTask @@ -13,11 +11,6 @@ def config(): "task_args": {}, "model": OpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], "class_labels": ["SUBJ", "OBJ"], "max_tries": 30, }, diff --git a/assets/ar/factuality_disinformation_harmful_content/subjectivity/CT23Subjectivity_GPT4_ZeroShot.py b/assets/ar/factuality_disinformation_harmful_content/subjectivity/CT23Subjectivity_GPT4_ZeroShot.py index f607736d..e2883e2c 100644 --- a/assets/ar/factuality_disinformation_harmful_content/subjectivity/CT23Subjectivity_GPT4_ZeroShot.py +++ b/assets/ar/factuality_disinformation_harmful_content/subjectivity/CT23Subjectivity_GPT4_ZeroShot.py @@ -1,4 +1,3 @@ -import os import random import re @@ -18,11 +17,6 @@ def config(): "task_args": {}, "model": OpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], "class_labels": ["SUBJ", "OBJ"], "max_tries": 30, }, diff --git a/assets/ar/news_categorization/ASND_BLOOMZ_ZeroShot.py b/assets/ar/news_categorization/ASND_BLOOMZ_ZeroShot.py index babd03e6..668e0f37 100644 --- a/assets/ar/news_categorization/ASND_BLOOMZ_ZeroShot.py +++ b/assets/ar/news_categorization/ASND_BLOOMZ_ZeroShot.py @@ -1,5 +1,3 @@ -import os - from llmebench.datasets import NewsCatASNDDataset from llmebench.models import PetalsModel from llmebench.tasks import NewsCategorizationTask @@ -13,7 +11,6 @@ def config(): "task_args": {}, "model": PetalsModel, "model_args": { - "api_url": os.environ["API_URL"], "class_labels": [ "crime-war-conflict", "spiritual", diff --git a/assets/ar/news_categorization/ASND_GPT35_ZeroShot.py b/assets/ar/news_categorization/ASND_GPT35_ZeroShot.py index cb5087e7..9d59648d 100644 --- a/assets/ar/news_categorization/ASND_GPT35_ZeroShot.py +++ b/assets/ar/news_categorization/ASND_GPT35_ZeroShot.py @@ -1,5 +1,3 @@ -import os - from llmebench.datasets import NewsCatASNDDataset from llmebench.models import LegacyOpenAIModel from llmebench.tasks import NewsCategorizationTask @@ -13,11 +11,6 @@ def config(): "task_args": {"test": "useless"}, "model": LegacyOpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": "gpt", "class_labels": [ "crime-war-conflict", "spiritual", diff --git a/assets/ar/news_categorization/ASND_GPT4_FewShot.py b/assets/ar/news_categorization/ASND_GPT4_FewShot.py index 431fd906..c14e1b96 100644 --- a/assets/ar/news_categorization/ASND_GPT4_FewShot.py +++ b/assets/ar/news_categorization/ASND_GPT4_FewShot.py @@ -1,5 +1,3 @@ -import os - from llmebench.datasets import NewsCatASNDDataset from llmebench.models import OpenAIModel from llmebench.tasks import NewsCategorizationTask @@ -13,11 +11,6 @@ def config(): "task_args": {}, "model": OpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], "class_labels": [ "crime-war-conflict", "spiritual", diff --git a/assets/ar/news_categorization/ASND_GPT4_ZeroShot.py b/assets/ar/news_categorization/ASND_GPT4_ZeroShot.py index 6933eae4..ae7fab9d 100644 --- a/assets/ar/news_categorization/ASND_GPT4_ZeroShot.py +++ b/assets/ar/news_categorization/ASND_GPT4_ZeroShot.py @@ -1,5 +1,3 @@ -import os - from llmebench.datasets import NewsCatASNDDataset from llmebench.models import OpenAIModel from llmebench.tasks import NewsCategorizationTask @@ -13,11 +11,6 @@ def config(): "task_args": {}, "model": OpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], "class_labels": [ "crime-war-conflict", "spiritual", diff --git a/assets/ar/news_categorization/Akhbarona_BLOOMZ_ZeroShot.py b/assets/ar/news_categorization/Akhbarona_BLOOMZ_ZeroShot.py index 622a79e5..ed364822 100644 --- a/assets/ar/news_categorization/Akhbarona_BLOOMZ_ZeroShot.py +++ b/assets/ar/news_categorization/Akhbarona_BLOOMZ_ZeroShot.py @@ -1,4 +1,3 @@ -import os import random from llmebench.datasets import NewsCatAkhbaronaDataset @@ -16,7 +15,6 @@ def config(): "task_args": {}, "model": PetalsModel, "model_args": { - "api_url": os.environ["API_URL"], "class_labels": [ "politics", "religion", diff --git a/assets/ar/news_categorization/Akhbarona_GPT35_ZeroShot.py b/assets/ar/news_categorization/Akhbarona_GPT35_ZeroShot.py index 822d6751..74ee4262 100644 --- a/assets/ar/news_categorization/Akhbarona_GPT35_ZeroShot.py +++ b/assets/ar/news_categorization/Akhbarona_GPT35_ZeroShot.py @@ -1,4 +1,3 @@ -import os import random from llmebench.datasets import NewsCatAkhbaronaDataset @@ -16,11 +15,6 @@ def config(): "task_args": {}, "model": LegacyOpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], "class_labels": [ "politics", "religion", diff --git a/assets/ar/news_categorization/Akhbarona_GPT4_FewShot.py b/assets/ar/news_categorization/Akhbarona_GPT4_FewShot.py index 32e13ee3..160b5f5e 100644 --- a/assets/ar/news_categorization/Akhbarona_GPT4_FewShot.py +++ b/assets/ar/news_categorization/Akhbarona_GPT4_FewShot.py @@ -1,4 +1,3 @@ -import os import random from llmebench.datasets import NewsCatAkhbaronaDataset @@ -17,11 +16,6 @@ def config(): "task_args": {}, "model": OpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], "class_labels": [ "politics", "religion", diff --git a/assets/ar/news_categorization/Akhbarona_GPT4_ZeroShot.py b/assets/ar/news_categorization/Akhbarona_GPT4_ZeroShot.py index 49e2c86c..b3c39b38 100644 --- a/assets/ar/news_categorization/Akhbarona_GPT4_ZeroShot.py +++ b/assets/ar/news_categorization/Akhbarona_GPT4_ZeroShot.py @@ -1,4 +1,3 @@ -import os import random from llmebench.datasets import NewsCatAkhbaronaDataset @@ -17,11 +16,6 @@ def config(): "task_args": {}, "model": OpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], "class_labels": [ "politics", "religion", diff --git a/assets/ar/news_categorization/AlArabiya_BLOOMZ_ZeroShot.py b/assets/ar/news_categorization/AlArabiya_BLOOMZ_ZeroShot.py index c33efd9f..aa5f409e 100644 --- a/assets/ar/news_categorization/AlArabiya_BLOOMZ_ZeroShot.py +++ b/assets/ar/news_categorization/AlArabiya_BLOOMZ_ZeroShot.py @@ -1,4 +1,3 @@ -import os import random from llmebench.datasets import NewsCatAlArabiyaDataset @@ -16,7 +15,6 @@ def config(): "task_args": {}, "model": PetalsModel, "model_args": { - "api_url": os.environ["API_URL"], "class_labels": [ "politics", "religion", diff --git a/assets/ar/news_categorization/AlArabiya_GPT35_ZeroShot.py b/assets/ar/news_categorization/AlArabiya_GPT35_ZeroShot.py index 0ceeec2e..761bd8e0 100644 --- a/assets/ar/news_categorization/AlArabiya_GPT35_ZeroShot.py +++ b/assets/ar/news_categorization/AlArabiya_GPT35_ZeroShot.py @@ -1,4 +1,3 @@ -import os import random from llmebench.datasets import NewsCatAlArabiyaDataset @@ -16,11 +15,6 @@ def config(): "task_args": {}, "model": LegacyOpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": "gpt", "class_labels": [ "politics", "religion", diff --git a/assets/ar/news_categorization/AlArabiya_GPT4_FewShot.py b/assets/ar/news_categorization/AlArabiya_GPT4_FewShot.py index ac0428ab..1c90f1a0 100644 --- a/assets/ar/news_categorization/AlArabiya_GPT4_FewShot.py +++ b/assets/ar/news_categorization/AlArabiya_GPT4_FewShot.py @@ -1,4 +1,3 @@ -import os import random from llmebench.datasets import NewsCatAlArabiyaDataset @@ -17,11 +16,6 @@ def config(): "task_args": {}, "model": OpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], "class_labels": [ "politics", "religion", diff --git a/assets/ar/news_categorization/AlArabiya_GPT4_ZeroShot.py b/assets/ar/news_categorization/AlArabiya_GPT4_ZeroShot.py index 5116a211..15413b7f 100644 --- a/assets/ar/news_categorization/AlArabiya_GPT4_ZeroShot.py +++ b/assets/ar/news_categorization/AlArabiya_GPT4_ZeroShot.py @@ -1,4 +1,3 @@ -import os import random from llmebench.datasets import NewsCatAlArabiyaDataset @@ -17,11 +16,6 @@ def config(): "task_args": {}, "model": OpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], "class_labels": [ "politics", "religion", diff --git a/assets/ar/news_categorization/AlKhaleej_BLOOMZ_ZeroShot.py b/assets/ar/news_categorization/AlKhaleej_BLOOMZ_ZeroShot.py index dc4a10a0..fe022e0c 100644 --- a/assets/ar/news_categorization/AlKhaleej_BLOOMZ_ZeroShot.py +++ b/assets/ar/news_categorization/AlKhaleej_BLOOMZ_ZeroShot.py @@ -1,4 +1,3 @@ -import os import random from llmebench.datasets import NewsCatAlArabiyaDataset @@ -16,7 +15,6 @@ def config(): "task_args": {}, "model": PetalsModel, "model_args": { - "api_url": os.environ["API_URL"], "class_labels": [ "culture", "finance", diff --git a/assets/ar/news_categorization/AlKhaleej_GPT35_ZeroShot.py b/assets/ar/news_categorization/AlKhaleej_GPT35_ZeroShot.py index 00c1d840..ff845477 100644 --- a/assets/ar/news_categorization/AlKhaleej_GPT35_ZeroShot.py +++ b/assets/ar/news_categorization/AlKhaleej_GPT35_ZeroShot.py @@ -1,4 +1,3 @@ -import os import random from llmebench.datasets import NewsCatAlKhaleejDataset @@ -16,11 +15,6 @@ def config(): "task_args": {}, "model": LegacyOpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": "gpt", "class_labels": [ "culture", "finance", diff --git a/assets/ar/news_categorization/AlKhaleej_GPT4_FewShot.py b/assets/ar/news_categorization/AlKhaleej_GPT4_FewShot.py index 9ec3e990..01f4c144 100644 --- a/assets/ar/news_categorization/AlKhaleej_GPT4_FewShot.py +++ b/assets/ar/news_categorization/AlKhaleej_GPT4_FewShot.py @@ -1,4 +1,3 @@ -import os import random from llmebench.datasets import NewsCatAlKhaleejDataset @@ -17,11 +16,6 @@ def config(): "task_args": {}, "model": OpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], "class_labels": [ "culture", "finance", diff --git a/assets/ar/news_categorization/AlKhaleej_GPT4_ZeroShot.py b/assets/ar/news_categorization/AlKhaleej_GPT4_ZeroShot.py index fa7229f3..f0f75760 100644 --- a/assets/ar/news_categorization/AlKhaleej_GPT4_ZeroShot.py +++ b/assets/ar/news_categorization/AlKhaleej_GPT4_ZeroShot.py @@ -1,4 +1,3 @@ -import os import random from llmebench.datasets import NewsCatAlKhaleejDataset @@ -17,11 +16,6 @@ def config(): "task_args": {}, "model": OpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], "class_labels": [ "culture", "finance", diff --git a/assets/ar/semantics/NLI/XNLI_BLOOMZ_ZeroShot.py b/assets/ar/semantics/NLI/XNLI_BLOOMZ_ZeroShot.py index d65afb44..4349fe98 100644 --- a/assets/ar/semantics/NLI/XNLI_BLOOMZ_ZeroShot.py +++ b/assets/ar/semantics/NLI/XNLI_BLOOMZ_ZeroShot.py @@ -1,5 +1,3 @@ -import os - from llmebench.datasets import XNLIDataset from llmebench.models import PetalsModel from llmebench.tasks import XNLITask @@ -13,7 +11,6 @@ def config(): "task_args": {}, "model": PetalsModel, "model_args": { - "api_url": os.environ["API_URL"], "max_tries": 3, }, "general_args": {"data_path": "data/XNLI/xnli.test.ar.tsv"}, diff --git a/assets/ar/semantics/NLI/XNLI_GPT35_ZeroShot.py b/assets/ar/semantics/NLI/XNLI_GPT35_ZeroShot.py index 73205c53..3695b9a6 100644 --- a/assets/ar/semantics/NLI/XNLI_GPT35_ZeroShot.py +++ b/assets/ar/semantics/NLI/XNLI_GPT35_ZeroShot.py @@ -1,5 +1,3 @@ -import os - from llmebench.datasets import XNLIDataset from llmebench.models import LegacyOpenAIModel from llmebench.tasks import XNLITask @@ -13,11 +11,6 @@ def config(): "task_args": {}, "model": LegacyOpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], "max_tries": 3, }, "general_args": {"data_path": "data/XNLI/xnli.test.ar.tsv"}, diff --git a/assets/ar/semantics/NLI/XNLI_GPT4_FewShot.py b/assets/ar/semantics/NLI/XNLI_GPT4_FewShot.py index 0fd263d8..e34300a0 100644 --- a/assets/ar/semantics/NLI/XNLI_GPT4_FewShot.py +++ b/assets/ar/semantics/NLI/XNLI_GPT4_FewShot.py @@ -1,5 +1,3 @@ -import os - from llmebench.datasets import XNLIDataset from llmebench.models import OpenAIModel from llmebench.tasks import XNLITask @@ -13,11 +11,6 @@ def config(): "task_args": {}, "model": OpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], "max_tries": 3, }, "general_args": { diff --git a/assets/ar/semantics/NLI/XNLI_GPT4_ZeroShot.py b/assets/ar/semantics/NLI/XNLI_GPT4_ZeroShot.py index 057092aa..7c81b664 100644 --- a/assets/ar/semantics/NLI/XNLI_GPT4_ZeroShot.py +++ b/assets/ar/semantics/NLI/XNLI_GPT4_ZeroShot.py @@ -1,5 +1,3 @@ -import os - from llmebench.datasets import XNLIDataset from llmebench.models import OpenAIModel from llmebench.tasks import XNLITask @@ -13,11 +11,6 @@ def config(): "task_args": {}, "model": OpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], "max_tries": 3, }, "general_args": {"data_path": "data/XNLI/xnli.test.ar.tsv"}, diff --git a/assets/ar/semantics/STS/Q2QSim_BLOOMZ_ZeroShot.py b/assets/ar/semantics/STS/Q2QSim_BLOOMZ_ZeroShot.py index d656656e..4bf2d3dc 100644 --- a/assets/ar/semantics/STS/Q2QSim_BLOOMZ_ZeroShot.py +++ b/assets/ar/semantics/STS/Q2QSim_BLOOMZ_ZeroShot.py @@ -1,4 +1,3 @@ -import os import re from llmebench.datasets import Q2QSimDataset @@ -14,7 +13,6 @@ def config(): "task_args": {}, "model": PetalsModel, "model_args": { - "api_url": os.environ["API_URL"], "max_tries": 3, }, "general_args": { diff --git a/assets/ar/semantics/STS/Q2QSim_GPT35_ZeroShot.py b/assets/ar/semantics/STS/Q2QSim_GPT35_ZeroShot.py index a77b9f4b..83b3d055 100644 --- a/assets/ar/semantics/STS/Q2QSim_GPT35_ZeroShot.py +++ b/assets/ar/semantics/STS/Q2QSim_GPT35_ZeroShot.py @@ -1,5 +1,3 @@ -import os - from llmebench.datasets import Q2QSimDataset from llmebench.models import LegacyOpenAIModel from llmebench.tasks import Q2QSimDetectionTask @@ -13,11 +11,6 @@ def config(): "task_args": {}, "model": LegacyOpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], "max_tries": 3, }, "general_args": { diff --git a/assets/ar/semantics/STS/Q2QSim_GPT4_FewShot.py b/assets/ar/semantics/STS/Q2QSim_GPT4_FewShot.py index 9f159842..886a056a 100644 --- a/assets/ar/semantics/STS/Q2QSim_GPT4_FewShot.py +++ b/assets/ar/semantics/STS/Q2QSim_GPT4_FewShot.py @@ -1,4 +1,3 @@ -import os import re from llmebench.datasets import Q2QSimDataset @@ -14,11 +13,6 @@ def config(): "task_args": {}, "model": OpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], "max_tries": 3, }, "general_args": { diff --git a/assets/ar/semantics/STS/Q2QSim_GPT4_ZeroShot.py b/assets/ar/semantics/STS/Q2QSim_GPT4_ZeroShot.py index 619d106c..47165f78 100644 --- a/assets/ar/semantics/STS/Q2QSim_GPT4_ZeroShot.py +++ b/assets/ar/semantics/STS/Q2QSim_GPT4_ZeroShot.py @@ -1,4 +1,3 @@ -import os import re from llmebench.datasets import Q2QSimDataset @@ -14,11 +13,6 @@ def config(): "task_args": {}, "model": OpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], "max_tries": 3, }, "general_args": { diff --git a/assets/ar/semantics/STS/SemEval17T1STS_BLOOMZ_ZeroShot.py b/assets/ar/semantics/STS/SemEval17T1STS_BLOOMZ_ZeroShot.py index c343428b..797c137b 100644 --- a/assets/ar/semantics/STS/SemEval17T1STS_BLOOMZ_ZeroShot.py +++ b/assets/ar/semantics/STS/SemEval17T1STS_BLOOMZ_ZeroShot.py @@ -1,4 +1,3 @@ -import os import re from llmebench.datasets import SemEval17T1STSDataset @@ -14,7 +13,6 @@ def config(): "task_args": {}, "model": PetalsModel, "model_args": { - "api_url": os.environ["API_URL"], "max_tries": 3, }, "general_args": { diff --git a/assets/ar/semantics/STS/SemEval17T1STS_GPT35_ZeroShot.py b/assets/ar/semantics/STS/SemEval17T1STS_GPT35_ZeroShot.py index 6dc947bc..f4e2b96d 100644 --- a/assets/ar/semantics/STS/SemEval17T1STS_GPT35_ZeroShot.py +++ b/assets/ar/semantics/STS/SemEval17T1STS_GPT35_ZeroShot.py @@ -1,4 +1,3 @@ -import os import re from llmebench.datasets import SemEval17T1STSDataset @@ -14,12 +13,6 @@ def config(): "task_args": {}, "model": LegacyOpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], - "class_labels": "NA", "max_tries": 3, }, "general_args": { diff --git a/assets/ar/semantics/STS/SemEval17T1STS_GPT4_FewShot.py b/assets/ar/semantics/STS/SemEval17T1STS_GPT4_FewShot.py index bb3dd3ae..d6361b8a 100644 --- a/assets/ar/semantics/STS/SemEval17T1STS_GPT4_FewShot.py +++ b/assets/ar/semantics/STS/SemEval17T1STS_GPT4_FewShot.py @@ -1,5 +1,3 @@ -import os - from llmebench.datasets import SemEval17T1STSDataset from llmebench.models import OpenAIModel from llmebench.tasks import STSTask @@ -13,11 +11,6 @@ def config(): "task_args": {}, "model": OpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], "max_tries": 3, }, "general_args": { diff --git a/assets/ar/semantics/STS/SemEval17T1STS_GPT4_ZeroShot.py b/assets/ar/semantics/STS/SemEval17T1STS_GPT4_ZeroShot.py index 5801cb43..eab3f253 100644 --- a/assets/ar/semantics/STS/SemEval17T1STS_GPT4_ZeroShot.py +++ b/assets/ar/semantics/STS/SemEval17T1STS_GPT4_ZeroShot.py @@ -1,4 +1,3 @@ -import os import re from llmebench.datasets import SemEval17T1STSDataset @@ -14,11 +13,6 @@ def config(): "task_args": {}, "model": OpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], "max_tries": 3, }, "general_args": { diff --git a/assets/ar/semantics/STS/SemEval17T2STS_BLOOMZ_ZeroShot.py b/assets/ar/semantics/STS/SemEval17T2STS_BLOOMZ_ZeroShot.py index e81ea988..bfd2fc47 100644 --- a/assets/ar/semantics/STS/SemEval17T2STS_BLOOMZ_ZeroShot.py +++ b/assets/ar/semantics/STS/SemEval17T2STS_BLOOMZ_ZeroShot.py @@ -1,4 +1,3 @@ -import os import re from llmebench.datasets import SemEval17T2STSDataset @@ -14,7 +13,6 @@ def config(): "task_args": {}, "model": PetalsModel, "model_args": { - "api_url": os.environ["API_URL"], "max_tries": 3, }, "general_args": { diff --git a/assets/ar/semantics/STS/SemEval17T2STS_GPT35_ZeroShot.py b/assets/ar/semantics/STS/SemEval17T2STS_GPT35_ZeroShot.py index 13c27300..4d1f9c4d 100644 --- a/assets/ar/semantics/STS/SemEval17T2STS_GPT35_ZeroShot.py +++ b/assets/ar/semantics/STS/SemEval17T2STS_GPT35_ZeroShot.py @@ -1,5 +1,3 @@ -import os - from llmebench.datasets import SemEval17T2STSDataset from llmebench.models import LegacyOpenAIModel from llmebench.tasks import STSTask @@ -13,12 +11,6 @@ def config(): "task_args": {}, "model": LegacyOpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], - "class_labels": "NA", "max_tries": 3, }, "general_args": { diff --git a/assets/ar/semantics/STS/SemEval17T2STS_GPT4_FewShot.py b/assets/ar/semantics/STS/SemEval17T2STS_GPT4_FewShot.py index f4c700fd..54247a3a 100644 --- a/assets/ar/semantics/STS/SemEval17T2STS_GPT4_FewShot.py +++ b/assets/ar/semantics/STS/SemEval17T2STS_GPT4_FewShot.py @@ -1,5 +1,3 @@ -import os - from llmebench.datasets import SemEval17T2STSDataset from llmebench.models import OpenAIModel from llmebench.tasks import STSTask @@ -13,11 +11,6 @@ def config(): "task_args": {}, "model": OpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], "max_tries": 3, }, "general_args": { diff --git a/assets/ar/semantics/STS/SemEval17T2STS_GPT4_ZeroShot.py b/assets/ar/semantics/STS/SemEval17T2STS_GPT4_ZeroShot.py index a51e1698..5859aa77 100644 --- a/assets/ar/semantics/STS/SemEval17T2STS_GPT4_ZeroShot.py +++ b/assets/ar/semantics/STS/SemEval17T2STS_GPT4_ZeroShot.py @@ -1,4 +1,3 @@ -import os import re from llmebench.datasets import SemEval17T2STSDataset @@ -14,11 +13,6 @@ def config(): "task_args": {}, "model": OpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], "max_tries": 3, }, "general_args": { diff --git a/assets/ar/sentiment_emotion_others/emotion/Emotion_BLOOMZ_ZeroShot.py b/assets/ar/sentiment_emotion_others/emotion/Emotion_BLOOMZ_ZeroShot.py index 41fb3716..bacd49d7 100644 --- a/assets/ar/sentiment_emotion_others/emotion/Emotion_BLOOMZ_ZeroShot.py +++ b/assets/ar/sentiment_emotion_others/emotion/Emotion_BLOOMZ_ZeroShot.py @@ -1,5 +1,3 @@ -import os - from llmebench.datasets import EmotionDataset from llmebench.models import PetalsModel from llmebench.tasks import EmotionTask @@ -13,7 +11,6 @@ def config(): "task_args": {}, "model": PetalsModel, "model_args": { - "api_url": os.environ["API_URL"], "class_labels": [ "anger", "disgust", diff --git a/assets/ar/sentiment_emotion_others/emotion/Emotion_GPT35_ZeroShot.py b/assets/ar/sentiment_emotion_others/emotion/Emotion_GPT35_ZeroShot.py index 10c6a044..cabb78ae 100644 --- a/assets/ar/sentiment_emotion_others/emotion/Emotion_GPT35_ZeroShot.py +++ b/assets/ar/sentiment_emotion_others/emotion/Emotion_GPT35_ZeroShot.py @@ -1,5 +1,3 @@ -import os - from llmebench.datasets import EmotionDataset from llmebench.models import LegacyOpenAIModel from llmebench.tasks import EmotionTask @@ -13,11 +11,6 @@ def config(): "task_args": {}, "model": LegacyOpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], "class_labels": [ "anger", "disgust", diff --git a/assets/ar/sentiment_emotion_others/emotion/Emotion_GPT4_FewShot.py b/assets/ar/sentiment_emotion_others/emotion/Emotion_GPT4_FewShot.py index 0918b626..5956d5e0 100644 --- a/assets/ar/sentiment_emotion_others/emotion/Emotion_GPT4_FewShot.py +++ b/assets/ar/sentiment_emotion_others/emotion/Emotion_GPT4_FewShot.py @@ -1,5 +1,3 @@ -import os - from llmebench.datasets import EmotionDataset from llmebench.models import OpenAIModel from llmebench.tasks import EmotionTask @@ -13,11 +11,6 @@ def config(): "task_args": {}, "model": OpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], "class_labels": [ "anger", "disgust", diff --git a/assets/ar/sentiment_emotion_others/emotion/Emotion_GPT4_ZeroShot.py b/assets/ar/sentiment_emotion_others/emotion/Emotion_GPT4_ZeroShot.py index 27fb719e..483d8608 100644 --- a/assets/ar/sentiment_emotion_others/emotion/Emotion_GPT4_ZeroShot.py +++ b/assets/ar/sentiment_emotion_others/emotion/Emotion_GPT4_ZeroShot.py @@ -1,5 +1,3 @@ -import os - from llmebench.datasets import EmotionDataset from llmebench.models import OpenAIModel from llmebench.tasks import EmotionTask @@ -13,11 +11,6 @@ def config(): "task_args": {}, "model": OpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], "class_labels": [ "anger", "disgust", diff --git a/assets/ar/sentiment_emotion_others/sarcasm/ArSarcasm2_BLOOMZ_Zeroshot.py b/assets/ar/sentiment_emotion_others/sarcasm/ArSarcasm2_BLOOMZ_Zeroshot.py index cb34d67f..626c526e 100644 --- a/assets/ar/sentiment_emotion_others/sarcasm/ArSarcasm2_BLOOMZ_Zeroshot.py +++ b/assets/ar/sentiment_emotion_others/sarcasm/ArSarcasm2_BLOOMZ_Zeroshot.py @@ -1,5 +1,3 @@ -import os - from llmebench.datasets import ArSarcasmDataset from llmebench.models import PetalsModel from llmebench.tasks import SarcasmTask @@ -13,7 +11,6 @@ def config(): "task_args": {}, "model": PetalsModel, "model_args": { - "api_url": os.environ["API_URL"], "class_labels": ["TRUE", "FALSE"], "max_tries": 3, }, diff --git a/assets/ar/sentiment_emotion_others/sarcasm/ArSarcasm2_GPT3_ZeroShot.py b/assets/ar/sentiment_emotion_others/sarcasm/ArSarcasm2_GPT3_ZeroShot.py index 99228ec5..6e8800d6 100644 --- a/assets/ar/sentiment_emotion_others/sarcasm/ArSarcasm2_GPT3_ZeroShot.py +++ b/assets/ar/sentiment_emotion_others/sarcasm/ArSarcasm2_GPT3_ZeroShot.py @@ -1,5 +1,3 @@ -import os - from llmebench.datasets import ArSarcasmDataset from llmebench.models import LegacyOpenAIModel from llmebench.tasks import SarcasmTask @@ -13,11 +11,6 @@ def config(): "task_args": {}, "model": LegacyOpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], "class_labels": ["TRUE", "FALSE"], "max_tries": 1, }, diff --git a/assets/ar/sentiment_emotion_others/sarcasm/ArSarcasm2_GPT4_FewShot.py b/assets/ar/sentiment_emotion_others/sarcasm/ArSarcasm2_GPT4_FewShot.py index cf054e8f..e2ffb68b 100644 --- a/assets/ar/sentiment_emotion_others/sarcasm/ArSarcasm2_GPT4_FewShot.py +++ b/assets/ar/sentiment_emotion_others/sarcasm/ArSarcasm2_GPT4_FewShot.py @@ -1,5 +1,3 @@ -import os - from llmebench.datasets import ArSarcasmDataset from llmebench.models import OpenAIModel from llmebench.tasks import SarcasmTask @@ -13,11 +11,6 @@ def config(): "task_args": {}, "model": OpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], "class_labels": ["TRUE", "FALSE"], "max_tries": 3, }, diff --git a/assets/ar/sentiment_emotion_others/sarcasm/ArSarcasm2_GPT4_ZeroShot.py b/assets/ar/sentiment_emotion_others/sarcasm/ArSarcasm2_GPT4_ZeroShot.py index 6b46bd16..1bb67f11 100644 --- a/assets/ar/sentiment_emotion_others/sarcasm/ArSarcasm2_GPT4_ZeroShot.py +++ b/assets/ar/sentiment_emotion_others/sarcasm/ArSarcasm2_GPT4_ZeroShot.py @@ -1,5 +1,3 @@ -import os - from llmebench.datasets import ArSarcasmDataset from llmebench.models import OpenAIModel from llmebench.tasks import SarcasmTask @@ -13,11 +11,6 @@ def config(): "task_args": {}, "model": OpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], "class_labels": ["TRUE", "FALSE"], "max_tries": 3, }, diff --git a/assets/ar/sentiment_emotion_others/sarcasm/ArSarcasm_BLOOMZ_ZeroShot.py b/assets/ar/sentiment_emotion_others/sarcasm/ArSarcasm_BLOOMZ_ZeroShot.py index 2ce43b47..27e0310f 100644 --- a/assets/ar/sentiment_emotion_others/sarcasm/ArSarcasm_BLOOMZ_ZeroShot.py +++ b/assets/ar/sentiment_emotion_others/sarcasm/ArSarcasm_BLOOMZ_ZeroShot.py @@ -1,5 +1,3 @@ -import os - from llmebench.datasets import ArSarcasmDataset from llmebench.models import PetalsModel @@ -15,7 +13,6 @@ def config(): "task_args": {}, "model": PetalsModel, "model_args": { - "api_url": os.environ["API_URL"], "class_labels": ["TRUE", "FALSE"], "max_tries": 3, }, diff --git a/assets/ar/sentiment_emotion_others/sarcasm/ArSarcasm_GPT3_ZeroShot.py b/assets/ar/sentiment_emotion_others/sarcasm/ArSarcasm_GPT3_ZeroShot.py index 5a22daf9..1908a9b8 100644 --- a/assets/ar/sentiment_emotion_others/sarcasm/ArSarcasm_GPT3_ZeroShot.py +++ b/assets/ar/sentiment_emotion_others/sarcasm/ArSarcasm_GPT3_ZeroShot.py @@ -1,5 +1,3 @@ -import os - from llmebench.datasets import ArSarcasmDataset from llmebench.models import LegacyOpenAIModel from llmebench.tasks import SarcasmTask @@ -13,11 +11,6 @@ def config(): "task_args": {}, "model": LegacyOpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], "class_labels": ["TRUE", "FALSE"], "max_tries": 30, }, diff --git a/assets/ar/sentiment_emotion_others/sarcasm/ArSarcasm_GPT4_FewShot.py b/assets/ar/sentiment_emotion_others/sarcasm/ArSarcasm_GPT4_FewShot.py index e37b3593..70d6ec9c 100644 --- a/assets/ar/sentiment_emotion_others/sarcasm/ArSarcasm_GPT4_FewShot.py +++ b/assets/ar/sentiment_emotion_others/sarcasm/ArSarcasm_GPT4_FewShot.py @@ -1,5 +1,3 @@ -import os - from llmebench.datasets import ArSarcasmDataset from llmebench.models import OpenAIModel from llmebench.tasks import SarcasmTask @@ -13,11 +11,6 @@ def config(): "task_args": {}, "model": OpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], "class_labels": ["TRUE", "FALSE"], "max_tries": 3, }, diff --git a/assets/ar/sentiment_emotion_others/sarcasm/ArSarcasm_GPT4_ZeroShot.py b/assets/ar/sentiment_emotion_others/sarcasm/ArSarcasm_GPT4_ZeroShot.py index f09d159d..98a8eeda 100644 --- a/assets/ar/sentiment_emotion_others/sarcasm/ArSarcasm_GPT4_ZeroShot.py +++ b/assets/ar/sentiment_emotion_others/sarcasm/ArSarcasm_GPT4_ZeroShot.py @@ -1,5 +1,3 @@ -import os - from llmebench.datasets import ArSarcasmDataset from llmebench.models import OpenAIModel from llmebench.tasks import SarcasmTask @@ -13,11 +11,6 @@ def config(): "task_args": {}, "model": OpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], "class_labels": ["TRUE", "FALSE"], "max_tries": 3, }, diff --git a/assets/ar/sentiment_emotion_others/sentiment/ArSAS_BLOOMZ_ZeroShot.py b/assets/ar/sentiment_emotion_others/sentiment/ArSAS_BLOOMZ_ZeroShot.py index aa44e03b..ffaf11ec 100644 --- a/assets/ar/sentiment_emotion_others/sentiment/ArSAS_BLOOMZ_ZeroShot.py +++ b/assets/ar/sentiment_emotion_others/sentiment/ArSAS_BLOOMZ_ZeroShot.py @@ -1,5 +1,3 @@ -import os - from llmebench.datasets import ArSASDataset from llmebench.models import PetalsModel from llmebench.tasks import SentimentTask @@ -13,7 +11,6 @@ def config(): "task_args": {}, "model": PetalsModel, "model_args": { - "api_url": os.environ["API_URL"], "class_labels": ["Positive", "Negative", "Neutral", "Mixed"], "max_tries": 3, }, diff --git a/assets/ar/sentiment_emotion_others/sentiment/ArSAS_GPT35_ZeroShot.py b/assets/ar/sentiment_emotion_others/sentiment/ArSAS_GPT35_ZeroShot.py index fb7a6cb4..28b85067 100644 --- a/assets/ar/sentiment_emotion_others/sentiment/ArSAS_GPT35_ZeroShot.py +++ b/assets/ar/sentiment_emotion_others/sentiment/ArSAS_GPT35_ZeroShot.py @@ -1,5 +1,3 @@ -import os - from llmebench.datasets import ArSASDataset from llmebench.models import LegacyOpenAIModel from llmebench.tasks import SentimentTask @@ -13,11 +11,6 @@ def config(): "task_args": {}, "model": LegacyOpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], "class_labels": ["Positive", "Negative", "Neutral", "Mixed"], "max_tries": 3, }, diff --git a/assets/ar/sentiment_emotion_others/sentiment/ArSAS_GPT4_ZeroShot.py b/assets/ar/sentiment_emotion_others/sentiment/ArSAS_GPT4_ZeroShot.py index 820d3da6..c89cfef7 100644 --- a/assets/ar/sentiment_emotion_others/sentiment/ArSAS_GPT4_ZeroShot.py +++ b/assets/ar/sentiment_emotion_others/sentiment/ArSAS_GPT4_ZeroShot.py @@ -1,5 +1,3 @@ -import os - from llmebench.datasets import ArSASDataset from llmebench.models import OpenAIModel from llmebench.tasks import SentimentTask @@ -13,11 +11,6 @@ def config(): "task_args": {}, "model": OpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], "class_labels": ["Positive", "Negative", "Neutral", "Mixed"], "max_tries": 3, }, diff --git a/assets/ar/sentiment_emotion_others/stance_detection/Khouja20Stance_BLOOMZ_ZeroShot.py b/assets/ar/sentiment_emotion_others/stance_detection/Khouja20Stance_BLOOMZ_ZeroShot.py index 4ebef732..9708d980 100644 --- a/assets/ar/sentiment_emotion_others/stance_detection/Khouja20Stance_BLOOMZ_ZeroShot.py +++ b/assets/ar/sentiment_emotion_others/stance_detection/Khouja20Stance_BLOOMZ_ZeroShot.py @@ -1,5 +1,3 @@ -import os - from llmebench.datasets import Khouja20StanceDataset from llmebench.models import PetalsModel from llmebench.tasks import StanceTask @@ -13,7 +11,6 @@ def config(): "task_args": {}, "model": PetalsModel, "model_args": { - "api_url": os.environ["API_URL"], "class_labels": ["agree", "disagree"], "max_tries": 3, }, diff --git a/assets/ar/sentiment_emotion_others/stance_detection/Khouja20Stance_GPT35_ZeroShot.py b/assets/ar/sentiment_emotion_others/stance_detection/Khouja20Stance_GPT35_ZeroShot.py index 93219e6f..cc3be81d 100644 --- a/assets/ar/sentiment_emotion_others/stance_detection/Khouja20Stance_GPT35_ZeroShot.py +++ b/assets/ar/sentiment_emotion_others/stance_detection/Khouja20Stance_GPT35_ZeroShot.py @@ -1,5 +1,3 @@ -import os - from llmebench.datasets import Khouja20StanceDataset from llmebench.models import LegacyOpenAIModel from llmebench.tasks import StanceTask @@ -13,11 +11,6 @@ def config(): "task_args": {}, "model": LegacyOpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": "gpt", "class_labels": ["agree", "disagree"], "max_tries": 3, }, diff --git a/assets/ar/sentiment_emotion_others/stance_detection/Khouja20Stance_GPT4_FewShot.py b/assets/ar/sentiment_emotion_others/stance_detection/Khouja20Stance_GPT4_FewShot.py index 14095676..ee5ee991 100644 --- a/assets/ar/sentiment_emotion_others/stance_detection/Khouja20Stance_GPT4_FewShot.py +++ b/assets/ar/sentiment_emotion_others/stance_detection/Khouja20Stance_GPT4_FewShot.py @@ -1,5 +1,3 @@ -import os - from llmebench.datasets import Khouja20StanceDataset from llmebench.models import OpenAIModel from llmebench.tasks import StanceTask @@ -13,11 +11,6 @@ def config(): "task_args": {}, "model": OpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], "class_labels": ["agree", "disagree"], "max_tries": 30, }, diff --git a/assets/ar/sentiment_emotion_others/stance_detection/Khouja20Stance_GPT4_ZeroShot.py b/assets/ar/sentiment_emotion_others/stance_detection/Khouja20Stance_GPT4_ZeroShot.py index 8e3d36a4..b57a122d 100644 --- a/assets/ar/sentiment_emotion_others/stance_detection/Khouja20Stance_GPT4_ZeroShot.py +++ b/assets/ar/sentiment_emotion_others/stance_detection/Khouja20Stance_GPT4_ZeroShot.py @@ -1,5 +1,3 @@ -import os - from llmebench.datasets import Khouja20StanceDataset from llmebench.models import OpenAIModel from llmebench.tasks import StanceTask @@ -13,11 +11,6 @@ def config(): "task_args": {}, "model": OpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], "class_labels": ["agree", "disagree"], "max_tries": 30, }, diff --git a/assets/ar/sentiment_emotion_others/stance_detection/UnifiedFCStance_BLOOMZ_ZeroShot.py b/assets/ar/sentiment_emotion_others/stance_detection/UnifiedFCStance_BLOOMZ_ZeroShot.py index 7726cae7..6a476667 100644 --- a/assets/ar/sentiment_emotion_others/stance_detection/UnifiedFCStance_BLOOMZ_ZeroShot.py +++ b/assets/ar/sentiment_emotion_others/stance_detection/UnifiedFCStance_BLOOMZ_ZeroShot.py @@ -1,5 +1,3 @@ -import os - from llmebench.datasets import UnifiedFCStanceDataset from llmebench.models import PetalsModel from llmebench.tasks import StanceTask @@ -13,7 +11,6 @@ def config(): "task_args": {}, "model": PetalsModel, "model_args": { - "api_url": os.environ["API_URL"], "class_labels": ["agree", "disagree", "discuss", "unrelated"], "max_tries": 3, }, diff --git a/assets/ar/sentiment_emotion_others/stance_detection/UnifiedFCStance_GPT35_ZeroShot.py b/assets/ar/sentiment_emotion_others/stance_detection/UnifiedFCStance_GPT35_ZeroShot.py index 24f4e698..b7d08d07 100644 --- a/assets/ar/sentiment_emotion_others/stance_detection/UnifiedFCStance_GPT35_ZeroShot.py +++ b/assets/ar/sentiment_emotion_others/stance_detection/UnifiedFCStance_GPT35_ZeroShot.py @@ -1,5 +1,3 @@ -import os - from llmebench.datasets import UnifiedFCStanceDataset from llmebench.models import LegacyOpenAIModel from llmebench.tasks import StanceTask @@ -13,11 +11,6 @@ def config(): "task_args": {}, "model": LegacyOpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": "gpt", "class_labels": ["agree", "disagree", "unrelated"], "max_tries": 3, }, diff --git a/assets/ar/sentiment_emotion_others/stance_detection/UnifiedFCStance_GPT4_FewShot.py b/assets/ar/sentiment_emotion_others/stance_detection/UnifiedFCStance_GPT4_FewShot.py index 2a65603d..ec10be86 100644 --- a/assets/ar/sentiment_emotion_others/stance_detection/UnifiedFCStance_GPT4_FewShot.py +++ b/assets/ar/sentiment_emotion_others/stance_detection/UnifiedFCStance_GPT4_FewShot.py @@ -1,4 +1,3 @@ -import os import re from llmebench.datasets import UnifiedFCStanceDataset @@ -14,11 +13,6 @@ def config(): "task_args": {}, "model": OpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], "max_tries": 3, }, "general_args": { diff --git a/assets/ar/sentiment_emotion_others/stance_detection/UnifiedFCStance_GPT4_ZeroShot.py b/assets/ar/sentiment_emotion_others/stance_detection/UnifiedFCStance_GPT4_ZeroShot.py index a7f5fb21..28fa0447 100644 --- a/assets/ar/sentiment_emotion_others/stance_detection/UnifiedFCStance_GPT4_ZeroShot.py +++ b/assets/ar/sentiment_emotion_others/stance_detection/UnifiedFCStance_GPT4_ZeroShot.py @@ -1,4 +1,3 @@ -import os import re from llmebench.datasets import UnifiedFCStanceDataset @@ -14,11 +13,6 @@ def config(): "task_args": {}, "model": OpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], "max_tries": 3, }, "general_args": { diff --git a/assets/ar/sequence_tagging_and_information_extraction/NER/ANERcorp_GPT35_ZeroShot.py b/assets/ar/sequence_tagging_and_information_extraction/NER/ANERcorp_GPT35_ZeroShot.py index bc37ca21..90e264b6 100644 --- a/assets/ar/sequence_tagging_and_information_extraction/NER/ANERcorp_GPT35_ZeroShot.py +++ b/assets/ar/sequence_tagging_and_information_extraction/NER/ANERcorp_GPT35_ZeroShot.py @@ -1,4 +1,3 @@ -import os import re from llmebench.datasets import ANERcorpDataset @@ -14,11 +13,6 @@ def config(): "task_args": {}, "model": LegacyOpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": "gpt", "class_labels": [ "B-PERS", "I-PERS", diff --git a/assets/ar/sequence_tagging_and_information_extraction/NER/ANERcorp_GPT4_FewShot.py b/assets/ar/sequence_tagging_and_information_extraction/NER/ANERcorp_GPT4_FewShot.py index 92515df3..2f1c1781 100644 --- a/assets/ar/sequence_tagging_and_information_extraction/NER/ANERcorp_GPT4_FewShot.py +++ b/assets/ar/sequence_tagging_and_information_extraction/NER/ANERcorp_GPT4_FewShot.py @@ -1,4 +1,3 @@ -import os import re from llmebench.datasets import ANERcorpDataset @@ -14,11 +13,6 @@ def config(): "task_args": {}, "model": OpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], "class_labels": [ "B-PERS", "I-PERS", diff --git a/assets/ar/sequence_tagging_and_information_extraction/NER/ANERcorp_GPT4_ZeroShot.py b/assets/ar/sequence_tagging_and_information_extraction/NER/ANERcorp_GPT4_ZeroShot.py index 0187f170..c257b5d8 100644 --- a/assets/ar/sequence_tagging_and_information_extraction/NER/ANERcorp_GPT4_ZeroShot.py +++ b/assets/ar/sequence_tagging_and_information_extraction/NER/ANERcorp_GPT4_ZeroShot.py @@ -1,4 +1,3 @@ -import os import re from llmebench.datasets import ANERcorpDataset @@ -14,11 +13,6 @@ def config(): "task_args": {}, "model": OpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], "class_labels": [ "B-PERS", "I-PERS", diff --git a/assets/ar/sequence_tagging_and_information_extraction/NER/Aqmar_GPT35_ZeroShot.py b/assets/ar/sequence_tagging_and_information_extraction/NER/Aqmar_GPT35_ZeroShot.py index 7f69e344..ea4655a5 100644 --- a/assets/ar/sequence_tagging_and_information_extraction/NER/Aqmar_GPT35_ZeroShot.py +++ b/assets/ar/sequence_tagging_and_information_extraction/NER/Aqmar_GPT35_ZeroShot.py @@ -1,4 +1,3 @@ -import os import re from llmebench.datasets import AqmarDataset @@ -14,11 +13,6 @@ def config(): "task_args": {}, "model": LegacyOpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": "gpt", "class_labels": [ "B-PERS", "I-PERS", diff --git a/assets/ar/sequence_tagging_and_information_extraction/NER/Aqmar_GPT4_FewShot.py b/assets/ar/sequence_tagging_and_information_extraction/NER/Aqmar_GPT4_FewShot.py index 8847c408..41efb9ff 100644 --- a/assets/ar/sequence_tagging_and_information_extraction/NER/Aqmar_GPT4_FewShot.py +++ b/assets/ar/sequence_tagging_and_information_extraction/NER/Aqmar_GPT4_FewShot.py @@ -1,4 +1,3 @@ -import os import re from llmebench.datasets import AqmarDataset @@ -14,11 +13,6 @@ def config(): "task_args": {}, "model": OpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], "class_labels": [ "B-PERS", "I-PERS", diff --git a/assets/ar/sequence_tagging_and_information_extraction/NER/Aqmar_GPT4_ZeroShot.py b/assets/ar/sequence_tagging_and_information_extraction/NER/Aqmar_GPT4_ZeroShot.py index afb013a4..22ebb550 100644 --- a/assets/ar/sequence_tagging_and_information_extraction/NER/Aqmar_GPT4_ZeroShot.py +++ b/assets/ar/sequence_tagging_and_information_extraction/NER/Aqmar_GPT4_ZeroShot.py @@ -1,4 +1,3 @@ -import os import re from llmebench.datasets import AqmarDataset @@ -14,11 +13,6 @@ def config(): "task_args": {}, "model": OpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], "class_labels": [ "B-PERS", "I-PERS", diff --git a/assets/ar/sequence_tagging_and_information_extraction/NER/MGBWords_GPT35_ZeroShot.py b/assets/ar/sequence_tagging_and_information_extraction/NER/MGBWords_GPT35_ZeroShot.py index 989e0eae..642a3e85 100644 --- a/assets/ar/sequence_tagging_and_information_extraction/NER/MGBWords_GPT35_ZeroShot.py +++ b/assets/ar/sequence_tagging_and_information_extraction/NER/MGBWords_GPT35_ZeroShot.py @@ -1,4 +1,3 @@ -import os import re from llmebench.datasets import MGBWordsDataset @@ -14,11 +13,6 @@ def config(): "task_args": {}, "model": LegacyOpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], "class_labels": [ "B-PERS", "I-PERS", diff --git a/assets/ar/sequence_tagging_and_information_extraction/NER/MGBWords_GPT4_ZeroShot.py b/assets/ar/sequence_tagging_and_information_extraction/NER/MGBWords_GPT4_ZeroShot.py index 4e915f73..b3058736 100644 --- a/assets/ar/sequence_tagging_and_information_extraction/NER/MGBWords_GPT4_ZeroShot.py +++ b/assets/ar/sequence_tagging_and_information_extraction/NER/MGBWords_GPT4_ZeroShot.py @@ -1,4 +1,3 @@ -import os import re from llmebench.datasets import MGBWordsDataset @@ -14,11 +13,6 @@ def config(): "task_args": {}, "model": OpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], "class_labels": [ "B-PERS", "I-PERS", diff --git a/assets/ar/sequence_tagging_and_information_extraction/POS/QCRIDialectalArabicPOS_GPT4_ZeroShot.py b/assets/ar/sequence_tagging_and_information_extraction/POS/QCRIDialectalArabicPOS_GPT4_ZeroShot.py index 48f6a851..eeb6271c 100644 --- a/assets/ar/sequence_tagging_and_information_extraction/POS/QCRIDialectalArabicPOS_GPT4_ZeroShot.py +++ b/assets/ar/sequence_tagging_and_information_extraction/POS/QCRIDialectalArabicPOS_GPT4_ZeroShot.py @@ -1,4 +1,3 @@ -import os import re from llmebench.datasets import QCRIDialectalArabicPOSDataset @@ -113,11 +112,6 @@ def config(): "task_args": {}, "model": OpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], "max_tries": 3, }, "general_args": { diff --git a/assets/ar/sequence_tagging_and_information_extraction/POS/QCRIDialectalArabic_GPT35_ZeroShot.py b/assets/ar/sequence_tagging_and_information_extraction/POS/QCRIDialectalArabic_GPT35_ZeroShot.py index e864bb33..53d38fd9 100644 --- a/assets/ar/sequence_tagging_and_information_extraction/POS/QCRIDialectalArabic_GPT35_ZeroShot.py +++ b/assets/ar/sequence_tagging_and_information_extraction/POS/QCRIDialectalArabic_GPT35_ZeroShot.py @@ -1,4 +1,3 @@ -import os import re from llmebench.datasets import QCRIDialectalArabicPOSDataset @@ -113,11 +112,6 @@ def config(): "task_args": {}, "model": LegacyOpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], "max_tries": 3, }, "general_args": { diff --git a/assets/ar/sequence_tagging_and_information_extraction/POS/QCRIDialectalArabic_GPT4_FewShot.py b/assets/ar/sequence_tagging_and_information_extraction/POS/QCRIDialectalArabic_GPT4_FewShot.py index 27ad7743..a95a95fb 100644 --- a/assets/ar/sequence_tagging_and_information_extraction/POS/QCRIDialectalArabic_GPT4_FewShot.py +++ b/assets/ar/sequence_tagging_and_information_extraction/POS/QCRIDialectalArabic_GPT4_FewShot.py @@ -1,4 +1,3 @@ -import os import re from llmebench.datasets import QCRIDialectalArabicPOSDataset @@ -129,11 +128,6 @@ def config(): "task_args": {}, "model": OpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], "max_tries": 30, }, "general_args": { diff --git a/assets/ar/sequence_tagging_and_information_extraction/POS/WikiNews_GPT35_ZeroShot.py b/assets/ar/sequence_tagging_and_information_extraction/POS/WikiNews_GPT35_ZeroShot.py index 936d01b9..12328a90 100644 --- a/assets/ar/sequence_tagging_and_information_extraction/POS/WikiNews_GPT35_ZeroShot.py +++ b/assets/ar/sequence_tagging_and_information_extraction/POS/WikiNews_GPT35_ZeroShot.py @@ -1,4 +1,3 @@ -import os import re from llmebench.datasets import WikiNewsPOSDataset @@ -102,11 +101,6 @@ def config(): "task_args": {}, "model": LegacyOpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], "max_tries": 3, }, "general_args": { diff --git a/assets/ar/sequence_tagging_and_information_extraction/POS/WikiNews_GPT4_FewShot.py b/assets/ar/sequence_tagging_and_information_extraction/POS/WikiNews_GPT4_FewShot.py index 9b2958af..b62459f5 100644 --- a/assets/ar/sequence_tagging_and_information_extraction/POS/WikiNews_GPT4_FewShot.py +++ b/assets/ar/sequence_tagging_and_information_extraction/POS/WikiNews_GPT4_FewShot.py @@ -1,4 +1,3 @@ -import os import re from llmebench.datasets import WikiNewsPOSDataset @@ -102,11 +101,6 @@ def config(): "task_args": {}, "model": OpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], "max_tries": 30, }, "general_args": { diff --git a/assets/ar/sequence_tagging_and_information_extraction/POS/WikiNews_GPT4_ZeroShot.py b/assets/ar/sequence_tagging_and_information_extraction/POS/WikiNews_GPT4_ZeroShot.py index 7ea7de20..468bd7b6 100644 --- a/assets/ar/sequence_tagging_and_information_extraction/POS/WikiNews_GPT4_ZeroShot.py +++ b/assets/ar/sequence_tagging_and_information_extraction/POS/WikiNews_GPT4_ZeroShot.py @@ -1,4 +1,3 @@ -import os import re from llmebench.datasets import WikiNewsPOSDataset @@ -102,11 +101,6 @@ def config(): "task_args": {}, "model": OpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], "max_tries": 3, }, "general_args": { diff --git a/assets/ar/sequence_tagging_and_information_extraction/POS/XGLUE_GPT35_ZeroShot.py b/assets/ar/sequence_tagging_and_information_extraction/POS/XGLUE_GPT35_ZeroShot.py index 8f2810de..9a244f2a 100644 --- a/assets/ar/sequence_tagging_and_information_extraction/POS/XGLUE_GPT35_ZeroShot.py +++ b/assets/ar/sequence_tagging_and_information_extraction/POS/XGLUE_GPT35_ZeroShot.py @@ -1,4 +1,3 @@ -import os import re from llmebench.datasets import XGLUEPOSDataset @@ -102,11 +101,6 @@ def config(): "task_args": {}, "model": LegacyOpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], "max_tries": 3, }, "general_args": { diff --git a/assets/ar/sequence_tagging_and_information_extraction/POS/XGLUE_GPT4_FewShot.py b/assets/ar/sequence_tagging_and_information_extraction/POS/XGLUE_GPT4_FewShot.py index ae3b521d..89ac6b8e 100644 --- a/assets/ar/sequence_tagging_and_information_extraction/POS/XGLUE_GPT4_FewShot.py +++ b/assets/ar/sequence_tagging_and_information_extraction/POS/XGLUE_GPT4_FewShot.py @@ -1,4 +1,3 @@ -import os import re from llmebench.datasets import XGLUEPOSDataset @@ -102,11 +101,6 @@ def config(): "task_args": {}, "model": OpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], "max_tries": 30, }, "general_args": { diff --git a/assets/ar/sequence_tagging_and_information_extraction/POS/XGLUE_GPT4_ZeroShot.py b/assets/ar/sequence_tagging_and_information_extraction/POS/XGLUE_GPT4_ZeroShot.py index f16995a6..779d7b85 100644 --- a/assets/ar/sequence_tagging_and_information_extraction/POS/XGLUE_GPT4_ZeroShot.py +++ b/assets/ar/sequence_tagging_and_information_extraction/POS/XGLUE_GPT4_ZeroShot.py @@ -1,4 +1,3 @@ -import os import re from llmebench.datasets import XGLUEPOSDataset @@ -102,11 +101,6 @@ def config(): "task_args": {}, "model": OpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], "max_tries": 3, }, "general_args": { diff --git a/assets/ar/sequence_tagging_and_information_extraction/diacritization/BibleMaghrebi_GPT35_ZeroShot.py b/assets/ar/sequence_tagging_and_information_extraction/diacritization/BibleMaghrebi_GPT35_ZeroShot.py index 9b64775c..dba58e89 100644 --- a/assets/ar/sequence_tagging_and_information_extraction/diacritization/BibleMaghrebi_GPT35_ZeroShot.py +++ b/assets/ar/sequence_tagging_and_information_extraction/diacritization/BibleMaghrebi_GPT35_ZeroShot.py @@ -1,5 +1,3 @@ -import os - from llmebench.datasets import BibleMaghrebiDiacritizationDataset from llmebench.models import LegacyOpenAIModel from llmebench.tasks import ArabicDiacritizationTask @@ -22,11 +20,6 @@ def config(): "task_args": {}, "model": LegacyOpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], "max_tries": 3, }, "general_args": { diff --git a/assets/ar/sequence_tagging_and_information_extraction/diacritization/BibleMaghrebi_GPT4_ZeroShot.py b/assets/ar/sequence_tagging_and_information_extraction/diacritization/BibleMaghrebi_GPT4_ZeroShot.py index 69e791a4..dd34688e 100644 --- a/assets/ar/sequence_tagging_and_information_extraction/diacritization/BibleMaghrebi_GPT4_ZeroShot.py +++ b/assets/ar/sequence_tagging_and_information_extraction/diacritization/BibleMaghrebi_GPT4_ZeroShot.py @@ -1,5 +1,3 @@ -import os - from llmebench.datasets import BibleMaghrebiDiacritizationDataset from llmebench.models import OpenAIModel from llmebench.tasks import ArabicDiacritizationTask @@ -22,11 +20,6 @@ def config(): "task_args": {}, "model": OpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], "max_tries": 3, }, "general_args": { diff --git a/assets/ar/sequence_tagging_and_information_extraction/diacritization/WikiNews_GPT35_ZeroShot.py b/assets/ar/sequence_tagging_and_information_extraction/diacritization/WikiNews_GPT35_ZeroShot.py index 9a2d3b97..f4140bc5 100644 --- a/assets/ar/sequence_tagging_and_information_extraction/diacritization/WikiNews_GPT35_ZeroShot.py +++ b/assets/ar/sequence_tagging_and_information_extraction/diacritization/WikiNews_GPT35_ZeroShot.py @@ -1,5 +1,3 @@ -import os - from llmebench.datasets import WikiNewsDiacritizationDataset from llmebench.models import LegacyOpenAIModel from llmebench.tasks import ArabicDiacritizationTask @@ -13,11 +11,6 @@ def config(): "task_args": {}, "model": LegacyOpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], "max_tries": 3, }, "general_args": { diff --git a/assets/ar/sequence_tagging_and_information_extraction/diacritization/WikiNews_GPT4_ZeroShot.py b/assets/ar/sequence_tagging_and_information_extraction/diacritization/WikiNews_GPT4_ZeroShot.py index 4a9f9461..40763548 100644 --- a/assets/ar/sequence_tagging_and_information_extraction/diacritization/WikiNews_GPT4_ZeroShot.py +++ b/assets/ar/sequence_tagging_and_information_extraction/diacritization/WikiNews_GPT4_ZeroShot.py @@ -1,5 +1,3 @@ -import os - from llmebench.datasets import WikiNewsDiacritizationDataset from llmebench.models import OpenAIModel from llmebench.tasks import ArabicDiacritizationTask @@ -13,11 +11,6 @@ def config(): "task_args": {}, "model": OpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], "max_tries": 3, }, "general_args": { diff --git a/assets/ar/sequence_tagging_and_information_extraction/dialect_identification/ADI_BLOOMZ_ZeroShot.py b/assets/ar/sequence_tagging_and_information_extraction/dialect_identification/ADI_BLOOMZ_ZeroShot.py index 2ab66d46..15607a9b 100644 --- a/assets/ar/sequence_tagging_and_information_extraction/dialect_identification/ADI_BLOOMZ_ZeroShot.py +++ b/assets/ar/sequence_tagging_and_information_extraction/dialect_identification/ADI_BLOOMZ_ZeroShot.py @@ -1,5 +1,3 @@ -import os - from llmebench.datasets import ADIDataset from llmebench.models import PetalsModel from llmebench.tasks import DialectIDTask @@ -13,7 +11,6 @@ def config(): "task_args": {}, "model": PetalsModel, "model_args": { - "api_url": os.environ["API_URL"], "class_labels": [ "EGY", "IRA", diff --git a/assets/ar/sequence_tagging_and_information_extraction/dialect_identification/ADI_GPT35_ZeroShot.py b/assets/ar/sequence_tagging_and_information_extraction/dialect_identification/ADI_GPT35_ZeroShot.py index 3bb9a700..8c71b114 100644 --- a/assets/ar/sequence_tagging_and_information_extraction/dialect_identification/ADI_GPT35_ZeroShot.py +++ b/assets/ar/sequence_tagging_and_information_extraction/dialect_identification/ADI_GPT35_ZeroShot.py @@ -1,5 +1,3 @@ -import os - from llmebench.datasets import ADIDataset from llmebench.models import LegacyOpenAIModel from llmebench.tasks import DialectIDTask @@ -13,11 +11,6 @@ def config(): "task_args": {}, "model": LegacyOpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], "class_labels": [ "IRA", "JOR", diff --git a/assets/ar/sequence_tagging_and_information_extraction/dialect_identification/ADI_GPT4_FewShot.py b/assets/ar/sequence_tagging_and_information_extraction/dialect_identification/ADI_GPT4_FewShot.py index 3c70bebb..4d03f6e0 100644 --- a/assets/ar/sequence_tagging_and_information_extraction/dialect_identification/ADI_GPT4_FewShot.py +++ b/assets/ar/sequence_tagging_and_information_extraction/dialect_identification/ADI_GPT4_FewShot.py @@ -1,5 +1,3 @@ -import os - from llmebench.datasets import ADIDataset from llmebench.models import OpenAIModel from llmebench.tasks import DialectIDTask @@ -13,11 +11,6 @@ def config(): "task_args": {}, "model": OpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], "class_labels": [ "IRA", "JOR", diff --git a/assets/ar/sequence_tagging_and_information_extraction/dialect_identification/ADI_GPT4_ZeroShot.py b/assets/ar/sequence_tagging_and_information_extraction/dialect_identification/ADI_GPT4_ZeroShot.py index 2b1e5ca8..7fe16686 100644 --- a/assets/ar/sequence_tagging_and_information_extraction/dialect_identification/ADI_GPT4_ZeroShot.py +++ b/assets/ar/sequence_tagging_and_information_extraction/dialect_identification/ADI_GPT4_ZeroShot.py @@ -1,5 +1,3 @@ -import os - from llmebench.datasets import ADIDataset from llmebench.models import OpenAIModel from llmebench.tasks import DialectIDTask @@ -13,11 +11,6 @@ def config(): "task_args": {}, "model": OpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], "class_labels": [ "IRA", "JOR", diff --git a/assets/ar/sequence_tagging_and_information_extraction/dialect_identification/QADI_BLOOMZ_ZeroShot.py b/assets/ar/sequence_tagging_and_information_extraction/dialect_identification/QADI_BLOOMZ_ZeroShot.py index 42c82607..29ed7338 100644 --- a/assets/ar/sequence_tagging_and_information_extraction/dialect_identification/QADI_BLOOMZ_ZeroShot.py +++ b/assets/ar/sequence_tagging_and_information_extraction/dialect_identification/QADI_BLOOMZ_ZeroShot.py @@ -1,5 +1,3 @@ -import os - from llmebench.datasets import QADIDataset from llmebench.models import PetalsModel from llmebench.tasks import DialectIDTask @@ -13,7 +11,6 @@ def config(): "task_args": {}, "model": PetalsModel, "model_args": { - "api_url": os.environ["API_URL"], "class_labels": [ "EG", "DZ", diff --git a/assets/ar/sequence_tagging_and_information_extraction/dialect_identification/QADI_GPT35_ZeroShot.py b/assets/ar/sequence_tagging_and_information_extraction/dialect_identification/QADI_GPT35_ZeroShot.py index cc9c7539..e8bb3f5b 100644 --- a/assets/ar/sequence_tagging_and_information_extraction/dialect_identification/QADI_GPT35_ZeroShot.py +++ b/assets/ar/sequence_tagging_and_information_extraction/dialect_identification/QADI_GPT35_ZeroShot.py @@ -1,5 +1,3 @@ -import os - from llmebench.datasets import QADIDataset from llmebench.models import LegacyOpenAIModel from llmebench.tasks import DialectIDTask @@ -13,11 +11,6 @@ def config(): "task_args": {}, "model": LegacyOpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], "class_labels": [ "EG", "DZ", diff --git a/assets/ar/sequence_tagging_and_information_extraction/dialect_identification/QADI_GPT4_ZeroShot.py b/assets/ar/sequence_tagging_and_information_extraction/dialect_identification/QADI_GPT4_ZeroShot.py index 35caa0a9..5b0ec551 100644 --- a/assets/ar/sequence_tagging_and_information_extraction/dialect_identification/QADI_GPT4_ZeroShot.py +++ b/assets/ar/sequence_tagging_and_information_extraction/dialect_identification/QADI_GPT4_ZeroShot.py @@ -1,5 +1,3 @@ -import os - from llmebench.datasets import QADIDataset from llmebench.models import OpenAIModel from llmebench.tasks import DialectIDTask @@ -13,11 +11,6 @@ def config(): "task_args": {}, "model": OpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], "class_labels": [ "EG", "DZ", diff --git a/assets/ar/sequence_tagging_and_information_extraction/lemmatization/WikiNews_BLOOMZ_ZeroShot.py b/assets/ar/sequence_tagging_and_information_extraction/lemmatization/WikiNews_BLOOMZ_ZeroShot.py index ed19dfcc..7bdd0ce4 100644 --- a/assets/ar/sequence_tagging_and_information_extraction/lemmatization/WikiNews_BLOOMZ_ZeroShot.py +++ b/assets/ar/sequence_tagging_and_information_extraction/lemmatization/WikiNews_BLOOMZ_ZeroShot.py @@ -1,5 +1,3 @@ -import os - from llmebench.datasets import WikiNewsLemmatizationDataset from llmebench.models import PetalsModel from llmebench.tasks import LemmatizationTask @@ -13,7 +11,6 @@ def config(): "task_args": {}, "model": PetalsModel, "model_args": { - "api_url": os.environ["API_URL"], "max_tries": 3, }, "general_args": { diff --git a/assets/ar/sequence_tagging_and_information_extraction/lemmatization/WikiNews_GPT35_ZeroShot.py b/assets/ar/sequence_tagging_and_information_extraction/lemmatization/WikiNews_GPT35_ZeroShot.py index 448876f9..4ab1f6ba 100644 --- a/assets/ar/sequence_tagging_and_information_extraction/lemmatization/WikiNews_GPT35_ZeroShot.py +++ b/assets/ar/sequence_tagging_and_information_extraction/lemmatization/WikiNews_GPT35_ZeroShot.py @@ -1,5 +1,3 @@ -import os - from llmebench.datasets import WikiNewsLemmatizationDataset from llmebench.models import LegacyOpenAIModel from llmebench.tasks import LemmatizationTask @@ -13,11 +11,6 @@ def config(): "task_args": {}, "model": LegacyOpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], "max_tries": 3, }, "general_args": { diff --git a/assets/ar/sequence_tagging_and_information_extraction/lemmatization/WikiNews_GPT4_ZeroShot.py b/assets/ar/sequence_tagging_and_information_extraction/lemmatization/WikiNews_GPT4_ZeroShot.py index 7818cfc7..62d6a6d0 100644 --- a/assets/ar/sequence_tagging_and_information_extraction/lemmatization/WikiNews_GPT4_ZeroShot.py +++ b/assets/ar/sequence_tagging_and_information_extraction/lemmatization/WikiNews_GPT4_ZeroShot.py @@ -1,5 +1,3 @@ -import os - from llmebench.datasets import WikiNewsLemmatizationDataset from llmebench.models import OpenAIModel from llmebench.tasks import LemmatizationTask @@ -13,11 +11,6 @@ def config(): "task_args": {}, "model": OpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], "max_tries": 3, }, "general_args": { diff --git a/assets/ar/sequence_tagging_and_information_extraction/parsing/PADT_GPT35_ZeroShot.py b/assets/ar/sequence_tagging_and_information_extraction/parsing/PADT_GPT35_ZeroShot.py index a42a9046..c3746373 100644 --- a/assets/ar/sequence_tagging_and_information_extraction/parsing/PADT_GPT35_ZeroShot.py +++ b/assets/ar/sequence_tagging_and_information_extraction/parsing/PADT_GPT35_ZeroShot.py @@ -1,4 +1,3 @@ -import os import re from llmebench.datasets import PADTDataset @@ -14,12 +13,6 @@ def config(): "task_args": {}, "model": LegacyOpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], - # "class_labels": ["m", "f"], "max_tries": 3, }, "general_args": { diff --git a/assets/ar/sequence_tagging_and_information_extraction/parsing/PADT_GPT4_ZeroShot.py b/assets/ar/sequence_tagging_and_information_extraction/parsing/PADT_GPT4_ZeroShot.py index f6247235..298cb4f1 100644 --- a/assets/ar/sequence_tagging_and_information_extraction/parsing/PADT_GPT4_ZeroShot.py +++ b/assets/ar/sequence_tagging_and_information_extraction/parsing/PADT_GPT4_ZeroShot.py @@ -1,4 +1,3 @@ -import os import re from llmebench.datasets import PADTDataset @@ -14,12 +13,6 @@ def config(): "task_args": {}, "model": OpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], - # "class_labels": ["m", "f"], "max_tries": 3, }, "general_args": { diff --git a/assets/ar/sequence_tagging_and_information_extraction/segmentation/QCRIDialectalArabic_GPT35_ZeroShot.py b/assets/ar/sequence_tagging_and_information_extraction/segmentation/QCRIDialectalArabic_GPT35_ZeroShot.py index f5c83ff1..7517482b 100644 --- a/assets/ar/sequence_tagging_and_information_extraction/segmentation/QCRIDialectalArabic_GPT35_ZeroShot.py +++ b/assets/ar/sequence_tagging_and_information_extraction/segmentation/QCRIDialectalArabic_GPT35_ZeroShot.py @@ -1,4 +1,3 @@ -import os import re from llmebench.datasets import QCRIDialectalArabicSegmentationDataset @@ -25,11 +24,6 @@ def config(): "task_args": {}, "model": LegacyOpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], "max_tries": 3, }, "general_args": { diff --git a/assets/ar/sequence_tagging_and_information_extraction/segmentation/QCRIDialectalArabic_GPT4_ZeroShot.py b/assets/ar/sequence_tagging_and_information_extraction/segmentation/QCRIDialectalArabic_GPT4_ZeroShot.py index 7c6f9804..8431e344 100644 --- a/assets/ar/sequence_tagging_and_information_extraction/segmentation/QCRIDialectalArabic_GPT4_ZeroShot.py +++ b/assets/ar/sequence_tagging_and_information_extraction/segmentation/QCRIDialectalArabic_GPT4_ZeroShot.py @@ -1,4 +1,3 @@ -import os import re from llmebench.datasets import QCRIDialectalArabicSegmentationDataset @@ -25,11 +24,6 @@ def config(): "task_args": {}, "model": OpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], "max_tries": 3, }, "general_args": { diff --git a/assets/ar/sequence_tagging_and_information_extraction/segmentation/WikiNews_GPT35_ZeroShot.py b/assets/ar/sequence_tagging_and_information_extraction/segmentation/WikiNews_GPT35_ZeroShot.py index e3985ed6..ab439a2e 100644 --- a/assets/ar/sequence_tagging_and_information_extraction/segmentation/WikiNews_GPT35_ZeroShot.py +++ b/assets/ar/sequence_tagging_and_information_extraction/segmentation/WikiNews_GPT35_ZeroShot.py @@ -1,4 +1,3 @@ -import os import re from llmebench.datasets import WikiNewsSegmentationDataset @@ -14,11 +13,6 @@ def config(): "task_args": {}, "model": LegacyOpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], "max_tries": 3, }, "general_args": { diff --git a/assets/ar/sequence_tagging_and_information_extraction/segmentation/WikiNews_GPT4_ZeroShot.py b/assets/ar/sequence_tagging_and_information_extraction/segmentation/WikiNews_GPT4_ZeroShot.py index 7324a4d5..2d29556c 100644 --- a/assets/ar/sequence_tagging_and_information_extraction/segmentation/WikiNews_GPT4_ZeroShot.py +++ b/assets/ar/sequence_tagging_and_information_extraction/segmentation/WikiNews_GPT4_ZeroShot.py @@ -1,4 +1,3 @@ -import os import re from llmebench.datasets import WikiNewsSegmentationDataset @@ -14,11 +13,6 @@ def config(): "task_args": {}, "model": OpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], "max_tries": 3, }, "general_args": { diff --git a/assets/bg/factuality_disinformation_harmful_content/checkworthyness/CT22Checkworthiness_BLOOMZ_ZeroShot.py b/assets/bg/factuality_disinformation_harmful_content/checkworthyness/CT22Checkworthiness_BLOOMZ_ZeroShot.py index 29b04acb..62b19237 100644 --- a/assets/bg/factuality_disinformation_harmful_content/checkworthyness/CT22Checkworthiness_BLOOMZ_ZeroShot.py +++ b/assets/bg/factuality_disinformation_harmful_content/checkworthyness/CT22Checkworthiness_BLOOMZ_ZeroShot.py @@ -1,5 +1,3 @@ -import os - from llmebench.datasets import CT22CheckworthinessDataset from llmebench.models import PetalsModel from llmebench.tasks import CheckworthinessTask @@ -13,7 +11,6 @@ def config(): "task_args": {}, "model": PetalsModel, "model_args": { - "api_url": os.environ["API_URL"], "class_labels": ["0", "1"], "max_tries": 3, }, diff --git a/assets/bg/factuality_disinformation_harmful_content/checkworthyness/CT22Checkworthiness_GPT4_FewShot.py b/assets/bg/factuality_disinformation_harmful_content/checkworthyness/CT22Checkworthiness_GPT4_FewShot.py index b48a9570..ce10ac99 100644 --- a/assets/bg/factuality_disinformation_harmful_content/checkworthyness/CT22Checkworthiness_GPT4_FewShot.py +++ b/assets/bg/factuality_disinformation_harmful_content/checkworthyness/CT22Checkworthiness_GPT4_FewShot.py @@ -1,4 +1,3 @@ -import os import re from llmebench.datasets import CT22CheckworthinessDataset @@ -14,11 +13,6 @@ def config(): "task_args": {}, "model": OpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], "class_labels": ["0", "1"], "max_tries": 30, }, diff --git a/assets/bg/factuality_disinformation_harmful_content/checkworthyness/CT22Checkworthiness_GPT4_ZeroShot.py b/assets/bg/factuality_disinformation_harmful_content/checkworthyness/CT22Checkworthiness_GPT4_ZeroShot.py index cbbb2197..09c14fe5 100644 --- a/assets/bg/factuality_disinformation_harmful_content/checkworthyness/CT22Checkworthiness_GPT4_ZeroShot.py +++ b/assets/bg/factuality_disinformation_harmful_content/checkworthyness/CT22Checkworthiness_GPT4_ZeroShot.py @@ -1,4 +1,3 @@ -import os import re from llmebench.datasets import CT22CheckworthinessDataset @@ -14,11 +13,6 @@ def config(): "task_args": {}, "model": OpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], "class_labels": ["0", "1"], "max_tries": 30, }, diff --git a/assets/bn/sentiment_emotion_others/sentiment/BanglaSentiment_BLOOMZ_ZeroShot.py b/assets/bn/sentiment_emotion_others/sentiment/BanglaSentiment_BLOOMZ_ZeroShot.py index 0e5197f4..5d0f08b8 100644 --- a/assets/bn/sentiment_emotion_others/sentiment/BanglaSentiment_BLOOMZ_ZeroShot.py +++ b/assets/bn/sentiment_emotion_others/sentiment/BanglaSentiment_BLOOMZ_ZeroShot.py @@ -1,5 +1,3 @@ -import os - from llmebench.datasets import BanglaSentimentDataset from llmebench.models import PetalsModel from llmebench.tasks import SentimentTask @@ -13,7 +11,6 @@ def config(): "task_args": {}, "model": PetalsModel, "model_args": { - "api_url": os.environ["API_URL"], "class_labels": ["Positive", "Negative", "Neutral"], "max_tries": 10, }, diff --git a/assets/bn/sentiment_emotion_others/sentiment/BanglaSentiment_GPT4_FewShot.py b/assets/bn/sentiment_emotion_others/sentiment/BanglaSentiment_GPT4_FewShot.py index 7e04359c..195fcf30 100644 --- a/assets/bn/sentiment_emotion_others/sentiment/BanglaSentiment_GPT4_FewShot.py +++ b/assets/bn/sentiment_emotion_others/sentiment/BanglaSentiment_GPT4_FewShot.py @@ -1,5 +1,3 @@ -import os - from llmebench.datasets import BanglaSentimentDataset from llmebench.models import OpenAIModel from llmebench.tasks import SentimentTask @@ -13,11 +11,6 @@ def config(): "task_args": {}, "model": OpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], "class_labels": ["Positive", "Negative", "Neutral"], "max_tries": 20, }, diff --git a/assets/bn/sentiment_emotion_others/sentiment/BanglaSentiment_GPT4_ZeroShot.py b/assets/bn/sentiment_emotion_others/sentiment/BanglaSentiment_GPT4_ZeroShot.py index d20050bb..b2cd5dc8 100644 --- a/assets/bn/sentiment_emotion_others/sentiment/BanglaSentiment_GPT4_ZeroShot.py +++ b/assets/bn/sentiment_emotion_others/sentiment/BanglaSentiment_GPT4_ZeroShot.py @@ -1,5 +1,3 @@ -import os - from llmebench.datasets import BanglaSentimentDataset from llmebench.models import OpenAIModel from llmebench.tasks import SentimentTask @@ -13,11 +11,6 @@ def config(): "task_args": {}, "model": OpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], "class_labels": ["Positive", "Negative", "Neutral"], "max_tries": 20, }, diff --git a/assets/de/factuality_disinformation_harmful_content/propaganda/SemEval23T3Propaganda_BLOOMZ_ZeroShot.py b/assets/de/factuality_disinformation_harmful_content/propaganda/SemEval23T3Propaganda_BLOOMZ_ZeroShot.py index 1813a478..d52e0c58 100644 --- a/assets/de/factuality_disinformation_harmful_content/propaganda/SemEval23T3Propaganda_BLOOMZ_ZeroShot.py +++ b/assets/de/factuality_disinformation_harmful_content/propaganda/SemEval23T3Propaganda_BLOOMZ_ZeroShot.py @@ -1,4 +1,3 @@ -import os import re from llmebench.datasets import SemEval23T3PropagandaDataset @@ -16,7 +15,6 @@ def config(): "task_args": {}, "model": PetalsModel, "model_args": { - "api_url": os.environ["API_URL"], "class_labels": [ "Appeal_to_Authority", "Appeal_to_Fear-Prejudice", diff --git a/assets/de/factuality_disinformation_harmful_content/propaganda/SemEval23T3Propaganda_GPT4_FewShot.py b/assets/de/factuality_disinformation_harmful_content/propaganda/SemEval23T3Propaganda_GPT4_FewShot.py index bc942db0..6e97d472 100644 --- a/assets/de/factuality_disinformation_harmful_content/propaganda/SemEval23T3Propaganda_GPT4_FewShot.py +++ b/assets/de/factuality_disinformation_harmful_content/propaganda/SemEval23T3Propaganda_GPT4_FewShot.py @@ -1,4 +1,3 @@ -import os import re from llmebench.datasets import SemEval23T3PropagandaDataset @@ -16,11 +15,6 @@ def config(): "task_args": {}, "model": OpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], "class_labels": [ "Appeal_to_Authority", "Appeal_to_Fear-Prejudice", diff --git a/assets/de/factuality_disinformation_harmful_content/propaganda/SemEval23T3Propaganda_GPT4_ZeroShot.py b/assets/de/factuality_disinformation_harmful_content/propaganda/SemEval23T3Propaganda_GPT4_ZeroShot.py index f6da5c02..745c854a 100644 --- a/assets/de/factuality_disinformation_harmful_content/propaganda/SemEval23T3Propaganda_GPT4_ZeroShot.py +++ b/assets/de/factuality_disinformation_harmful_content/propaganda/SemEval23T3Propaganda_GPT4_ZeroShot.py @@ -1,5 +1,3 @@ -import os - import regex as re from llmebench.datasets import SemEval23T3PropagandaDataset @@ -17,11 +15,6 @@ def config(): "task_args": {}, "model": OpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], "class_labels": [ "Appeal_to_Authority", "Appeal_to_Fear-Prejudice", diff --git a/assets/en/factuality_disinformation_harmful_content/checkworthyness/CT22Checkworthiness_BLOOMZ_ZeroShot.py b/assets/en/factuality_disinformation_harmful_content/checkworthyness/CT22Checkworthiness_BLOOMZ_ZeroShot.py index 354942d9..bfda9c8f 100644 --- a/assets/en/factuality_disinformation_harmful_content/checkworthyness/CT22Checkworthiness_BLOOMZ_ZeroShot.py +++ b/assets/en/factuality_disinformation_harmful_content/checkworthyness/CT22Checkworthiness_BLOOMZ_ZeroShot.py @@ -1,5 +1,3 @@ -import os - from llmebench.datasets import CT22CheckworthinessDataset from llmebench.models import PetalsModel from llmebench.tasks import CheckworthinessTask @@ -13,7 +11,6 @@ def config(): "task_args": {}, "model": PetalsModel, "model_args": { - "api_url": os.environ["API_URL"], "class_labels": ["0", "1"], "max_tries": 3, }, diff --git a/assets/en/factuality_disinformation_harmful_content/checkworthyness/CT22Checkworthiness_GPT4_FewShot.py b/assets/en/factuality_disinformation_harmful_content/checkworthyness/CT22Checkworthiness_GPT4_FewShot.py index 435bee5b..44d6e6b1 100644 --- a/assets/en/factuality_disinformation_harmful_content/checkworthyness/CT22Checkworthiness_GPT4_FewShot.py +++ b/assets/en/factuality_disinformation_harmful_content/checkworthyness/CT22Checkworthiness_GPT4_FewShot.py @@ -1,4 +1,3 @@ -import os import re from llmebench.datasets import CT22CheckworthinessDataset @@ -14,11 +13,6 @@ def config(): "task_args": {}, "model": OpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], "class_labels": ["0", "1"], "max_tries": 30, }, diff --git a/assets/en/factuality_disinformation_harmful_content/checkworthyness/CT22Checkworthiness_GPT4_ZeroShot.py b/assets/en/factuality_disinformation_harmful_content/checkworthyness/CT22Checkworthiness_GPT4_ZeroShot.py index 8d494558..e2690657 100644 --- a/assets/en/factuality_disinformation_harmful_content/checkworthyness/CT22Checkworthiness_GPT4_ZeroShot.py +++ b/assets/en/factuality_disinformation_harmful_content/checkworthyness/CT22Checkworthiness_GPT4_ZeroShot.py @@ -1,4 +1,3 @@ -import os import re from llmebench.datasets import CT22CheckworthinessDataset @@ -14,11 +13,6 @@ def config(): "task_args": {}, "model": OpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], "class_labels": ["0", "1"], "max_tries": 30, }, diff --git a/assets/en/factuality_disinformation_harmful_content/propaganda/SemEval23T3Propaganda_BLOOMZ_ZeroShot.py b/assets/en/factuality_disinformation_harmful_content/propaganda/SemEval23T3Propaganda_BLOOMZ_ZeroShot.py index c111f473..431165bc 100644 --- a/assets/en/factuality_disinformation_harmful_content/propaganda/SemEval23T3Propaganda_BLOOMZ_ZeroShot.py +++ b/assets/en/factuality_disinformation_harmful_content/propaganda/SemEval23T3Propaganda_BLOOMZ_ZeroShot.py @@ -1,4 +1,3 @@ -import os import re from llmebench.datasets import SemEval23T3PropagandaDataset @@ -16,7 +15,6 @@ def config(): "task_args": {}, "model": PetalsModel, "model_args": { - "api_url": os.environ["API_URL"], "class_labels": [ "Appeal_to_Authority", "Appeal_to_Fear-Prejudice", diff --git a/assets/en/factuality_disinformation_harmful_content/propaganda/SemEval23T3Propaganda_GPT4_FewShot.py b/assets/en/factuality_disinformation_harmful_content/propaganda/SemEval23T3Propaganda_GPT4_FewShot.py index 87d4c265..eb05398e 100644 --- a/assets/en/factuality_disinformation_harmful_content/propaganda/SemEval23T3Propaganda_GPT4_FewShot.py +++ b/assets/en/factuality_disinformation_harmful_content/propaganda/SemEval23T3Propaganda_GPT4_FewShot.py @@ -1,4 +1,3 @@ -import os import re from llmebench.datasets import SemEval23T3PropagandaDataset @@ -16,11 +15,6 @@ def config(): "task_args": {}, "model": OpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], "class_labels": [ "Appeal_to_Authority", "Appeal_to_Fear-Prejudice", diff --git a/assets/en/factuality_disinformation_harmful_content/propaganda/SemEval23T3Propaganda_GPT4_ZeroShot.py b/assets/en/factuality_disinformation_harmful_content/propaganda/SemEval23T3Propaganda_GPT4_ZeroShot.py index 6c21039d..6ae57afc 100644 --- a/assets/en/factuality_disinformation_harmful_content/propaganda/SemEval23T3Propaganda_GPT4_ZeroShot.py +++ b/assets/en/factuality_disinformation_harmful_content/propaganda/SemEval23T3Propaganda_GPT4_ZeroShot.py @@ -1,5 +1,3 @@ -import os - import regex as re from llmebench.datasets import SemEval23T3PropagandaDataset @@ -17,11 +15,6 @@ def config(): "task_args": {}, "model": OpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], "class_labels": [ "Appeal_to_Authority", "Appeal_to_Fear-Prejudice", diff --git a/assets/es/factuality_disinformation_harmful_content/checkworthyness/CT22Checkworthiness_BLOOMZ_ZeroShot.py b/assets/es/factuality_disinformation_harmful_content/checkworthyness/CT22Checkworthiness_BLOOMZ_ZeroShot.py index 01f09ef8..bda9962d 100644 --- a/assets/es/factuality_disinformation_harmful_content/checkworthyness/CT22Checkworthiness_BLOOMZ_ZeroShot.py +++ b/assets/es/factuality_disinformation_harmful_content/checkworthyness/CT22Checkworthiness_BLOOMZ_ZeroShot.py @@ -1,5 +1,3 @@ -import os - from llmebench.datasets import CT22CheckworthinessDataset from llmebench.models import PetalsModel from llmebench.tasks import CheckworthinessTask @@ -13,7 +11,6 @@ def config(): "task_args": {}, "model": PetalsModel, "model_args": { - "api_url": os.environ["API_URL"], "class_labels": ["0", "1"], "max_tries": 3, }, diff --git a/assets/es/factuality_disinformation_harmful_content/checkworthyness/CT22Checkworthiness_GPT4_FewShot.py b/assets/es/factuality_disinformation_harmful_content/checkworthyness/CT22Checkworthiness_GPT4_FewShot.py index 86bea89c..8f4871ea 100644 --- a/assets/es/factuality_disinformation_harmful_content/checkworthyness/CT22Checkworthiness_GPT4_FewShot.py +++ b/assets/es/factuality_disinformation_harmful_content/checkworthyness/CT22Checkworthiness_GPT4_FewShot.py @@ -1,4 +1,3 @@ -import os import re from llmebench.datasets import CT22CheckworthinessDataset @@ -14,11 +13,6 @@ def config(): "task_args": {}, "model": OpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], "class_labels": ["0", "1"], "max_tries": 30, }, diff --git a/assets/es/factuality_disinformation_harmful_content/checkworthyness/CT22Checkworthiness_GPT4_ZeroShot.py b/assets/es/factuality_disinformation_harmful_content/checkworthyness/CT22Checkworthiness_GPT4_ZeroShot.py index 0e7d97cf..b58737df 100644 --- a/assets/es/factuality_disinformation_harmful_content/checkworthyness/CT22Checkworthiness_GPT4_ZeroShot.py +++ b/assets/es/factuality_disinformation_harmful_content/checkworthyness/CT22Checkworthiness_GPT4_ZeroShot.py @@ -1,4 +1,3 @@ -import os import re from llmebench.datasets import CT22CheckworthinessDataset @@ -14,11 +13,6 @@ def config(): "task_args": {}, "model": OpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], "class_labels": ["0", "1"], "max_tries": 30, }, diff --git a/assets/fr/factuality_disinformation_harmful_content/propaganda/SemEval23T3Propaganda_BLOOMZ_ZeroShot.py b/assets/fr/factuality_disinformation_harmful_content/propaganda/SemEval23T3Propaganda_BLOOMZ_ZeroShot.py index 35126cbd..ddc8b858 100644 --- a/assets/fr/factuality_disinformation_harmful_content/propaganda/SemEval23T3Propaganda_BLOOMZ_ZeroShot.py +++ b/assets/fr/factuality_disinformation_harmful_content/propaganda/SemEval23T3Propaganda_BLOOMZ_ZeroShot.py @@ -1,4 +1,3 @@ -import os import re from llmebench.datasets import SemEval23T3PropagandaDataset @@ -16,7 +15,6 @@ def config(): "task_args": {}, "model": PetalsModel, "model_args": { - "api_url": os.environ["API_URL"], "class_labels": [ "Appeal_to_Authority", "Appeal_to_Fear-Prejudice", diff --git a/assets/fr/factuality_disinformation_harmful_content/propaganda/SemEval23T3Propaganda_GPT4_FewShot.py b/assets/fr/factuality_disinformation_harmful_content/propaganda/SemEval23T3Propaganda_GPT4_FewShot.py index b3d649ba..f5fd03ad 100644 --- a/assets/fr/factuality_disinformation_harmful_content/propaganda/SemEval23T3Propaganda_GPT4_FewShot.py +++ b/assets/fr/factuality_disinformation_harmful_content/propaganda/SemEval23T3Propaganda_GPT4_FewShot.py @@ -1,4 +1,3 @@ -import os import re from llmebench.datasets import SemEval23T3PropagandaDataset @@ -16,11 +15,6 @@ def config(): "task_args": {}, "model": OpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], "class_labels": [ "Appeal_to_Authority", "Appeal_to_Fear-Prejudice", diff --git a/assets/fr/factuality_disinformation_harmful_content/propaganda/SemEval23T3Propaganda_GPT4_ZeroShot.py b/assets/fr/factuality_disinformation_harmful_content/propaganda/SemEval23T3Propaganda_GPT4_ZeroShot.py index b8ef7c6a..41f2faaa 100644 --- a/assets/fr/factuality_disinformation_harmful_content/propaganda/SemEval23T3Propaganda_GPT4_ZeroShot.py +++ b/assets/fr/factuality_disinformation_harmful_content/propaganda/SemEval23T3Propaganda_GPT4_ZeroShot.py @@ -1,5 +1,3 @@ -import os - import regex as re from llmebench.datasets import SemEval23T3PropagandaDataset @@ -17,11 +15,6 @@ def config(): "task_args": {}, "model": OpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], "class_labels": [ "Appeal_to_Authority", "Appeal_to_Fear-Prejudice", diff --git a/assets/it/factuality_disinformation_harmful_content/propaganda/SemEval23T3Propaganda_BLOOMZ_ZeroShot.py b/assets/it/factuality_disinformation_harmful_content/propaganda/SemEval23T3Propaganda_BLOOMZ_ZeroShot.py index 69d838c5..38f7828d 100644 --- a/assets/it/factuality_disinformation_harmful_content/propaganda/SemEval23T3Propaganda_BLOOMZ_ZeroShot.py +++ b/assets/it/factuality_disinformation_harmful_content/propaganda/SemEval23T3Propaganda_BLOOMZ_ZeroShot.py @@ -1,4 +1,3 @@ -import os import re from llmebench.datasets import SemEval23T3PropagandaDataset @@ -16,7 +15,6 @@ def config(): "task_args": {}, "model": PetalsModel, "model_args": { - "api_url": os.environ["API_URL"], "class_labels": [ "Appeal_to_Authority", "Appeal_to_Fear-Prejudice", diff --git a/assets/it/factuality_disinformation_harmful_content/propaganda/SemEval23T3Propaganda_GPT4_FewShot.py b/assets/it/factuality_disinformation_harmful_content/propaganda/SemEval23T3Propaganda_GPT4_FewShot.py index 50192a35..fa717aed 100644 --- a/assets/it/factuality_disinformation_harmful_content/propaganda/SemEval23T3Propaganda_GPT4_FewShot.py +++ b/assets/it/factuality_disinformation_harmful_content/propaganda/SemEval23T3Propaganda_GPT4_FewShot.py @@ -1,4 +1,3 @@ -import os import re from llmebench.datasets import SemEval23T3PropagandaDataset @@ -16,11 +15,6 @@ def config(): "task_args": {}, "model": OpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], "class_labels": [ "Appeal_to_Authority", "Appeal_to_Fear-Prejudice", diff --git a/assets/it/factuality_disinformation_harmful_content/propaganda/SemEval23T3Propaganda_GPT4_ZeroShot.py b/assets/it/factuality_disinformation_harmful_content/propaganda/SemEval23T3Propaganda_GPT4_ZeroShot.py index fc7eb576..518be26b 100644 --- a/assets/it/factuality_disinformation_harmful_content/propaganda/SemEval23T3Propaganda_GPT4_ZeroShot.py +++ b/assets/it/factuality_disinformation_harmful_content/propaganda/SemEval23T3Propaganda_GPT4_ZeroShot.py @@ -1,5 +1,3 @@ -import os - import regex as re from llmebench.datasets import SemEval23T3PropagandaDataset @@ -17,11 +15,6 @@ def config(): "task_args": {}, "model": OpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], "class_labels": [ "Appeal_to_Authority", "Appeal_to_Fear-Prejudice", diff --git a/assets/nl/factuality_disinformation_harmful_content/checkworthyness/CT22Checkworthiness_BLOOMZ_ZeroShot.py b/assets/nl/factuality_disinformation_harmful_content/checkworthyness/CT22Checkworthiness_BLOOMZ_ZeroShot.py index 2593d129..87f2a978 100644 --- a/assets/nl/factuality_disinformation_harmful_content/checkworthyness/CT22Checkworthiness_BLOOMZ_ZeroShot.py +++ b/assets/nl/factuality_disinformation_harmful_content/checkworthyness/CT22Checkworthiness_BLOOMZ_ZeroShot.py @@ -1,5 +1,3 @@ -import os - from llmebench.datasets import CT22CheckworthinessDataset from llmebench.models import PetalsModel from llmebench.tasks import CheckworthinessTask @@ -13,7 +11,6 @@ def config(): "task_args": {}, "model": PetalsModel, "model_args": { - "api_url": os.environ["API_URL"], "class_labels": ["0", "1"], "max_tries": 3, }, diff --git a/assets/nl/factuality_disinformation_harmful_content/checkworthyness/CT22Checkworthiness_GPT4_FewShot.py b/assets/nl/factuality_disinformation_harmful_content/checkworthyness/CT22Checkworthiness_GPT4_FewShot.py index f2173065..87f172a8 100644 --- a/assets/nl/factuality_disinformation_harmful_content/checkworthyness/CT22Checkworthiness_GPT4_FewShot.py +++ b/assets/nl/factuality_disinformation_harmful_content/checkworthyness/CT22Checkworthiness_GPT4_FewShot.py @@ -1,4 +1,3 @@ -import os import re from llmebench.datasets import CT22CheckworthinessDataset @@ -14,11 +13,6 @@ def config(): "task_args": {}, "model": OpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], "class_labels": ["0", "1"], "max_tries": 30, }, diff --git a/assets/nl/factuality_disinformation_harmful_content/checkworthyness/CT22Checkworthiness_GPT4_ZeroShot.py b/assets/nl/factuality_disinformation_harmful_content/checkworthyness/CT22Checkworthiness_GPT4_ZeroShot.py index 82324740..64cac5f4 100644 --- a/assets/nl/factuality_disinformation_harmful_content/checkworthyness/CT22Checkworthiness_GPT4_ZeroShot.py +++ b/assets/nl/factuality_disinformation_harmful_content/checkworthyness/CT22Checkworthiness_GPT4_ZeroShot.py @@ -1,4 +1,3 @@ -import os import re from llmebench.datasets import CT22CheckworthinessDataset @@ -14,11 +13,6 @@ def config(): "task_args": {}, "model": OpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], "class_labels": ["0", "1"], "max_tries": 30, }, diff --git a/assets/pl/factuality_disinformation_harmful_content/propaganda/SemEval23T3Propaganda_BLOOMZ_ZeroShot.py b/assets/pl/factuality_disinformation_harmful_content/propaganda/SemEval23T3Propaganda_BLOOMZ_ZeroShot.py index 6b47668d..37e12c1d 100644 --- a/assets/pl/factuality_disinformation_harmful_content/propaganda/SemEval23T3Propaganda_BLOOMZ_ZeroShot.py +++ b/assets/pl/factuality_disinformation_harmful_content/propaganda/SemEval23T3Propaganda_BLOOMZ_ZeroShot.py @@ -1,4 +1,3 @@ -import os import re from llmebench.datasets import SemEval23T3PropagandaDataset @@ -16,7 +15,6 @@ def config(): "task_args": {}, "model": PetalsModel, "model_args": { - "api_url": os.environ["API_URL"], "class_labels": [ "Appeal_to_Authority", "Appeal_to_Fear-Prejudice", diff --git a/assets/pl/factuality_disinformation_harmful_content/propaganda/SemEval23T3Propaganda_GPT4_FewShot.py b/assets/pl/factuality_disinformation_harmful_content/propaganda/SemEval23T3Propaganda_GPT4_FewShot.py index 2d277dc9..54f5cb09 100644 --- a/assets/pl/factuality_disinformation_harmful_content/propaganda/SemEval23T3Propaganda_GPT4_FewShot.py +++ b/assets/pl/factuality_disinformation_harmful_content/propaganda/SemEval23T3Propaganda_GPT4_FewShot.py @@ -1,4 +1,3 @@ -import os import re from llmebench.datasets import SemEval23T3PropagandaDataset @@ -16,11 +15,6 @@ def config(): "task_args": {}, "model": OpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], "class_labels": [ "Appeal_to_Authority", "Appeal_to_Fear-Prejudice", diff --git a/assets/pl/factuality_disinformation_harmful_content/propaganda/SemEval23T3Propaganda_GPT4_ZeroShot.py b/assets/pl/factuality_disinformation_harmful_content/propaganda/SemEval23T3Propaganda_GPT4_ZeroShot.py index fcee685f..f46b8385 100644 --- a/assets/pl/factuality_disinformation_harmful_content/propaganda/SemEval23T3Propaganda_GPT4_ZeroShot.py +++ b/assets/pl/factuality_disinformation_harmful_content/propaganda/SemEval23T3Propaganda_GPT4_ZeroShot.py @@ -1,5 +1,3 @@ -import os - import regex as re from llmebench.datasets import SemEval23T3PropagandaDataset @@ -17,11 +15,6 @@ def config(): "task_args": {}, "model": OpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], "class_labels": [ "Appeal_to_Authority", "Appeal_to_Fear-Prejudice", diff --git a/assets/ru/factuality_disinformation_harmful_content/propaganda/SemEval23T3Propaganda_BLOOMZ_ZeroShot.py b/assets/ru/factuality_disinformation_harmful_content/propaganda/SemEval23T3Propaganda_BLOOMZ_ZeroShot.py index ec07abc0..2acb5da6 100644 --- a/assets/ru/factuality_disinformation_harmful_content/propaganda/SemEval23T3Propaganda_BLOOMZ_ZeroShot.py +++ b/assets/ru/factuality_disinformation_harmful_content/propaganda/SemEval23T3Propaganda_BLOOMZ_ZeroShot.py @@ -1,4 +1,3 @@ -import os import re from llmebench.datasets import SemEval23T3PropagandaDataset @@ -16,7 +15,6 @@ def config(): "task_args": {}, "model": PetalsModel, "model_args": { - "api_url": os.environ["API_URL"], "class_labels": [ "Appeal_to_Authority", "Appeal_to_Fear-Prejudice", diff --git a/assets/ru/factuality_disinformation_harmful_content/propaganda/SemEval23T3Propaganda_GPT4_FewShot.py b/assets/ru/factuality_disinformation_harmful_content/propaganda/SemEval23T3Propaganda_GPT4_FewShot.py index 3fcf0875..93c86922 100644 --- a/assets/ru/factuality_disinformation_harmful_content/propaganda/SemEval23T3Propaganda_GPT4_FewShot.py +++ b/assets/ru/factuality_disinformation_harmful_content/propaganda/SemEval23T3Propaganda_GPT4_FewShot.py @@ -1,4 +1,3 @@ -import os import re from llmebench.datasets import SemEval23T3PropagandaDataset @@ -16,11 +15,6 @@ def config(): "task_args": {}, "model": OpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], "class_labels": [ "Appeal_to_Authority", "Appeal_to_Fear-Prejudice", diff --git a/assets/ru/factuality_disinformation_harmful_content/propaganda/SemEval23T3Propaganda_GPT4_ZeroShot.py b/assets/ru/factuality_disinformation_harmful_content/propaganda/SemEval23T3Propaganda_GPT4_ZeroShot.py index 847cb05d..addf2585 100644 --- a/assets/ru/factuality_disinformation_harmful_content/propaganda/SemEval23T3Propaganda_GPT4_ZeroShot.py +++ b/assets/ru/factuality_disinformation_harmful_content/propaganda/SemEval23T3Propaganda_GPT4_ZeroShot.py @@ -1,5 +1,3 @@ -import os - import regex as re from llmebench.datasets import SemEval23T3PropagandaDataset @@ -17,11 +15,6 @@ def config(): "task_args": {}, "model": OpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], "class_labels": [ "Appeal_to_Authority", "Appeal_to_Fear-Prejudice", diff --git a/assets/tr/factuality_disinformation_harmful_content/checkworthyness/CT22Checkworthiness_BLOOMZ_ZeroShot.py b/assets/tr/factuality_disinformation_harmful_content/checkworthyness/CT22Checkworthiness_BLOOMZ_ZeroShot.py index 7d23c985..776c998c 100644 --- a/assets/tr/factuality_disinformation_harmful_content/checkworthyness/CT22Checkworthiness_BLOOMZ_ZeroShot.py +++ b/assets/tr/factuality_disinformation_harmful_content/checkworthyness/CT22Checkworthiness_BLOOMZ_ZeroShot.py @@ -1,5 +1,3 @@ -import os - from llmebench.datasets import CT22CheckworthinessDataset from llmebench.models import PetalsModel from llmebench.tasks import CheckworthinessTask @@ -13,7 +11,6 @@ def config(): "task_args": {}, "model": PetalsModel, "model_args": { - "api_url": os.environ["API_URL"], "class_labels": ["0", "1"], "max_tries": 3, }, diff --git a/assets/tr/factuality_disinformation_harmful_content/checkworthyness/CT22Checkworthiness_GPT4_FewShot.py b/assets/tr/factuality_disinformation_harmful_content/checkworthyness/CT22Checkworthiness_GPT4_FewShot.py index 31f373c2..abf77031 100644 --- a/assets/tr/factuality_disinformation_harmful_content/checkworthyness/CT22Checkworthiness_GPT4_FewShot.py +++ b/assets/tr/factuality_disinformation_harmful_content/checkworthyness/CT22Checkworthiness_GPT4_FewShot.py @@ -1,4 +1,3 @@ -import os import re from llmebench.datasets import CT22CheckworthinessDataset @@ -14,11 +13,6 @@ def config(): "task_args": {}, "model": OpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], "class_labels": ["0", "1"], "max_tries": 30, }, diff --git a/assets/tr/factuality_disinformation_harmful_content/checkworthyness/CT22Checkworthiness_GPT4_ZeroShot.py b/assets/tr/factuality_disinformation_harmful_content/checkworthyness/CT22Checkworthiness_GPT4_ZeroShot.py index 5c25b413..315e9174 100644 --- a/assets/tr/factuality_disinformation_harmful_content/checkworthyness/CT22Checkworthiness_GPT4_ZeroShot.py +++ b/assets/tr/factuality_disinformation_harmful_content/checkworthyness/CT22Checkworthiness_GPT4_ZeroShot.py @@ -1,4 +1,3 @@ -import os import re from llmebench.datasets import CT22CheckworthinessDataset @@ -14,11 +13,6 @@ def config(): "task_args": {}, "model": OpenAIModel, "model_args": { - "api_type": "azure", - "api_version": "2023-03-15-preview", - "api_base": os.environ["AZURE_API_URL"], - "api_key": os.environ["AZURE_API_KEY"], - "engine_name": os.environ["ENGINE_NAME"], "class_labels": ["0", "1"], "max_tries": 30, }, diff --git a/envs/azure.env b/envs/azure.env new file mode 100644 index 00000000..6b54d492 --- /dev/null +++ b/envs/azure.env @@ -0,0 +1,5 @@ +# Sample env file for using a model hosted on Azure +AZURE_API_VERSION=... +AZURE_API_URL=... +AZURE_API_KEY=... +AZURE_ENGINE_NAME=... \ No newline at end of file diff --git a/envs/openai.env b/envs/openai.env new file mode 100644 index 00000000..9cd5f53c --- /dev/null +++ b/envs/openai.env @@ -0,0 +1,6 @@ +# Sample env file for using a model hosted on OpenAI's platform +OPENAI_API_TYPE="openai"/"azure" # Optional, defaults to "openai" +OPENAI_API_VERSION="..." # Optional, defaults to latest +OPENAI_API_BASE="..." # Optional +OPENAI_API_KEY="..." +OPENAI_MODEL="..." \ No newline at end of file diff --git a/envs/petals.env b/envs/petals.env new file mode 100644 index 00000000..5a78c24c --- /dev/null +++ b/envs/petals.env @@ -0,0 +1,2 @@ +# Sample env file for using a model hosted using Petals +PETALS_API_URL="..." \ No newline at end of file diff --git a/llmebench/benchmark.py b/llmebench/benchmark.py index d676460b..57762ba4 100644 --- a/llmebench/benchmark.py +++ b/llmebench/benchmark.py @@ -11,6 +11,8 @@ from itertools import zip_longest from pathlib import Path +from dotenv import load_dotenv + from llmebench import utils @@ -287,6 +289,10 @@ def main(): help="Limit the number of input instances that will be processed", ) + parser.add_argument( + "-e", "--env", type=Path, help="Path to an .env file to load model parameters" + ) + group = parser.add_argument_group("Few Shot Experiments") group.add_argument( "-n", @@ -307,6 +313,9 @@ def main(): format="%(asctime)s %(levelname)s %(message)s", ) + if args.env: + load_dotenv(args.env) + benchmark = Benchmark(args.benchmark_dir) assets = benchmark.find_assets(filter_str=args.filter) diff --git a/llmebench/models/OpenAI.py b/llmebench/models/OpenAI.py index d53812f7..338d36d8 100644 --- a/llmebench/models/OpenAI.py +++ b/llmebench/models/OpenAI.py @@ -1,16 +1,19 @@ +import os + import openai from llmebench.models.model_base import ModelBase -class LegacyOpenAIModel(ModelBase): +class OpenAIModelBase(ModelBase): def __init__( self, - api_type, - api_base, - api_version, - api_key, - engine_name, + api_type=None, + api_base=None, + api_version=None, + api_key=None, + engine_name=None, + model_name=None, temperature=0, top_p=0.95, max_tokens=800, @@ -19,33 +22,108 @@ def __init__( **kwargs ): # API parameters + # Order of priority is: + # 1. arguments to the constructor + # 2. OPENAI_* env vars + # 3. AZURE_* env vars + azure_vars = self.read_azure_env_vars() + openai_vars = self.read_openai_env_vars() + + api_type = ( + api_type or openai_vars["api_type"] or azure_vars["api_type"] or "openai" + ) + api_base = api_base or openai_vars["api_base"] or azure_vars["api_base"] + api_version = ( + api_version or openai_vars["api_version"] or azure_vars["api_version"] + ) + api_key = api_key or openai_vars["api_key"] or azure_vars["api_key"] + model_name = ( + model_name or engine_name or openai_vars["model"] or azure_vars["model"] + ) + openai.api_type = api_type - openai.api_base = api_base - openai.api_version = api_version + + if api_type == "azure" and api_base is None: + raise Exception( + "API URL must be provided as model config or environment variable (`AZURE_API_BASE`)" + ) + + if api_base: + openai.api_base = api_base + + if api_type == "azure" and api_version is None: + raise Exception( + "API version must be provided as model config or environment variable (`AZURE_API_VERSION`)" + ) + + if api_version: + openai.api_version = api_version + + if api_key is None: + raise Exception( + "API Key must be provided as model config or environment variable (`OPENAI_API_KEY` or `AZURE_API_KEY`)" + ) + openai.api_key = api_key - self.engine_name = engine_name - # GPT parameters - self.temperature = temperature - self.top_p = top_p - self.max_tokens = max_tokens - self.frequency_penalty = frequency_penalty - self.presence_penalty = presence_penalty + self.model_params = {} - self.system_message_template = "<|im_start|>system\n{}\n<|im_end|>" - self.message_template = "\n<|im_start|>{}\n{}\n<|im_end|>" + if model_name is None: + raise Exception( + "Model/Engine must be provided as model config or enviroment variable `OPENAI_MODEL`/`AZURE_ENGINE_NAME`" + ) - super(LegacyOpenAIModel, self).__init__( + if api_type == "azure": + self.model_params["engine"] = model_name + else: + self.model_params["model"] = model_name + + # GPT parameters + self.model_params["temperature"] = temperature + self.model_params["top_p"] = top_p + self.model_params["max_tokens"] = max_tokens + self.model_params["frequency_penalty"] = frequency_penalty + self.model_params["presence_penalty"] = presence_penalty + + super(OpenAIModelBase, self).__init__( retry_exceptions=(openai.error.Timeout, openai.error.RateLimitError), **kwargs ) + @staticmethod + def read_azure_env_vars(): + curr_api_type = None + if "AZURE_ENGINE_NAME" in os.environ or "ENGINE_NAME" in os.environ: + curr_api_type = "azure" + return { + "api_type": curr_api_type, + "api_version": os.getenv("AZURE_API_VERSION"), + "api_base": os.getenv("AZURE_API_URL"), + "api_key": os.getenv("AZURE_API_KEY"), + "model": os.getenv("AZURE_ENGINE_NAME", os.getenv("ENGINE_NAME")), + } + + @staticmethod + def read_openai_env_vars(): + return { + "api_type": os.getenv("OPEN_API_TYPE"), + "api_version": os.getenv("OPENAI_API_VERSION"), + "api_base": os.getenv("OPENAI_API_BASE"), + "api_key": os.getenv("OPENAI_API_KEY"), + "model": os.getenv("OPENAI_MODEL"), + } + + +class LegacyOpenAIModel(OpenAIModelBase): # defining a function to create the prompt from the system and user messages def create_prompt(self, system_message, messages): - prompt = self.system_message_template.format(system_message) + system_message_template = "<|im_start|>system\n{}\n<|im_end|>" + message_template = "\n<|im_start|>{}\n{}\n<|im_end|>" + + prompt = system_message_template.format(system_message) for message in messages: - prompt += self.message_template.format(message["sender"], message["text"]) + prompt += message_template.format(message["sender"], message["text"]) prompt += "\n<|im_start|>assistant\n" return prompt @@ -65,53 +143,13 @@ def prompt(self, processed_input): messages = processed_input["messages"] prompt = self.create_prompt(system_message, messages) response = openai.Completion.create( - engine=self.engine_name, - prompt=prompt, - temperature=self.temperature, - max_tokens=self.max_tokens, - top_p=self.top_p, - frequency_penalty=self.frequency_penalty, - presence_penalty=self.presence_penalty, - stop=["<|im_end|>"], + prompt=prompt, stop=["<|im_end|>"], **self.model_params ) return response -class OpenAIModel(ModelBase): - def __init__( - self, - api_type, - api_base, - api_version, - api_key, - engine_name, - temperature=0, - top_p=0.95, - max_tokens=800, - frequency_penalty=0, - presence_penalty=0, - **kwargs - ): - # API parameters - openai.api_type = api_type - openai.api_base = api_base - openai.api_version = api_version - openai.api_key = api_key - self.engine_name = engine_name - - # GPT parameters - self.temperature = temperature - self.top_p = top_p - self.max_tokens = max_tokens - self.frequency_penalty = frequency_penalty - self.presence_penalty = presence_penalty - - super(OpenAIModel, self).__init__( - retry_exceptions=(openai.error.Timeout, openai.error.RateLimitError), - **kwargs - ) - +class OpenAIModel(OpenAIModelBase): def summarize_response(self, response): if ( "choices" in response @@ -127,14 +165,7 @@ def summarize_response(self, response): def prompt(self, processed_input): response = openai.ChatCompletion.create( - engine=self.engine_name, - messages=processed_input, - temperature=self.temperature, - max_tokens=self.max_tokens, - top_p=self.top_p, - frequency_penalty=self.frequency_penalty, - presence_penalty=self.presence_penalty, - stop=None, + messages=processed_input, **self.model_params ) return response diff --git a/llmebench/models/Petals.py b/llmebench/models/Petals.py index f3a826ad..1f44a834 100644 --- a/llmebench/models/Petals.py +++ b/llmebench/models/Petals.py @@ -1,4 +1,5 @@ import json +import os from websockets.sync.client import connect @@ -22,10 +23,20 @@ def __str__(self): class PetalsModel(ModelBase): def __init__( - self, api_url, timeout=20, temperature=0, top_p=0.95, max_tokens=1512, **kwargs + self, + api_url=None, + timeout=20, + temperature=0, + top_p=0.95, + max_tokens=1512, + **kwargs, ): # API parameters - self.api_url = api_url + self.api_url = api_url or os.getenv("PETALS_API_URL") + if self.api_url is None: + raise Exception( + "API url must be provided as model config or environment variable (`PETALS_API_URL`)" + ) self.api_timeout = timeout self.request_header = {"type": "open_inference_session", "max_length": 1512} diff --git a/setup.cfg b/setup.cfg index 97bfd027..6df97ac4 100644 --- a/setup.cfg +++ b/setup.cfg @@ -23,6 +23,7 @@ install_requires = nltk==3.8.1 openai==0.27.7 pandas==2.0.2 + python-dotenv==1.0.0 scikit-learn==1.2.2 tenacity==8.2.2 websockets==11.0.3 diff --git a/tests/models/test_LegacyOpenAI.py b/tests/models/test_LegacyOpenAI.py index c289874a..ac2ce036 100644 --- a/tests/models/test_LegacyOpenAI.py +++ b/tests/models/test_LegacyOpenAI.py @@ -1,20 +1,12 @@ -import os - import unittest -from unittest.mock import patch - from llmebench import Benchmark from llmebench.models import LegacyOpenAIModel -class TestAssetsForGPTPrompts(unittest.TestCase): +class TestAssetsForLegacyOpenAIPrompts(unittest.TestCase): @classmethod - @patch("os.environ") - def setUpClass(cls, os_env_mock): - # Handle environment variables required at runtime - os_env_mock.__getitem__.side_effect = lambda x: "test_str" - + def setUpClass(cls): # Load the benchmark assets benchmark = Benchmark(benchmark_dir="assets") all_assets = benchmark.find_assets() @@ -24,10 +16,8 @@ def setUpClass(cls, os_env_mock): asset for asset in all_assets if asset["config"] in [LegacyOpenAIModel] ] - @patch("os.environ") - def test_gpt_prompts(self, os_env_mock): + def test_legacy_openai_prompts(self): "Test if all assets using this model return data in an appropriate format for prompting" - os_env_mock.__getitem__.side_effect = lambda x: "test_str" n_shots = 3 # Sample for few shot prompts diff --git a/tests/models/test_OpenAIModel.py b/tests/models/test_OpenAIModel.py index 8d500c94..d4a7a97e 100644 --- a/tests/models/test_OpenAIModel.py +++ b/tests/models/test_OpenAIModel.py @@ -1,20 +1,15 @@ -import os - import unittest - from unittest.mock import patch +import openai + from llmebench import Benchmark from llmebench.models import OpenAIModel -class TestAssetsForGPTChatCompletionPrompts(unittest.TestCase): +class TestAssetsForOpenAIPrompts(unittest.TestCase): @classmethod - @patch("os.environ") - def setUpClass(cls, os_env_mock): - # Handle environment variables required at runtime - os_env_mock.__getitem__.side_effect = lambda x: "test_str" - + def setUpClass(cls): # Load the benchmark assets benchmark = Benchmark(benchmark_dir="assets") all_assets = benchmark.find_assets() @@ -24,10 +19,8 @@ def setUpClass(cls, os_env_mock): asset for asset in all_assets if asset["config"]["model"] in [OpenAIModel] ] - @patch("os.environ") - def test_gpt_prompts(self, os_env_mock): + def test_openai_prompts(self): "Test if all assets using this model return data in an appropriate format for prompting" - os_env_mock.__getitem__.side_effect = lambda x: "test_str" n_shots = 3 # Sample for few shot prompts @@ -52,3 +45,68 @@ def test_gpt_prompts(self, os_env_mock): self.assertIsInstance(message["role"], str) self.assertIn("content", message) self.assertIsInstance(message["content"], str) + + def test_openai_config(self): + "Test if model config parameters passed as arguments are used" + model = OpenAIModel( + api_type="llmebench", api_key="secret-key", model_name="private-model" + ) + + self.assertEqual(openai.api_type, "llmebench") + self.assertEqual(openai.api_key, "secret-key") + self.assertEqual(model.model_params["model"], "private-model") + + def test_openai_config_azure(self): + "Test if model config parameters passed as arguments are used (azure)" + model = OpenAIModel( + api_type="azure", + api_key="secret-key", + engine_name="private-model", + api_version="v1", + api_base="url.llmebench.org", + ) + + self.assertEqual(openai.api_type, "azure") + self.assertEqual(openai.api_key, "secret-key") + self.assertEqual(openai.api_version, "v1") + self.assertEqual(model.model_params["engine"], "private-model") + + @patch.dict( + "os.environ", + { + "AZURE_API_VERSION": "v1", + "AZURE_API_URL": "url", + "AZURE_API_KEY": "secret-key", + "AZURE_ENGINE_NAME": "private-model", + }, + ) + def test_openai_config_env_var_azure(self): + "Test if model config parameters passed as environment variables are used (azure)" + model = OpenAIModel() + + self.assertEqual(openai.api_type, "azure") + self.assertEqual(openai.api_key, "secret-key") + self.assertEqual(openai.api_version, "v1") + self.assertEqual(model.model_params["engine"], "private-model") + + @patch.dict( + "os.environ", {"OPENAI_API_KEY": "secret-key", "OPENAI_MODEL": "private-model"} + ) + def test_openai_config_env_var_openai(self): + "Test if model config parameters passed as environment variables are used (openai)" + model = OpenAIModel() + + self.assertEqual(openai.api_type, "openai") + self.assertEqual(openai.api_key, "secret-key") + self.assertEqual(model.model_params["model"], "private-model") + + @patch.dict( + "os.environ", {"OPENAI_API_KEY": "secret-key", "OPENAI_MODEL": "private-model"} + ) + def test_openai_config_priority(self): + "Test if model config parameters override environment variables" + model = OpenAIModel(model_name="another-model") + + self.assertEqual(openai.api_type, "openai") + self.assertEqual(openai.api_key, "secret-key") + self.assertEqual(model.model_params["model"], "another-model") diff --git a/tests/models/test_Petals.py b/tests/models/test_Petals.py index ca5eef08..9920b7b1 100644 --- a/tests/models/test_Petals.py +++ b/tests/models/test_Petals.py @@ -1,7 +1,4 @@ -import os - import unittest - from unittest.mock import patch from llmebench import Benchmark @@ -10,11 +7,7 @@ class TestAssetsForPetalsPrompts(unittest.TestCase): @classmethod - @patch("os.environ") - def setUpClass(cls, os_env_mock): - # Handle environment variables required at runtime - os_env_mock.__getitem__.side_effect = lambda x: "test_str" - + def setUpClass(cls): # Load the benchmark assets benchmark = Benchmark(benchmark_dir="assets") all_assets = benchmark.find_assets() @@ -24,10 +17,8 @@ def setUpClass(cls, os_env_mock): asset for asset in all_assets if asset["config"]["model"] in [PetalsModel] ] - @patch("os.environ") - def test_gpt_prompts(self, os_env_mock): + def test_petals_prompts(self): "Test if all assets using this model return data in an appropriate format for prompting" - os_env_mock.__getitem__.side_effect = lambda x: "test_str" n_shots = 3 # Sample for few shot prompts @@ -47,3 +38,33 @@ def test_gpt_prompts(self, os_env_mock): self.assertIsInstance(prompt, dict) self.assertIn("prompt", prompt) self.assertIsInstance(prompt["prompt"], str) + + def test_petals_config(self): + "Test if model config parameters passed as arguments are used" + model = PetalsModel(api_url="petals.llmebench.org") + + self.assertEqual(model.api_url, "petals.llmebench.org") + + @patch.dict( + "os.environ", + { + "PETALS_API_URL": "petals.llmebench.org", + }, + ) + def test_petals_config_env_var(self): + "Test if model config parameters passed as environment variables are used" + model = PetalsModel() + + self.assertEqual(model.api_url, "petals.llmebench.org") + + @patch.dict( + "os.environ", + { + "PETALS_API_URL": "petals.llmebench.org", + }, + ) + def test_petals_config_priority(self): + "Test if model config parameters passed as environment variables are used" + model = PetalsModel(api_url="petals2.llmebench.org") + + self.assertEqual(model.api_url, "petals2.llmebench.org") diff --git a/tests/tasks/test_evaluation.py b/tests/tasks/test_evaluation.py index d7e687f6..5c242cf2 100644 --- a/tests/tasks/test_evaluation.py +++ b/tests/tasks/test_evaluation.py @@ -2,26 +2,18 @@ import unittest -from unittest.mock import patch - from llmebench import Benchmark class TestAssetsTaskEvaluation(unittest.TestCase): @classmethod - @patch("os.environ") - def setUpClass(cls, os_env_mock): - # Handle environment variables required at runtime - os_env_mock.__getitem__.side_effect = lambda x: "test_str" - + def setUpClass(cls): # Load the benchmark assets benchmark = Benchmark(benchmark_dir="assets") cls.assets = benchmark.find_assets() - @patch("os.environ") - def test_task_evaluation_failure(self, os_env_mock): + def test_task_evaluation_failure(self): "Test if tasks used in assets handle failed runs" - os_env_mock.__getitem__.side_effect = lambda x: "test_str" for asset in self.assets: with self.subTest(msg=asset["name"]): config = asset["config"] @@ -39,10 +31,8 @@ def test_task_evaluation_failure(self, os_env_mock): "" ) - @patch("os.environ") - def test_task_evaluation_format(self, os_env_mock): + def test_task_evaluation_format(self): "Test if evaluation function returns a dict" - os_env_mock.__getitem__.side_effect = lambda x: "test_str" for asset in self.assets: with self.subTest(msg=asset["name"]): config = asset["config"] diff --git a/tests/test_benchmark_assets.py b/tests/test_benchmark_assets.py index da71ab7d..e13c63d0 100644 --- a/tests/test_benchmark_assets.py +++ b/tests/test_benchmark_assets.py @@ -1,18 +1,13 @@ import types import unittest -from unittest.mock import patch from llmebench import Benchmark class TestBenchmarkAssets(unittest.TestCase): @classmethod - @patch("os.environ") - def setUpClass(cls, os_env_mock): - # Handle environment variables required at runtime - os_env_mock.__getitem__.side_effect = lambda x: "test_str" - + def setUpClass(cls): benchmark = Benchmark(benchmark_dir="assets") cls.assets = benchmark.find_assets()