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

Update the registry to load registered core values upon use. #1017

Merged
merged 3 commits into from
Jan 9, 2025

Conversation

taenin
Copy link
Collaborator

@taenin taenin commented Jan 9, 2025

Description

Currently the registry is empty if it's the only module that's imported. Registering our default datasets, clouds, models, and judge configs requires importing the appropriate packages after importing the registry.

This change adds a decorator to initialize these values once upon using a method in the registry.

This also fixes breaking tests, such as https://github.com/oumi-ai/oumi/blame/main/tests/integration/cli/test_judge_e2e.py

Related issues

Towards OPE-836

Before submitting

  • This PR only changes documentation. (You can ignore the following checks in that case)
  • Did you read the contributor guideline Pull Request guidelines?
  • Did you link the issue(s) related to this PR in the section above?
  • Did you add / update tests where needed?

Reviewers

At least one review from a member of oumi-ai/oumi-staff is required.

@taenin taenin marked this pull request as ready for review January 9, 2025 17:05
@taenin taenin requested review from oelachqar, wizeng23 and nikg4 January 9, 2025 17:07
@@ -5,7 +5,6 @@
import datasets
from trl.trainer import ConstantLengthDataset

import oumi.datasets # should always be imported here to register datasets
Copy link
Collaborator

Choose a reason for hiding this comment

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

this may also help with https://linear.app/oumi/issue/OPE-836 (!)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It should!

Copy link

linear bot commented Jan 9, 2025

OPE-836

@taenin taenin merged commit 3ae9af2 into main Jan 9, 2025
1 check passed
@taenin taenin deleted the taenin/registry_init branch January 9, 2025 18:03
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