Skip to content

Commit

Permalink
Update asset configs to remove empty optional arguments (#235)
Browse files Browse the repository at this point in the history
`dataset_args`, `model_args` and `task_args` are now optional in asset configs. This PR removes all empty arguments in existing assets and updates the tests+documentation to reflect this change.

* Make dataset_args/task_args optional in tests

* Remove empty args from asset configs

* Add documentation for config format in tutorial
  • Loading branch information
fdalvi authored Sep 18, 2023
1 parent f14121f commit e7d52db
Show file tree
Hide file tree
Showing 286 changed files with 23 additions and 539 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ def config():
"tgt_lang": "en",
},
"task": MachineTranslationTask,
"task_args": {},
"model": HuggingFaceInferenceAPIModel,
"model_args": {
"task_type": HuggingFaceTaskTypes.Translation,
Expand Down
1 change: 0 additions & 1 deletion assets/ar/MT/AraBench_ar2en_BLOOMZ_ZeroShot.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ def config():
"tgt_lang": "en",
},
"task": MachineTranslationTask,
"task_args": {},
"model": PetalsModel,
"model_args": {
"max_tries": 3,
Expand Down
1 change: 0 additions & 1 deletion assets/ar/MT/AraBench_ar2en_GPT35_ZeroShot.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ def config():
"tgt_lang": "en",
},
"task": MachineTranslationTask,
"task_args": {},
"model": LegacyOpenAIModel,
"model_args": {
"max_tries": 5,
Expand Down
1 change: 0 additions & 1 deletion assets/ar/MT/AraBench_ar2en_GPT4_ZeroShot.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ def config():
"tgt_lang": "en",
},
"task": MachineTranslationTask,
"task_args": {},
"model": OpenAIModel,
"model_args": {
"max_tries": 5,
Expand Down
2 changes: 0 additions & 2 deletions assets/ar/QA/ARCD_BLOOMZ_ZeroShot.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@ def metadata():
def config():
return {
"dataset": ARCDDataset,
"dataset_args": {},
"task": QATask,
"task_args": {},
"model": PetalsModel,
"model_args": {
"max_tries": 5,
Expand Down
2 changes: 0 additions & 2 deletions assets/ar/QA/ARCD_GPT35_ZeroShot.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@ def metadata():
def config():
return {
"dataset": ARCDDataset,
"dataset_args": {},
"task": QATask,
"task_args": {},
"model": LegacyOpenAIModel,
"model_args": {
"max_tries": 3,
Expand Down
2 changes: 0 additions & 2 deletions assets/ar/QA/ARCD_GPT4_FewShot.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,7 @@ def metadata():
def config():
return {
"dataset": ARCDDataset,
"dataset_args": {},
"task": QATask,
"task_args": {},
"model": OpenAIModel,
"model_args": {
"max_tries": 30,
Expand Down
2 changes: 0 additions & 2 deletions assets/ar/QA/ARCD_GPT4_ZeroShot.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@ def metadata():
def config():
return {
"dataset": ARCDDataset,
"dataset_args": {},
"task": QATask,
"task_args": {},
"model": OpenAIModel,
"model_args": {
"max_tries": 50,
Expand Down
2 changes: 0 additions & 2 deletions assets/ar/QA/ARCD_Random.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@ def metadata():
def config():
return {
"dataset": ARCDDataset,
"dataset_args": {},
"task": QATask,
"task_args": {},
"model": RandomModel,
"model_args": {"task_type": TaskType.QuestionAnswering},
"general_args": {},
Expand Down
2 changes: 0 additions & 2 deletions assets/ar/QA/MLQA_BLOOMZ_ZeroShot.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@ def metadata():
def config():
return {
"dataset": MLQADataset,
"dataset_args": {},
"task": QATask,
"task_args": {},
"model": PetalsModel,
"model_args": {
"max_tries": 5,
Expand Down
2 changes: 0 additions & 2 deletions assets/ar/QA/MLQA_GPT35_ZeroShot.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@ def metadata():
def config():
return {
"dataset": MLQADataset,
"dataset_args": {},
"task": QATask,
"task_args": {},
"model": LegacyOpenAIModel,
"model_args": {
"max_tries": 3,
Expand Down
2 changes: 0 additions & 2 deletions assets/ar/QA/MLQA_GPT4_FewShot.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,7 @@ def metadata():
def config():
return {
"dataset": MLQADataset,
"dataset_args": {},
"task": QATask,
"task_args": {},
"model": OpenAIModel,
"model_args": {
"max_tries": 30,
Expand Down
2 changes: 0 additions & 2 deletions assets/ar/QA/MLQA_GPT4_ZeroShot.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@ def metadata():
def config():
return {
"dataset": MLQADataset,
"dataset_args": {},
"task": QATask,
"task_args": {},
"model": OpenAIModel,
"model_args": {
"max_tries": 50,
Expand Down
2 changes: 0 additions & 2 deletions assets/ar/QA/MLQA_Random.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@ def metadata():
def config():
return {
"dataset": MLQADataset,
"dataset_args": {},
"task": QATask,
"task_args": {},
"model": RandomModel,
"model_args": {"task_type": TaskType.QuestionAnswering},
"general_args": {},
Expand Down
2 changes: 0 additions & 2 deletions assets/ar/QA/MLQA_mdeberta_v3_base_squad2_ZeroShot.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@ def metadata():
def config():
return {
"dataset": MLQADataset,
"dataset_args": {},
"task": QATask,
"task_args": {},
"model": HuggingFaceInferenceAPIModel,
"model_args": {
"task_type": HuggingFaceTaskTypes.Question_Answering,
Expand Down
2 changes: 0 additions & 2 deletions assets/ar/QA/TyDiQA_BLOOMZ_ZeroShot.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@ def metadata():
def config():
return {
"dataset": TyDiQADataset,
"dataset_args": {},
"task": QATask,
"task_args": {},
"model": PetalsModel,
"model_args": {
"max_tries": 5,
Expand Down
2 changes: 0 additions & 2 deletions assets/ar/QA/TyDiQA_GPT35_ZeroShot.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@ def metadata():
def config():
return {
"dataset": TyDiQADataset,
"dataset_args": {},
"task": QATask,
"task_args": {},
"model": LegacyOpenAIModel,
"model_args": {
"max_tries": 3,
Expand Down
2 changes: 0 additions & 2 deletions assets/ar/QA/TyDiQA_GPT4_FewShot.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,7 @@ def metadata():
def config():
return {
"dataset": TyDiQADataset,
"dataset_args": {},
"task": QATask,
"task_args": {},
"model": OpenAIModel,
"model_args": {
"max_tries": 30,
Expand Down
2 changes: 0 additions & 2 deletions assets/ar/QA/TyDiQA_GPT4_ZeroShot.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@ def metadata():
def config():
return {
"dataset": TyDiQADataset,
"dataset_args": {},
"task": QATask,
"task_args": {},
"model": OpenAIModel,
"model_args": {
"max_tries": 50,
Expand Down
2 changes: 0 additions & 2 deletions assets/ar/QA/TyDiQA_Random.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@ def metadata():
def config():
return {
"dataset": TyDiQADataset,
"dataset_args": {},
"task": QATask,
"task_args": {},
"model": RandomModel,
"model_args": {"task_type": TaskType.QuestionAnswering},
"general_args": {"test_split": "dev"},
Expand Down
2 changes: 0 additions & 2 deletions assets/ar/QA/XQuAD_BLOOMZ_ZeroShot.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@ def metadata():
def config():
return {
"dataset": XQuADDataset,
"dataset_args": {},
"task": QATask,
"task_args": {},
"model": PetalsModel,
"model_args": {
"max_tries": 5,
Expand Down
2 changes: 0 additions & 2 deletions assets/ar/QA/XQuAD_GPT35_ZeroShot.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@ def metadata():
def config():
return {
"dataset": XQuADDataset,
"dataset_args": {},
"task": QATask,
"task_args": {},
"model": LegacyOpenAIModel,
"model_args": {
"max_tries": 3,
Expand Down
2 changes: 0 additions & 2 deletions assets/ar/QA/XQuAD_GPT4_FewShot.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,7 @@ def metadata():
def config():
return {
"dataset": XQuADDataset,
"dataset_args": {},
"task": QATask,
"task_args": {},
"model": OpenAIModel,
"model_args": {
"max_tries": 30,
Expand Down
2 changes: 0 additions & 2 deletions assets/ar/QA/XQuAD_GPT4_ZeroShot.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@ def metadata():
def config():
return {
"dataset": XQuADDataset,
"dataset_args": {},
"task": QATask,
"task_args": {},
"model": OpenAIModel,
"model_args": {
"max_tries": 50,
Expand Down
2 changes: 0 additions & 2 deletions assets/ar/QA/XQuAD_Random.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@ def metadata():
def config():
return {
"dataset": XQuADDataset,
"dataset_args": {},
"task": QATask,
"task_args": {},
"model": RandomModel,
"model_args": {"task_type": TaskType.QuestionAnswering},
"general_args": {},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@ def metadata():
def config():
return {
"dataset": ArabGendDataset,
"dataset_args": {},
"task": DemographyGenderTask,
"task_args": {},
"model": PetalsModel,
"model_args": {
"class_labels": ["m", "f"],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@ def metadata():
def config():
return {
"dataset": ArabGendDataset,
"dataset_args": {},
"task": DemographyGenderTask,
"task_args": {},
"model": LegacyOpenAIModel,
"model_args": {
"class_labels": ["m", "f"],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@ def metadata():
def config():
return {
"dataset": ArabGendDataset,
"dataset_args": {},
"task": DemographyGenderTask,
"task_args": {},
"model": OpenAIModel,
"model_args": {
"class_labels": ["m", "f"],
Expand Down
2 changes: 0 additions & 2 deletions assets/ar/demographic_attributes/gender/ArabGend_Random.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@ def metadata():
def config():
return {
"dataset": ArabGendDataset,
"dataset_args": {},
"task": DemographyGenderTask,
"task_args": {},
"model": RandomModel,
"model_args": {
"task_type": TaskType.Classification,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@ def metadata():
def config():
return {
"dataset": ArapTweetDataset,
"dataset_args": {},
"task": DemographyGenderTask,
"task_args": {},
"model": PetalsModel,
"model_args": {
"class_labels": ["Female", "Male"],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@ def metadata():
def config():
return {
"dataset": ArapTweetDataset,
"dataset_args": {},
"task": DemographyGenderTask,
"task_args": {},
"model": LegacyOpenAIModel,
"model_args": {
"class_labels": ["Female", "Male"],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@ def metadata():
def config():
return {
"dataset": ArapTweetDataset,
"dataset_args": {},
"task": DemographyGenderTask,
"task_args": {},
"model": OpenAIModel,
"model_args": {
"class_labels": ["Female", "Male"],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@ def metadata():
def config():
return {
"dataset": ArapTweetDataset,
"dataset_args": {},
"task": DemographyGenderTask,
"task_args": {},
"model": OpenAIModel,
"model_args": {
"class_labels": ["Female", "Male"],
Expand Down
2 changes: 0 additions & 2 deletions assets/ar/demographic_attributes/gender/ArapTweet_Random.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@ def metadata():
def config():
return {
"dataset": ArapTweetDataset,
"dataset_args": {},
"task": DemographyGenderTask,
"task_args": {},
"model": RandomModel,
"model_args": {
"task_type": TaskType.Classification,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@ def metadata():
def config():
return {
"dataset": LocationDataset,
"dataset_args": {},
"task": DemographyLocationTask,
"task_args": {},
"model": PetalsModel,
"model_args": {
"class_labels": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@ def metadata():
def config():
return {
"dataset": LocationDataset,
"dataset_args": {},
"task": DemographyLocationTask,
"task_args": {},
"model": LegacyOpenAIModel,
"model_args": {
"class_labels": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@ def metadata():
def config():
return {
"dataset": LocationDataset,
"dataset_args": {},
"task": DemographyLocationTask,
"task_args": {},
"model": OpenAIModel,
"model_args": {
"class_labels": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@ def metadata():
def config():
return {
"dataset": LocationDataset,
"dataset_args": {},
"task": DemographyLocationTask,
"task_args": {},
"model": OpenAIModel,
"model_args": {
"class_labels": [
Expand Down
2 changes: 0 additions & 2 deletions assets/ar/demographic_attributes/location/Location_Random.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@ def metadata():
def config():
return {
"dataset": LocationDataset,
"dataset_args": {},
"task": DemographyLocationTask,
"task_args": {},
"model": RandomModel,
"model_args": {
"task_type": TaskType.Classification,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@ def metadata():
def config():
return {
"dataset": NameInfoDataset,
"dataset_args": {},
"task": DemographyNameInfoTask,
"task_args": {},
"model": PetalsModel,
"model_args": {
"class_labels": [
Expand Down
Loading

0 comments on commit e7d52db

Please sign in to comment.