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

Add an env var for loading user registered values (dataset, models, clouds) when initializing the Oumi Registry #1077

Merged
merged 8 commits into from
Jan 13, 2025

Conversation

taenin
Copy link
Collaborator

@taenin taenin commented Jan 11, 2025

Description

This PR establishes a new Oumi environment variable, OUMI_EXTRA_DEPS_FILE.
OUMI_EXTRA_DEPS_FILE should be set to a path to a txt file that contains a file path on each line. These file paths should point to *.py files that should be imported before initializing the Oumi Registry.

If unset, only default classes will be loaded.

Example:

OUMI_EXTRA_DEPS_FILE=/oumi/requirements.txt

/oumi/requirements.txt

/path/file1.py
/path2/file2.py
...

/path/file1.py

from oumi.core.registry import register, RegistryType

@register('file_1', RegistryType.CLOUD)
class FileOne:
    pass

/path2/file2.py

from oumi.core.registry import register, RegistryType

@register('file_2', RegistryType.CLOUD)
class FileTwo:
    pass

Related issues

Fixes OPE-745

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.

Copy link

linear bot commented Jan 11, 2025

OPE-745

@taenin taenin changed the title Add an env var for loading user registered values (dataset, models, clouds) via the CLI. Add an env var for loading user registered values (dataset, models, clouds) when initializing the Oumi Registry Jan 11, 2025
@taenin taenin marked this pull request as ready for review January 11, 2025 23:41
@nikg4
Copy link
Collaborator

nikg4 commented Jan 13, 2025

The name OUMI_REGISTRY_REQUIREMENTS is non-intuitive to me.

How about something like OUMI_EXTRA_DEPS, OUMI_CUSTOM_DEPS ?

or with _FILE suffix: OUMI_EXTRA_DEPS_FILE, OUMI_CUSTOM_DEPS_FILE ?

@taenin
Copy link
Collaborator Author

taenin commented Jan 13, 2025

The name OUMI_REGISTRY_REQUIREMENTS is non-intuitive to me.

How about something like OUMI_EXTRA_DEPS, OUMI_CUSTOM_DEPS ?

or with _FILE suffix: OUMI_EXTRA_DEPS_FILE, OUMI_CUSTOM_DEPS_FILE ?

SG, I've switched to using OUMI_EXTRA_DEPS_FILE

@taenin taenin merged commit baad25b into main Jan 13, 2025
2 checks passed
@taenin taenin deleted the taenin/persistent_registry_cli branch January 13, 2025 18:51
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