-
Notifications
You must be signed in to change notification settings - Fork 197
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
[DRAFT] trulens-legacy and trulens-api #1307
Draft
sfc-gh-pmardziel
wants to merge
219
commits into
main
Choose a base branch
from
piotrm/legacy_namespace
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dosubot
bot
added
size:XXL
This PR changes 1000+ lines, ignoring generated files.
and removed
size:XL
This PR changes 500-999 lines, ignoring generated files.
labels
Aug 9, 2024
@sfc-gh-pmardziel can you please remove all the format changes in this PR and just include backwards compat. Also change the title of the PR? |
dosubot
bot
added
size:XL
This PR changes 500-999 lines, ignoring generated files.
and removed
size:XXL
This PR changes 1000+ lines, ignoring generated files.
labels
Aug 14, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't check:
- The
poetry.lock
files as these are auto-generated. - Can you spin the
trulens.api
stuff into a separate PR that's not as urgent. - In the future when you do a mass renaming can you put it in its own PR. That way the reviewers don't have to look at it as it's just a simple find and replace.
sfc-gh-pmardziel
changed the title
trulens-legacy and trulens-api
[DRAFT] trulens-legacy and trulens-api
Aug 19, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
dependencies
Pull requests that update a dependency file
documentation
Improvements or additions to documentation
size:XL
This PR changes 500-999 lines, ignoring generated files.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR is being split into multiple ones. Keep this open until the splits are merged:
Description
Creates
trulens-legacy
package:trulens_eval.*
names defined in__init__.py
files for backwards compatibility to be deprecated later. Until then, a warning is issued of an old module is imported or a class or function imported via the old name is invoked. This is tested by new "static" tests intest_deprecation.py
.Example warning when importing from
trulens_eval
Example warning when using something imported from
trulens_eval
:Tru(...)
Brought back some utilities for optional imports which will not be needed after the package is removed in the future. Optional imports are used to preserve how
trulens_eval
behaved with respect to optional imports in the past. However, in many cases, the packages that need to be installed have been changed to the optionaltrulens-*
packages instead of what was is now these packages' dependencies.Added versioning and deprecation policies doc
POLICIES.md
and included it in the contributing nav item group.(TODO, waiting for another PR for testing this). Preserve other
trulens_eval
names that are public enough that they need to have aliases for some time before removal.Created
trulens-api
package containing the Interactive API. This provides thetrulens.api
module and submodules for a public, package-independent, access to trulens components likeTru
:Some lookups are dynamic into the various
trulens-*
packages and either install the packages automatically or give the user instructions on installing additional packages if appropriate. The installation is the default but can be disabled. For example:If
trulens-providers-cortex
is installed, the above will work. If it is not installed, an instruction is issued alongside the import error:The interactive API also gives better import errors if someone tries to import something that does not exist showing information of what is actually contained in the api modules and whether the optional packages that they need are installed:
Output:
Other details good to know for developers
Please include any other details of this change useful for TruLens developers.
Type of change
not work as expected)