target-benchmark / target

TARGET is a benchmark for evaluating Table Retrieval for Generative Tasks such as Fact Verification and Text-to-SQL
https://target-benchmark.github.io
Apache License 2.0
14 stars 6 forks source link

Manual Update Required for New Task Types in Query Type Field #34

Open jixy2012 opened 2 weeks ago

jixy2012 commented 2 weeks ago

Describe the problem Currently, adding new query or task types to the code requires manual updates in multiple places. For example, the following code snippet illustrates that the query_type field must be updated whenever a new type is introduced:

query_type: Optional[Literal["Fact Verification", "Text to SQL", "Table Question Answering", "Needle in Haystack", "Other"]] = Field(
    default=None, description="Type of query in this dataset."
)

Maintaining this approach can become cumbersome and error-prone, especially as more task types are added. It risks inconsistency and increases the chance of bugs due to missed updates.

Expected behavior The code should be structured in a way that allows for automatic updates or centralized management of query types, reducing the need for manual changes.

Proposed solutions

jixy2012 commented 2 weeks ago

additionally, more Literals are defined across files. for example for splits, and for output formats. all these literals might benefit from being centrally constructed.