truera/trulens

Amazon Bedrock provider: boto3,botocore packages ModuleNotFoundError

Closed this issue · 2 comments

I tried to initialize Bedrock as the feedback provider, but encountered ModuleNotFoundError. Even though my boto3 and botocore are installed and satisfy required versions (logs showing Requirement already satisfied; checked through boto3.version and botocore.version).

Error logs:

ModuleNotFoundError: 
boto3,botocore packages are required for using Bedrock models.
You should be able to install them with pip:

    pip install "boto3>=1.33.6" "botocore>=1.33.6"

Implementation:

from trulens_eval.feedback.provider.bedrock import Bedrock as fBedrock
import boto3

client = boto3.client("bedrock", region_name="us-east-1")
provider = fBedrock(model_id = "anthropic.claude-v2", client=bedrock_client)

Any help is appreciated!

This is causing issues for me as well. If I initiate boto3 client for Bedrock without trulens_eval installed, it works fine. Once I install trulens_eval, it messes up and can't repair it somehow.

Hey @SanjuMLGeek @mabelli96 - this should be fixed now in 0.22.2. Please upgrade your trulens version and let us know if this issue persists.

https://github.com/truera/trulens/releases/tag/trulens-eval-0.22.2