flairNLP / fabricator

[EMNLP 2023 Demo] fabricator - annotating and generating datasets with large language models.
Apache License 2.0
98 stars 12 forks source link

Adding dummy_response option, allows for dry running #57

Closed HallerPatrick closed 11 months ago

HallerPatrick commented 11 months ago

PR introduces a dummy_response option. Can be used instead of actual response of prompt node. Good for testing as user and developer.

I chose a more flexibel approach, such that the user can decide what value is returned. Can be a callable lambda prompt: "Dummy movie response" or a string value. Open for alternatives.

Also adjusted the tests for DatasetGenerator in test_dataset_generator.py to not use a actual HF model. Can also be applied in other tests.

HallerPatrick commented 11 months ago

Helps with the haystack[inference] problem #56