Skip to content

Commit

Permalink
Update asset with metadata and remove obsolete code
Browse files Browse the repository at this point in the history
  • Loading branch information
fdalvi committed Oct 2, 2023
1 parent 721d19f commit f4f4411
Showing 1 changed file with 13 additions and 20 deletions.
33 changes: 13 additions & 20 deletions assets/ar/sentiment_emotion_others/sentiment/ArSAS_GPT4_ZeroShot.py
Original file line number Diff line number Diff line change
@@ -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,
}


Expand Down

0 comments on commit f4f4411

Please sign in to comment.