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

Do not run env check on lore import - only on cli invocation #173

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

levkk
Copy link
Contributor

@levkk levkk commented Jan 5, 2021

What

import lore triggers environment setup which prevents modular use of Lore. Run the env check explicitly instead when lore entrypoint is called.

Why

This allows Lore to be used as a module for its internal functions without the environment setup which can be done by other means, e.g. Docker.

Copy link
Contributor

@montanalow montanalow left a comment

Choose a reason for hiding this comment

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

One of the key value props is that lore guarantees the dependencies are correct across all the environments MLEs work in, from jupyter notebook investigations to training locally, at scale and during inference.

To use lore without that feature, you can:

import sys
sys.lore_no_env = True
import lore

It's not recommended, since it results in frequent production incidents as training/inference environments drift. Other dynamic languages like Ruby solve this problem with tools like Bundler. Since lore was created, PyPa has adopted Pipfile, but it has not become the standard complete replacement for pip, nor does it have the full functionality of Bundler. https://github.com/pypa/pipfile

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants