From f4f4411eeca419cdb483ceb8bd711122a143cff6 Mon Sep 17 00:00:00 2001 From: Fahim Imaduddin Dalvi Date: Mon, 2 Oct 2023 10:58:44 +0300 Subject: [PATCH] Update asset with metadata and remove obsolete code --- .../sentiment/ArSAS_GPT4_ZeroShot.py | 33 ++++++++----------- 1 file changed, 13 insertions(+), 20 deletions(-) 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 d4086da8..5bd23f36 100644 --- a/assets/ar/sentiment_emotion_others/sentiment/ArSAS_GPT4_ZeroShot.py +++ b/assets/ar/sentiment_emotion_others/sentiment/ArSAS_GPT4_ZeroShot.py @@ -1,29 +1,22 @@ -import os - -from llmebench.datasets import ArSASSentimentDataset -from llmebench.models import GPTChatCompletionModel +from llmebench.datasets import ArSASDataset +from llmebench.models import OpenAIModel from llmebench.tasks import SentimentTask +def metadata(): + return { + "author": "Arabic Language Technologies, QCRI, HBKU", + "model": "gpt-4-32k (version 0314)", + "description": "GPT4 32k tokens model hosted on Azure, using the ChatCompletion API. API version '2023-03-15-preview'. Uses an prompt specified in Arabic.", + "scores": {"Macro-F1": "0.547"}, + } + + def config(): return { - "dataset": ArSASSentimentDataset, - "dataset_args": {}, + "dataset": ArSASDataset, "task": SentimentTask, - "task_args": {}, - "model": GPTChatCompletionModel, - "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": 30, - }, - "general_args": { - "data_path": "data/sentiment_emotion_others/sentiment/ArSAS-test.txt" - }, + "model": OpenAIModel, }