Skip to content

Reduce the redudancy of software_config key_name and prompt config name #164

@pfliu-nlp

Description

@pfliu-nlp

For each software, its software_config is a dict, whose keys are usually the same as the name of its value, which sometimes will result in naming inconsistent issues. It would be nice if we could have good design to avoid this.

    def _software_configs(self):
        return {
            "sentiment_classification": PromptConfig(
                name="natural_language_inference",
                description="This promptware is used to identify the semantic"
                " relationship between"
                " two sentences",
                instruction="Give two sentences, predict which of the following"
                " categories their"
                " relationship falls into: entailment, contradiction, neutral",
                demonstration=[
                    "A person on a horse jumps over a broken down airplane.\t"
                    "A person is training his horse for a competition.\nneutral",
                    "A person on a horse jumps over a broken down airplane.\t"
                    "A person is outdoors, on a horse.\nentailment",
                    "Children smiling and waving at camera\tThe kids are"
                    " frowning.\ncontradiction",
                ],
                prompt_template=lambda input: f"{input['text1']}\t{input['text2']}",
                task=TaskType.text_pair_classification,
            )
        }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions