Skip to content

Support for Custom Column Names in Harness for CSV #625

@Prikshit7766

Description

@Prikshit7766

Currently, the Harness class in the code only supports specific column names . However, users may have different column names in their CSV files, which limits the flexibility of the Harness class for text classification tasks.

Desired Solution

To enhance the Harness class , we propose introducing a more flexible approach that allows users to specify their own column names for the text and label columns in the CSV file.

Example Usage

For the text-classification task, we suggest extending the Harness class with the following usage pattern:

harness = Harness(
    task="text-classification",
    model="textcat_imdb",
    hub="spacy",
    data={
        "name": "<CSV_FILE_PATH>",
        "text_column": "<TEXT_COLUMN_NAME>",
        "label_column": "<LABEL_COLUMN_NAME>"
    }
)

Metadata

Metadata

Assignees

No one assigned

    Labels

    ⭐ FeatureIndicates new feature requests

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions