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

Features/registry #162

Merged
merged 19 commits into from
Apr 15, 2024
Merged

Features/registry #162

merged 19 commits into from
Apr 15, 2024

Conversation

steffencruz
Copy link
Collaborator

The goal of this PR is to introduce a registry data structure to manage both tasks and datasets.

  • Adds a task and dataset registry so that direct references to task and dataset classes are reduced. This will make the management of tasks and datasets, including exposing and disabling them, simpler. It will also streamline task development and review by reducing the number of changed files for Task PRs.
  • A further design improvement proposed in this PR enables a many-to-one mapping of datasets to tasks with a controllable way of selecting specific mappings.

@steffencruz steffencruz marked this pull request as draft March 17, 2024 22:27
@p-ferreira
Copy link
Contributor

The way I see it, a Task depends on a Dataset to be created and a Reward model to be evaluated. Imho a config file could be a better place to position those configurations than raw python code, where the validator loads the definition of the "task framework" into the generic code that knows how to handle it.

@bkb2135 bkb2135 changed the base branch from main to pre-staging April 8, 2024 14:37
@bkb2135 bkb2135 marked this pull request as ready for review April 8, 2024 16:20
prompting/__init__.py Show resolved Hide resolved
prompting/task_registry.py Outdated Show resolved Hide resolved
Copy link
Contributor

@p-ferreira p-ferreira left a comment

Choose a reason for hiding this comment

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

Besides minor logging and formatting changes, I believe this approach is less user friendly than relying in configs. This approach also don’t relate reward models to the task to be performed, which could be something to address in the future. In any case, it seems to be functional, if it’s currently working on prod and we have tests for it as it apparently is the case, we should be fine moving on with this approach.

prompting/__init__.py Show resolved Hide resolved
prompting/__init__.py Outdated Show resolved Hide resolved
prompting/tasks/mock.py Show resolved Hide resolved
prompting/tools/__init__.py Show resolved Hide resolved
tests/test_registry.py Outdated Show resolved Hide resolved
@bkb2135 bkb2135 merged commit be61a87 into pre-staging Apr 15, 2024
3 checks passed
@Hollyqui Hollyqui deleted the features/registry branch August 2, 2024 08:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants