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 pattern for migrating to TruLens 1.0 #237

Merged
merged 3 commits into from
Aug 30, 2024
Merged

Conversation

sfc-gh-jreini
Copy link
Contributor

No description provided.

Copy link
Contributor

@morgante morgante left a comment

Choose a reason for hiding this comment

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

Thanks for contributing! Hard-coding these specific imports is ok, but very brittle to the specific import formulation (ex. from trulens_eval import TruRails, OpenAI wouldn't get caught.

I would suggest instead using the py_find_replace_import pattern like here.

@sfc-gh-jreini
Copy link
Contributor Author

Thanks for the great tool @morgante !

I updated to additionally use py_find_replace_import. Let me know if you'd like any other changes, thanks!

@morgante
Copy link
Contributor

I updated to additionally use py_find_replace_import. Let me know if you'd like any other changes, thanks!

You should be able to replace all the cases like this with find_replace_import instead of keeping both.

@sfc-gh-jreini
Copy link
Contributor Author

Hey @morgante - this should be good. Let me know if you see any other issues. Thanks!

Copy link
Contributor

@morgante morgante left a comment

Choose a reason for hiding this comment

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

Thanks, looks good to me!

@morgante morgante merged commit 90f73e0 into getgrit:main Aug 30, 2024
4 checks passed
@morgante
Copy link
Contributor

Your migration is now live here: https://docs.grit.io/patterns/library/trulens_eval_migration

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.

2 participants