Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add EvolComplexity and EvolQuality #299

Conversation

davidberenstein1957
Copy link
Member

@davidberenstein1957 davidberenstein1957 commented Jan 24, 2024

Added EvolComplexityTask and EvolQualityTask.

  • EvolComplexityTask is focused on improving the complexity of instructions and is a special implementation of EvolInstruct where we don't allow for the breadth evolution method.
  • EvolQualityTask is focused on improving the complexity of generation/responses and is a more altered implementation of EvolInstruct with evolution methods for ["helpfulness", "relevance", "depth", "creativity", "details"].

Closes #296
Closes #299

@davidberenstein1957
Copy link
Member Author

docs are still WIP @plaguss

Copy link
Contributor

@plaguss plaguss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Just a reminder in the docstrings for one of the references. The only thing I'm not sure is if it makes sense to keep both EvolInstruct and EvolComplexity, to avoid complexity for the users.

Copy link
Member

@gabrielmbmb gabrielmbmb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi! Looks good to me, I left some comments before merging

src/distilabel/tasks/text_generation/evol_complexity.py Outdated Show resolved Hide resolved
src/distilabel/tasks/text_generation/evol_quality.py Outdated Show resolved Hide resolved
src/distilabel/tasks/text_generation/evol_quality.py Outdated Show resolved Hide resolved
src/distilabel/tasks/text_generation/evol_quality.py Outdated Show resolved Hide resolved
src/distilabel/tasks/text_generation/evol_complexity.py Outdated Show resolved Hide resolved
src/distilabel/tasks/text_generation/evol_quality.py Outdated Show resolved Hide resolved
@gabrielmbmb
Copy link
Member

Also, could we add a unit test covering the Evol Quality Task use of the method _elimination_evolving with response_words?

@plaguss plaguss added this to the 0.5.0 milestone Jan 31, 2024
chore: re-use strings in tests
chore: outlined initial tests
chore: rename Evol*GeneratorTask to Evol*Task
@@ -120,6 +116,16 @@ def test_evol_task(evolution_method: str, expected: str, instruct_type: object):
assert isinstance(task, instruct_type)
assert task.system_prompt == ""
if isinstance(expected, str):
print("---COSA")
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is happening here?

Copy link
Contributor

@plaguss plaguss Jan 31, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ups, forgot to remove those, it's hard to find the differences from the prompts directly from pytest

@plaguss
Copy link
Contributor

plaguss commented Jan 31, 2024

Also, could we add a unit test covering the Evol Quality Task use of the method _elimination_evolving with response_words?

Here it is: 7c309aa. If the tests pass, and the docs are correct, I'll merge it

@plaguss plaguss merged commit 7d33f9d into main Jan 31, 2024
4 checks passed
@plaguss plaguss deleted the feat/295-feature-add-evolcomplexity-and-evolquality-tasks-from-deita branch January 31, 2024 10:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants