Repository: truera/trulens
Issue: Facing issues when importing feedback : KeyError: 'trulens_eval.utils.pyschema.Obj:94043974846304'
Root cause: External Dependency Breakage

Hello Team 
In our project we were attempting to use trulens with lang chain. While following your steps  quickstart tutorial for langchain , we are running into multiple issues with the environment. Even after matching all the versions that truelens expects facing the following error when we try to import feedback : 

environment details:

InstructorEmbedding==1.0.1
langchain==0.1.4
langchain-community==0.0.16
langchain-core==0.1.16
langchainhub==0.1.14
llama-index==0.9.39
pydantic==2.4.0
pydantic_core==2.10.0
trulens-eval==0.21.0


from trulens_eval import  Feedback

KeyError: 'trulens_eval.utils.pyschema.Obj:94043974846304'
Full error trace : 
---------------------------------------------------------------------------
KeyError                                  Traceback (most recent call last)
Cell In[4], line 2
      1 # from trulens_eval import TruChain, Feedback, Huggingface, Tru
----> 2 from trulens_eval import  Feedback

File /opt/conda/lib/python3.10/site-packages/trulens_eval/__init__.py:83
      1 """
      2 # Trulens-eval LLM Evaluation Library
      3 
   (...)
     78 
     79 """
     81 __version__ = "0.21.0"
---> 83 from trulens_eval.feedback import Feedback
     84 from trulens_eval.feedback import Huggingface
     85 from trulens_eval.feedback import Langchain

File /opt/conda/lib/python3.10/site-packages/trulens_eval/feedback/__init__.py:21
     19 from trulens_eval.feedback.embeddings import Embeddings
     20 # Main class holding and running feedback functions:
---> 21 from trulens_eval.feedback.feedback import Feedback
     22 from trulens_eval.feedback.groundedness import Groundedness
     23 from trulens_eval.feedback.groundtruth import GroundTruthAgreement

File /opt/conda/lib/python3.10/site-packages/trulens_eval/feedback/feedback.py:45
     38 pp = pprint.PrettyPrinter()
     41 # TODO Rename:
     42 # Option:
     43 #  Feedback -> FeedbackRunner
     44 #  FeedbackDefinition -> FeedbackRunnerDefinition
---> 45 class Feedback(FeedbackDefinition):
     46     """
     47     Feedback function container. Typical usage is to specify a feedback
     48     implementation function from a `Provider` and the mapping of selectors
   (...)
     83               to selectors.
     84     """
     86     # Implementation, not serializable, note that FeedbackDefinition contains
     87     # `implementation` meant to serialize the below.

File /opt/conda/lib/python3.10/site-packages/pydantic/_internal/_model_construction.py:184, in ModelMetaclass.__new__(mcs, cls_name, bases, namespace, __pydantic_generic_metadata__, __pydantic_reset_parent_namespace__, **kwargs)
    182 types_namespace = get_cls_types_namespace(cls, parent_namespace)
    183 set_model_fields(cls, bases, config_wrapper, types_namespace)
--> 184 complete_model_class(
    185     cls,
    186     cls_name,
    187     config_wrapper,
    188     raise_errors=False,
    189     types_namespace=types_namespace,
    190 )
    191 # using super(cls, cls) on the next line ensures we only call the parent class's __pydantic_init_subclass__
    192 # I believe the `type: ignore` is only necessary because mypy doesn't realize that this code branch is
    193 # only hit for _proper_ subclasses of BaseModel
    194 super(cls, cls).__pydantic_init_subclass__(**kwargs)  # type: ignore[misc]

File /opt/conda/lib/python3.10/site-packages/pydantic/_internal/_model_construction.py:495, in complete_model_class(cls, cls_name, config_wrapper, raise_errors, types_namespace)
    492     set_model_mocks(cls, cls_name)
    493     return False
--> 495 schema = apply_discriminators(simplify_schema_references(schema))
    497 # debug(schema)
    498 cls.__pydantic_core_schema__ = schema = validate_core_schema(schema)

File /opt/conda/lib/python3.10/site-packages/pydantic/_internal/_core_utils.py:519, in simplify_schema_references(schema)
    516     state['current_recursion_ref_count'][ref] -= 1
    517     return s
--> 519 schema = walk_core_schema(schema, count_refs)
    521 assert all(c == 0 for c in state['current_recursion_ref_count'].values()), 'this is a bug! please report it'
    523 definitions_cache = _DefinitionsState(
    524     definitions=state['definitions'],
    525     ref_counts=dict(state['ref_counts']),
    526     involved_in_recursion=state['involved_in_recursion'],
    527     current_recursion_ref_count=dict(state['current_recursion_ref_count']),
    528 )

File /opt/conda/lib/python3.10/site-packages/pydantic/_internal/_core_utils.py:439, in walk_core_schema(schema, f)
    425 def walk_core_schema(schema: core_schema.CoreSchema, f: Walk) -> core_schema.CoreSchema:
    426     """Recursively traverse a CoreSchema.
    427 
    428     Args:
   (...)
    437         core_schema.CoreSchema: A processed CoreSchema.
    438     """
--> 439     return f(schema, _dispatch)

File /opt/conda/lib/python3.10/site-packages/pydantic/_internal/_core_utils.py:515, in simplify_schema_references.<locals>.count_refs(s, recurse)
    512     return s
    514 state['current_recursion_ref_count'][ref] += 1
--> 515 recurse(state['definitions'][ref], count_refs)
    516 state['current_recursion_ref_count'][ref] -= 1
    517 return s

File /opt/conda/lib/python3.10/site-packages/pydantic/_internal/_core_utils.py:215, in _WalkCoreSchema.walk(self, schema, f)
    214 def walk(self, schema: core_schema.CoreSchema, f: Walk) -> core_schema.CoreSchema:
--> 215     return f(schema, self._walk)

File /opt/conda/lib/python3.10/site-packages/pydantic/_internal/_core_utils.py:503, in simplify_schema_references.<locals>.count_refs(s, recurse)
    500         return s
    502 if s['type'] != 'definition-ref':
--> 503     return recurse(s, count_refs)
    504 ref = s['schema_ref']
    505 state['ref_counts'][ref] += 1

File /opt/conda/lib/python3.10/site-packages/pydantic/_internal/_core_utils.py:218, in _WalkCoreSchema._walk(self, schema, f)
    217 def _walk(self, schema: core_schema.CoreSchema, f: Walk) -> core_schema.CoreSchema:
--> 218     schema = self._schema_type_to_method[schema['type']](schema, f)
    219     ser_schema: core_schema.SerSchema | None = schema.get('serialization')  # type: ignore
    220     if ser_schema:

File /opt/conda/lib/python3.10/site-packages/pydantic/_internal/_core_utils.py:227, in _WalkCoreSchema._handle_other_schemas(self, schema, f)
    225 sub_schema = schema.get('schema', None)
    226 if sub_schema is not None:
--> 227     schema['schema'] = self.walk(sub_schema, f)  # type: ignore
    228 return schema

File /opt/conda/lib/python3.10/site-packages/pydantic/_internal/_core_utils.py:215, in _WalkCoreSchema.walk(self, schema, f)
    214 def walk(self, schema: core_schema.CoreSchema, f: Walk) -> core_schema.CoreSchema:
--> 215     return f(schema, self._walk)

File /opt/conda/lib/python3.10/site-packages/pydantic/_internal/_core_utils.py:503, in simplify_schema_references.<locals>.count_refs(s, recurse)
    500         return s
    502 if s['type'] != 'definition-ref':
--> 503     return recurse(s, count_refs)
    504 ref = s['schema_ref']
    505 state['ref_counts'][ref] += 1

File /opt/conda/lib/python3.10/site-packages/pydantic/_internal/_core_utils.py:218, in _WalkCoreSchema._walk(self, schema, f)
    217 def _walk(self, schema: core_schema.CoreSchema, f: Walk) -> core_schema.CoreSchema:
--> 218     schema = self._schema_type_to_method[schema['type']](schema, f)
    219     ser_schema: core_schema.SerSchema | None = schema.get('serialization')  # type: ignore
    220     if ser_schema:

File /opt/conda/lib/python3.10/site-packages/pydantic/_internal/_core_utils.py:227, in _WalkCoreSchema._handle_other_schemas(self, schema, f)
    225 sub_schema = schema.get('schema', None)
    226 if sub_schema is not None:
--> 227     schema['schema'] = self.walk(sub_schema, f)  # type: ignore
    228 return schema

File /opt/conda/lib/python3.10/site-packages/pydantic/_internal/_core_utils.py:215, in _WalkCoreSchema.walk(self, schema, f)
    214 def walk(self, schema: core_schema.CoreSchema, f: Walk) -> core_schema.CoreSchema:
--> 215     return f(schema, self._walk)

File /opt/conda/lib/python3.10/site-packages/pydantic/_internal/_core_utils.py:503, in simplify_schema_references.<locals>.count_refs(s, recurse)
    500         return s
    502 if s['type'] != 'definition-ref':
--> 503     return recurse(s, count_refs)
    504 ref = s['schema_ref']
    505 state['ref_counts'][ref] += 1

File /opt/conda/lib/python3.10/site-packages/pydantic/_internal/_core_utils.py:218, in _WalkCoreSchema._walk(self, schema, f)
    217 def _walk(self, schema: core_schema.CoreSchema, f: Walk) -> core_schema.CoreSchema:
--> 218     schema = self._schema_type_to_method[schema['type']](schema, f)
    219     ser_schema: core_schema.SerSchema | None = schema.get('serialization')  # type: ignore
    220     if ser_schema:

File /opt/conda/lib/python3.10/site-packages/pydantic/_internal/_core_utils.py:362, in _WalkCoreSchema.handle_model_fields_schema(self, schema, f)
    360 for k, v in schema['fields'].items():
    361     replaced_field = v.copy()
--> 362     replaced_field['schema'] = self.walk(v['schema'], f)
    363     replaced_fields[k] = replaced_field
    364 schema['fields'] = replaced_fields

File /opt/conda/lib/python3.10/site-packages/pydantic/_internal/_core_utils.py:215, in _WalkCoreSchema.walk(self, schema, f)
    214 def walk(self, schema: core_schema.CoreSchema, f: Walk) -> core_schema.CoreSchema:
--> 215     return f(schema, self._walk)

File /opt/conda/lib/python3.10/site-packages/pydantic/_internal/_core_utils.py:503, in simplify_schema_references.<locals>.count_refs(s, recurse)
    500         return s
    502 if s['type'] != 'definition-ref':
--> 503     return recurse(s, count_refs)
    504 ref = s['schema_ref']
    505 state['ref_counts'][ref] += 1

File /opt/conda/lib/python3.10/site-packages/pydantic/_internal/_core_utils.py:218, in _WalkCoreSchema._walk(self, schema, f)
    217 def _walk(self, schema: core_schema.CoreSchema, f: Walk) -> core_schema.CoreSchema:
--> 218     schema = self._schema_type_to_method[schema['type']](schema, f)
    219     ser_schema: core_schema.SerSchema | None = schema.get('serialization')  # type: ignore
    220     if ser_schema:

File /opt/conda/lib/python3.10/site-packages/pydantic/_internal/_core_utils.py:227, in _WalkCoreSchema._handle_other_schemas(self, schema, f)
    225 sub_schema = schema.get('schema', None)
    226 if sub_schema is not None:
--> 227     schema['schema'] = self.walk(sub_schema, f)  # type: ignore
    228 return schema

File /opt/conda/lib/python3.10/site-packages/pydantic/_internal/_core_utils.py:215, in _WalkCoreSchema.walk(self, schema, f)
    214 def walk(self, schema: core_schema.CoreSchema, f: Walk) -> core_schema.CoreSchema:
--> 215     return f(schema, self._walk)

File /opt/conda/lib/python3.10/site-packages/pydantic/_internal/_core_utils.py:503, in simplify_schema_references.<locals>.count_refs(s, recurse)
    500         return s
    502 if s['type'] != 'definition-ref':
--> 503     return recurse(s, count_refs)
    504 ref = s['schema_ref']
    505 state['ref_counts'][ref] += 1

File /opt/conda/lib/python3.10/site-packages/pydantic/_internal/_core_utils.py:218, in _WalkCoreSchema._walk(self, schema, f)
    217 def _walk(self, schema: core_schema.CoreSchema, f: Walk) -> core_schema.CoreSchema:
--> 218     schema = self._schema_type_to_method[schema['type']](schema, f)
    219     ser_schema: core_schema.SerSchema | None = schema.get('serialization')  # type: ignore
    220     if ser_schema:

File /opt/conda/lib/python3.10/site-packages/pydantic/_internal/_core_utils.py:227, in _WalkCoreSchema._handle_other_schemas(self, schema, f)
    225 sub_schema = schema.get('schema', None)
    226 if sub_schema is not None:
--> 227     schema['schema'] = self.walk(sub_schema, f)  # type: ignore
    228 return schema

File /opt/conda/lib/python3.10/site-packages/pydantic/_internal/_core_utils.py:215, in _WalkCoreSchema.walk(self, schema, f)
    214 def walk(self, schema: core_schema.CoreSchema, f: Walk) -> core_schema.CoreSchema:
--> 215     return f(schema, self._walk)

File /opt/conda/lib/python3.10/site-packages/pydantic/_internal/_core_utils.py:503, in simplify_schema_references.<locals>.count_refs(s, recurse)
    500         return s
    502 if s['type'] != 'definition-ref':
--> 503     return recurse(s, count_refs)
    504 ref = s['schema_ref']
    505 state['ref_counts'][ref] += 1

File /opt/conda/lib/python3.10/site-packages/pydantic/_internal/_core_utils.py:218, in _WalkCoreSchema._walk(self, schema, f)
    217 def _walk(self, schema: core_schema.CoreSchema, f: Walk) -> core_schema.CoreSchema:
--> 218     schema = self._schema_type_to_method[schema['type']](schema, f)
    219     ser_schema: core_schema.SerSchema | None = schema.get('serialization')  # type: ignore
    220     if ser_schema:

File /opt/conda/lib/python3.10/site-packages/pydantic/_internal/_core_utils.py:323, in _WalkCoreSchema.handle_union_schema(self, schema, f)
    321         new_choices.append((self.walk(v[0], f), v[1]))
    322     else:
--> 323         new_choices.append(self.walk(v, f))
    324 schema['choices'] = new_choices
    325 return schema

File /opt/conda/lib/python3.10/site-packages/pydantic/_internal/_core_utils.py:215, in _WalkCoreSchema.walk(self, schema, f)
    214 def walk(self, schema: core_schema.CoreSchema, f: Walk) -> core_schema.CoreSchema:
--> 215     return f(schema, self._walk)

File /opt/conda/lib/python3.10/site-packages/pydantic/_internal/_core_utils.py:515, in simplify_schema_references.<locals>.count_refs(s, recurse)
    512     return s
    514 state['current_recursion_ref_count'][ref] += 1
--> 515 recurse(state['definitions'][ref], count_refs)
    516 state['current_recursion_ref_count'][ref] -= 1
    517 return s

File /opt/conda/lib/python3.10/site-packages/pydantic/_internal/_core_utils.py:218, in _WalkCoreSchema._walk(self, schema, f)
    217 def _walk(self, schema: core_schema.CoreSchema, f: Walk) -> core_schema.CoreSchema:
--> 218     schema = self._schema_type_to_method[schema['type']](schema, f)
    219     ser_schema: core_schema.SerSchema | None = schema.get('serialization')  # type: ignore
    220     if ser_schema:

File /opt/conda/lib/python3.10/site-packages/pydantic/_internal/_core_utils.py:227, in _WalkCoreSchema._handle_other_schemas(self, schema, f)
    225 sub_schema = schema.get('schema', None)
    226 if sub_schema is not None:
--> 227     schema['schema'] = self.walk(sub_schema, f)  # type: ignore
    228 return schema

File /opt/conda/lib/python3.10/site-packages/pydantic/_internal/_core_utils.py:215, in _WalkCoreSchema.walk(self, schema, f)
    214 def walk(self, schema: core_schema.CoreSchema, f: Walk) -> core_schema.CoreSchema:
--> 215     return f(schema, self._walk)

File /opt/conda/lib/python3.10/site-packages/pydantic/_internal/_core_utils.py:503, in simplify_schema_references.<locals>.count_refs(s, recurse)
    500         return s
    502 if s['type'] != 'definition-ref':
--> 503     return recurse(s, count_refs)
    504 ref = s['schema_ref']
    505 state['ref_counts'][ref] += 1

File /opt/conda/lib/python3.10/site-packages/pydantic/_internal/_core_utils.py:218, in _WalkCoreSchema._walk(self, schema, f)
    217 def _walk(self, schema: core_schema.CoreSchema, f: Walk) -> core_schema.CoreSchema:
--> 218     schema = self._schema_type_to_method[schema['type']](schema, f)
    219     ser_schema: core_schema.SerSchema | None = schema.get('serialization')  # type: ignore
    220     if ser_schema:

File /opt/conda/lib/python3.10/site-packages/pydantic/_internal/_core_utils.py:362, in _WalkCoreSchema.handle_model_fields_schema(self, schema, f)
    360 for k, v in schema['fields'].items():
    361     replaced_field = v.copy()
--> 362     replaced_field['schema'] = self.walk(v['schema'], f)
    363     replaced_fields[k] = replaced_field
    364 schema['fields'] = replaced_fields

File /opt/conda/lib/python3.10/site-packages/pydantic/_internal/_core_utils.py:215, in _WalkCoreSchema.walk(self, schema, f)
    214 def walk(self, schema: core_schema.CoreSchema, f: Walk) -> core_schema.CoreSchema:
--> 215     return f(schema, self._walk)

File /opt/conda/lib/python3.10/site-packages/pydantic/_internal/_core_utils.py:515, in simplify_schema_references.<locals>.count_refs(s, recurse)
    512     return s
    514 state['current_recursion_ref_count'][ref] += 1
--> 515 recurse(state['definitions'][ref], count_refs)
    516 state['current_recursion_ref_count'][ref] -= 1
    517 return s

KeyError: 'trulens_eval.utils.pyschema.Obj:94043974846304'



Is there any more information I can provide to help find a resolution quickly ?

@arkacisco can you also provide your pip list?

@joshreini1  , I had provided the pip list at the beginning  filtering for some of the relevant libraries, its a shared environment so the actual list is long : 

absl-py==2.0.0
aiofiles==22.1.0
aiohttp==3.8.6
aiohttp-cors==0.7.0
aiorwlock==1.3.0
aiosignal==1.3.1
aiosqlite==0.19.0
aiostream==0.5.2
alembic==1.13.1
altair==5.1.2
annotated-types==0.6.0
anyio==3.7.1
archspec @ file:///home/conda/feedstock_root/build_artifacts/archspec_1697661133851/work
argon2-cffi @ file:///home/conda/feedstock_root/build_artifacts/argon2-cffi_1692818318753/work
argon2-cffi-bindings @ file:///home/conda/feedstock_root/build_artifacts/argon2-cffi-bindings_1695386546427/work
arrow @ file:///home/conda/feedstock_root/build_artifacts/arrow_1696128962909/work
asn1crypto==1.5.1
asttokens @ file:///home/conda/feedstock_root/build_artifacts/asttokens_1698341106958/work
async-lru @ file:///home/conda/feedstock_root/build_artifacts/async-lru_1690563019058/work
async-timeout==4.0.3
attrs @ file:///home/conda/feedstock_root/build_artifacts/attrs_1683424013410/work
Babel @ file:///home/conda/feedstock_root/build_artifacts/babel_1698174530262/work
backoff==2.2.1
backports.functools-lru-cache @ file:///home/conda/feedstock_root/build_artifacts/backports.functools_lru_cache_1687772187254/work
beatrix-jupyterlab @ file:///home/kbuilder/miniconda3/conda-bld/dlenv-base_1699237288464/work/packages/beatrix_jupyterlab-2023.113.222739.tar.gz#sha256=ad149cc3d42ff6d56802897ce6639fef9134bc98c7b03a2e02e8b4974b17d524
beautifulsoup4 @ file:///home/conda/feedstock_root/build_artifacts/beautifulsoup4_1680888073205/work
bleach @ file:///home/conda/feedstock_root/build_artifacts/bleach_1696630167146/work
blessed==1.20.0
blinker==1.7.0
boltons @ file:///home/conda/feedstock_root/build_artifacts/boltons_1677499911949/work
Brotli @ file:///home/conda/feedstock_root/build_artifacts/brotli-split_1695989787169/work
cached-property @ file:///home/conda/feedstock_root/build_artifacts/cached_property_1615209429212/work
cachetools==5.3.2
certifi==2023.7.22
cffi @ file:///home/conda/feedstock_root/build_artifacts/cffi_1696001684923/work
charset-normalizer @ file:///home/conda/feedstock_root/build_artifacts/charset-normalizer_1698833585322/work
chroma-hnswlib==0.7.1
chromadb==0.4.0
click==8.1.7
cloud-tpu-client==0.10
cloudpickle==3.0.0
colorama @ file:///home/conda/feedstock_root/build_artifacts/colorama_1666700638685/work
coloredlogs==15.0.1
colorful==0.5.5
comm @ file:///home/conda/feedstock_root/build_artifacts/comm_1691044910542/work
conda @ file:///home/conda/feedstock_root/build_artifacts/conda_1698450778240/work
conda-package-handling @ file:///home/conda/feedstock_root/build_artifacts/conda-package-handling_1691048088238/work
conda_package_streaming @ file:///home/conda/feedstock_root/build_artifacts/conda-package-streaming_1691009212940/work
contourpy==1.2.0
cryptography @ file:///home/conda/feedstock_root/build_artifacts/cryptography-split_1698192013143/work
cycler==0.12.1
Cython==3.0.5
dacite==1.8.1
databricks-cli==0.18.0
dataclasses-json==0.5.14
datasets==2.16.1
db-dtypes==1.1.1
debugpy @ file:///home/conda/feedstock_root/build_artifacts/debugpy_1695534290310/work
decorator @ file:///home/conda/feedstock_root/build_artifacts/decorator_1641555617451/work
deepeval==0.20.55
defusedxml @ file:///home/conda/feedstock_root/build_artifacts/defusedxml_1615232257335/work
Deprecated==1.2.14
dill==0.3.7
distlib==0.3.7
distro==1.8.0
dm-tree==0.1.8
dnspython==2.4.2
docker==6.1.3
docstring-parser==0.15
entrypoints @ file:///home/conda/feedstock_root/build_artifacts/entrypoints_1643888246732/work
et-xmlfile==1.1.0
exceptiongroup @ file:///home/conda/feedstock_root/build_artifacts/exceptiongroup_1692026125334/work
execnet==2.0.2
executing @ file:///home/conda/feedstock_root/build_artifacts/executing_1698579936712/work
faiss-gpu==1.7.2
Faker==22.5.1
Farama-Notifications==0.0.4
fastapi==0.99.1
fastjsonschema @ file:///home/conda/feedstock_root/build_artifacts/python-fastjsonschema_1696171779618/work/dist
favicon==0.7.0
filelock==3.13.1
findspark==2.0.1
Flask==3.0.1
flatbuffers==23.5.26
fonttools==4.44.0
fqdn @ file:///home/conda/feedstock_root/build_artifacts/fqdn_1638810296540/work/dist
frozendict==2.4.0
frozenlist==1.4.0
fsspec==2023.10.0
gcsfs==2023.10.0
gitdb==4.0.11
GitPython==3.1.40
google-api-core==1.34.0
google-api-python-client==1.8.0
google-auth==2.23.4
google-auth-httplib2==0.1.1
google-auth-oauthlib==1.1.0
google-cloud-aiplatform==1.36.0
google-cloud-artifact-registry==1.9.0
google-cloud-bigquery==3.13.0
google-cloud-bigquery-storage==2.22.0
google-cloud-core==2.3.3
google-cloud-datastore==1.15.5
google-cloud-language==2.11.1
google-cloud-monitoring==2.16.0
google-cloud-resource-manager==1.10.4
google-cloud-storage==2.13.0
google-crc32c==1.5.0
google-resumable-media==2.6.0
googleapis-common-protos==1.61.0
gpustat==1.0.0
greenlet==3.0.1
grpc-google-iam-v1==0.12.6
grpcio==1.59.2
grpcio-status==1.48.2
gunicorn==21.2.0
gymnasium==0.28.1
h11==0.14.0
htbuilder==0.6.2
htmlmin==0.1.12
httpcore==1.0.2
httplib2==0.22.0
httptools==0.6.1
httpx==0.25.2
huggingface-hub==0.19.4
humanfriendly==10.0
humanize==4.9.0
idna @ file:///home/conda/feedstock_root/build_artifacts/idna_1663625384323/work
ImageHash==4.3.1
imageio==2.32.0
importlib-metadata @ file:///home/conda/feedstock_root/build_artifacts/importlib-metadata_1688754491823/work
importlib-resources @ file:///home/conda/feedstock_root/build_artifacts/importlib_resources_1695414790617/work
iniconfig==2.0.0
InstructorEmbedding==1.0.1
ipykernel @ file:///home/conda/feedstock_root/build_artifacts/ipykernel_1698244021190/work
ipython @ file:///home/conda/feedstock_root/build_artifacts/ipython_1698846603011/work
ipython-genutils==0.2.0
ipython-sql==0.5.0
ipywidgets==8.1.1
isoduration @ file:///home/conda/feedstock_root/build_artifacts/isoduration_1638811571363/work/dist
itsdangerous==2.1.2
jaraco.classes==3.3.0
jax-jumpy==1.0.0
jedi @ file:///home/conda/feedstock_root/build_artifacts/jedi_1696326070614/work
jeepney==0.8.0
Jinja2 @ file:///home/conda/feedstock_root/build_artifacts/jinja2_1654302431367/work
joblib==1.3.2
jq==1.6.0
json5 @ file:///home/conda/feedstock_root/build_artifacts/json5_1688248289187/work
jsonpatch @ file:///home/conda/feedstock_root/build_artifacts/jsonpatch_1695536281965/work
jsonpointer @ file:///home/conda/feedstock_root/build_artifacts/jsonpointer_1695397238043/work
jsonschema @ file:///home/conda/feedstock_root/build_artifacts/jsonschema-meta_1698678498820/work
jsonschema-specifications @ file:///home/conda/feedstock_root/build_artifacts/jsonschema-specifications_1689701150890/work
jupyter-events @ file:///home/conda/feedstock_root/build_artifacts/jupyter_events_1697461661078/work
jupyter-http-over-ws==0.0.8
jupyter-lsp @ file:///home/conda/feedstock_root/build_artifacts/jupyter-lsp-meta_1685453365113/work/jupyter-lsp
jupyter-server-mathjax==0.2.6
jupyter-ydoc==0.2.5
jupyter_client==7.4.9
jupyter_core @ file:///home/conda/feedstock_root/build_artifacts/jupyter_core_1698673647019/work
jupyter_server @ file:///home/conda/feedstock_root/build_artifacts/jupyter_server_1698243876809/work
jupyter_server_fileid==0.9.0
jupyter_server_proxy==4.1.0
jupyter_server_terminals @ file:///home/conda/feedstock_root/build_artifacts/jupyter_server_terminals_1673491454549/work
jupyter_server_ydoc==0.8.0
jupyterlab==3.6.6
jupyterlab-pygments @ file:///home/conda/feedstock_root/build_artifacts/jupyterlab_pygments_1649936611996/work
jupyterlab-widgets==3.0.9
jupyterlab_git==0.44.0
jupyterlab_server @ file:///home/conda/feedstock_root/build_artifacts/jupyterlab_server-split_1694531968623/work
jupytext==1.15.2
keyring==24.2.0
keyrings.google-artifactregistry-auth==1.1.2
kfp==2.4.0
kfp-pipeline-spec==0.2.2
kfp-server-api==2.0.3
kiwisolver==1.4.5
kubernetes==26.1.0
langchain==0.1.4
langchain-community==0.0.16
langchain-core==0.1.16
langchain-openai==0.0.5
langchainhub==0.1.14
langsmith==0.0.83
lark==1.1.8
lazy_loader==0.3
llama-index==0.9.39
llvmlite==0.41.1
lxml==5.1.0
lz4==4.3.2
Mako==1.3.0
Markdown==3.5.2
markdown-it-py==3.0.0
markdownlit==0.0.7
MarkupSafe @ file:///home/conda/feedstock_root/build_artifacts/markupsafe_1695367434228/work
marshmallow==3.20.1
matplotlib==3.7.3
matplotlib-inline @ file:///home/conda/feedstock_root/build_artifacts/matplotlib-inline_1660814786464/work
mdit-py-plugins==0.4.0
mdurl==0.1.2
merkle-json==1.0.0
millify==0.1.1
mistune @ file:///home/conda/feedstock_root/build_artifacts/mistune_1698947099619/work
mlflow==2.10.0
monotonic==1.6
more-itertools==10.1.0
mpmath==1.3.0
msgpack==1.0.7
multidict==6.0.4
multimethod==1.10
multiprocess==0.70.15
munch==4.0.0
mypy-extensions==1.0.0
nb-conda @ file:///home/conda/feedstock_root/build_artifacts/nb_conda_1654442778977/work
nb-conda-kernels @ file:///home/conda/feedstock_root/build_artifacts/nb_conda_kernels_1667060632461/work
nbclassic==1.0.0
nbclient @ file:///home/conda/feedstock_root/build_artifacts/nbclient_1684790896106/work
nbconvert @ file:///home/conda/feedstock_root/build_artifacts/nbconvert-meta_1698678461356/work
nbdime==3.2.0
nbformat @ file:///home/conda/feedstock_root/build_artifacts/nbformat_1690814868471/work
nest-asyncio @ file:///home/conda/feedstock_root/build_artifacts/nest-asyncio_1697083700168/work
networkx==3.2.1
nltk==3.8.1
notebook==6.5.6
notebook-executor @ file:///home/kbuilder/miniconda3/conda-bld/dlenv-base_1699237288464/work/packages/notebook_executor
notebook_shim @ file:///home/conda/feedstock_root/build_artifacts/notebook-shim_1682360583588/work
numba==0.58.1
numexpr==2.8.7
numpy==1.25.2
nvidia-cublas-cu12==12.1.3.1
nvidia-cuda-cupti-cu12==12.1.105
nvidia-cuda-nvrtc-cu12==12.1.105
nvidia-cuda-runtime-cu12==12.1.105
nvidia-cudnn-cu12==8.9.2.26
nvidia-cufft-cu12==11.0.2.54
nvidia-curand-cu12==10.3.2.106
nvidia-cusolver-cu12==11.4.5.107
nvidia-cusparse-cu12==12.1.0.106
nvidia-ml-py==11.495.46
nvidia-nccl-cu12==2.18.1
nvidia-nvjitlink-cu12==12.3.101
nvidia-nvtx-cu12==12.1.105
oauth2client==4.1.3
oauthlib==3.2.2
onnxruntime==1.16.3
openai==1.10.0
opencensus==0.11.3
opencensus-context==0.1.3
openpyxl==3.1.2
opentelemetry-api==1.20.0
opentelemetry-exporter-otlp==1.20.0
opentelemetry-exporter-otlp-proto-common==1.20.0
opentelemetry-exporter-otlp-proto-grpc==1.20.0
opentelemetry-exporter-otlp-proto-http==1.20.0
opentelemetry-proto==1.20.0
opentelemetry-sdk==1.20.0
opentelemetry-semantic-conventions==0.41b0
overrides @ file:///home/conda/feedstock_root/build_artifacts/overrides_1691338815398/work
packaging @ file:///home/conda/feedstock_root/build_artifacts/packaging_1696202382185/work
pandas==2.0.3
pandas-profiling==3.6.6
pandocfilters @ file:///home/conda/feedstock_root/build_artifacts/pandocfilters_1631603243851/work
papermill==2.5.0
parso @ file:///home/conda/feedstock_root/build_artifacts/parso_1638334955874/work
patsy==0.5.3
pexpect @ file:///home/conda/feedstock_root/build_artifacts/pexpect_1667297516076/work
phik==0.12.3
pickleshare @ file:///home/conda/feedstock_root/build_artifacts/pickleshare_1602536217715/work
Pillow==10.0.1
pkgutil_resolve_name @ file:///home/conda/feedstock_root/build_artifacts/pkgutil-resolve-name_1694617248815/work
platformdirs @ file:///home/conda/feedstock_root/build_artifacts/platformdirs_1696272223550/work
plotly==5.18.0
pluggy @ file:///home/conda/feedstock_root/build_artifacts/pluggy_1693086607691/work
portalocker==2.8.2
posthog==3.0.2
prettytable==3.9.0
prometheus-client @ file:///home/conda/feedstock_root/build_artifacts/prometheus_client_1698692549203/work
prompt-toolkit @ file:///home/conda/feedstock_root/build_artifacts/prompt-toolkit_1688565951714/work
proto-plus==1.22.3
protobuf==4.25.1
psutil==5.9.3
ptyprocess @ file:///home/conda/feedstock_root/build_artifacts/ptyprocess_1609419310487/work/dist/ptyprocess-0.7.0-py2.py3-none-any.whl
pulsar-client==3.3.0
pure-eval @ file:///home/conda/feedstock_root/build_artifacts/pure_eval_1642875951954/work
py-spy==0.3.14
py4j==0.10.7
pyarrow==14.0.0
pyarrow-hotfix==0.6
pyasn1==0.5.0
pyasn1-modules==0.3.0
pycosat @ file:///home/conda/feedstock_root/build_artifacts/pycosat_1696355758174/work
pycparser @ file:///home/conda/feedstock_root/build_artifacts/pycparser_1636257122734/work
pydantic==2.4.0
pydantic_core==2.10.0
pydeck==0.8.1b0
Pygments @ file:///home/conda/feedstock_root/build_artifacts/pygments_1691408637400/work
PyJWT==2.8.0
pymdown-extensions==10.7
pymongo==4.6.1
pyOpenSSL @ file:///home/conda/feedstock_root/build_artifacts/pyopenssl_1698795453264/work
pyparsing==3.1.1
PyPika==0.48.9
pysbd==0.3.4
PySocks @ file:///home/conda/feedstock_root/build_artifacts/pysocks_1661604839144/work
pyspark==2.4.4
pytest==8.0.0
pytest-xdist==3.5.0
python-dateutil @ file:///home/conda/feedstock_root/build_artifacts/python-dateutil_1626286286081/work
python-decouple==3.8
python-dotenv==1.0.0
python-json-logger @ file:///home/conda/feedstock_root/build_artifacts/python-json-logger_1677079630776/work
pytz @ file:///home/conda/feedstock_root/build_artifacts/pytz_1693930252784/work
PyWavelets==1.4.1
PyYAML @ file:///home/conda/feedstock_root/build_artifacts/pyyaml_1695373428874/work
pyzmq==24.0.1
querystring-parser==1.2.4
ragas==0.0.22
rank-bm25==0.2.2
ray==2.8.0
ray-cpp==2.8.0
referencing @ file:///home/conda/feedstock_root/build_artifacts/referencing_1691337268233/work
regex==2023.10.3
requests @ file:///home/conda/feedstock_root/build_artifacts/requests_1684774241324/work
requests-oauthlib==1.3.1
requests-toolbelt==0.10.1
retrying==1.3.4
rfc3339-validator @ file:///home/conda/feedstock_root/build_artifacts/rfc3339-validator_1638811747357/work
rfc3986-validator @ file:///home/conda/feedstock_root/build_artifacts/rfc3986-validator_1598024191506/work
rich==13.6.0
rouge-score==0.1.2
rpds-py @ file:///home/conda/feedstock_root/build_artifacts/rpds-py_1699109858238/work
rsa==4.9
ruamel.yaml @ file:///home/conda/feedstock_root/build_artifacts/ruamel.yaml_1698138615000/work
ruamel.yaml.clib @ file:///home/conda/feedstock_root/build_artifacts/ruamel.yaml.clib_1695996839082/work
safetensors==0.4.1
scikit-image==0.22.0
scikit-learn==1.3.2
scipy==1.11.3
seaborn==0.12.2
SecretStorage==3.3.3
Send2Trash @ file:///home/conda/feedstock_root/build_artifacts/send2trash_1682601222253/work
sentence-transformers==2.2.2
sentencepiece==0.1.99
sentry-sdk==1.39.2
shapely==2.0.2
simpervisor==1.0.0
six @ file:///home/conda/feedstock_root/build_artifacts/six_1620240208055/work
smart-open==6.4.0
smmap==5.0.1
sniffio @ file:///home/conda/feedstock_root/build_artifacts/sniffio_1662051266223/work
snowflake-connector-python==3.5.0
sortedcontainers==2.4.0
soupsieve @ file:///home/conda/feedstock_root/build_artifacts/soupsieve_1693929250441/work
SQLAlchemy==2.0.23
sqlparse==0.4.4
st-annotated-text==4.0.1
stack-data @ file:///home/conda/feedstock_root/build_artifacts/stack_data_1669632077133/work
starlette==0.27.0
statsmodels==0.14.0
streamlit==1.28.2
streamlit-aggrid==0.3.4.post3
streamlit-camera-input-live==0.2.0
streamlit-card==1.0.0
streamlit-chat==0.1.1
streamlit-embedcode==0.1.2
streamlit-extras==0.3.6
streamlit-faker==0.0.3
streamlit-image-coordinates==0.1.6
streamlit-keyup==0.2.2
streamlit-toggle-switch==1.0.2
streamlit-vertical-slider==2.5.5
sympy==1.12
tabulate==0.9.0
tangled-up-in-unicode==0.2.0
tenacity==8.2.3
tensorboardX==2.6.2.2
terminado @ file:///home/conda/feedstock_root/build_artifacts/terminado_1670253674810/work
threadpoolctl==3.2.0
tifffile==2023.9.26
tiktoken==0.5.2
tinycss2 @ file:///home/conda/feedstock_root/build_artifacts/tinycss2_1666100256010/work
tokenizers==0.15.0
toml==0.10.2
tomli @ file:///home/conda/feedstock_root/build_artifacts/tomli_1644342247877/work
tomlkit==0.12.3
toolz==0.12.0
torch==2.1.1
torchvision==0.16.1
tornado @ file:///home/conda/feedstock_root/build_artifacts/tornado_1695373560918/work
tqdm @ file:///home/conda/feedstock_root/build_artifacts/tqdm_1691671248568/work
traitlets @ file:///home/conda/feedstock_root/build_artifacts/traitlets_1698671135544/work
transformers==4.35.2
triton==2.1.0
truststore @ file:///home/conda/feedstock_root/build_artifacts/truststore_1694154605758/work
typeguard==4.1.5
typer==0.9.0
types-python-dateutil @ file:///home/conda/feedstock_root/build_artifacts/types-python-dateutil_1689882883784/work
types-requests==2.31.0.20240125
typing-inspect==0.9.0
typing-utils @ file:///home/conda/feedstock_root/build_artifacts/typing_utils_1622899189314/work
typing_extensions @ file:///home/conda/feedstock_root/build_artifacts/typing_extensions_1695040754690/work
tzdata==2023.3
tzlocal==5.2
uri-template @ file:///home/conda/feedstock_root/build_artifacts/uri-template_1688655812972/work/dist
uritemplate==3.0.1
urllib3==1.26.18
uvicorn==0.24.0
uvloop==0.19.0
validators==0.22.0
virtualenv==20.21.0
visions==0.7.5
watchdog==3.0.0
watchfiles==0.21.0
wcwidth @ file:///home/conda/feedstock_root/build_artifacts/wcwidth_1698744702785/work
webcolors @ file:///home/conda/feedstock_root/build_artifacts/webcolors_1679900785843/work
webencodings @ file:///home/conda/feedstock_root/build_artifacts/webencodings_1694681268211/work
websocket-client @ file:///home/conda/feedstock_root/build_artifacts/websocket-client_1696770128353/work
websockets==12.0
Werkzeug==3.0.1
widgetsnbextension==4.0.9
wordcloud==1.9.2
wrapt==1.15.0
xxhash==3.4.1
y-py==0.6.2
yarl==1.9.2
ydata-profiling==4.6.0
ypy-websocket==0.8.4
zipp @ file:///home/conda/feedstock_root/build_artifacts/zipp_1695255097490/work
zstandard==0.22.0

@arkacisco I'm unable to reproduce this issue/suspect it's an issue with this shared environment. Can you create a fresh python environment to test this?

Sure.

@joshreini1  I was able to run truelens in the new virtual environment . However, even though I am able to get a response .. all the metrics in feedback is none. How do I debug this ? Should I open a new issue for this  and close this one ?

I am following the code base here : 
https://www.trulens.org/trulens_eval/langchain_quickstart/#explore-in-a-dashboard

and even though I am getting a result in 

with tru_recorder as recording:
    llm_response = rag_chain.invoke(query)

display(llm_response)

I am getting no feedback : 

    display(feedback.name, feedback_result.result)


'groundedness_measure_with_cot_reasons'
None
'qs_relevance'
None
'relevance'
None




On further debugging , here is the final error from the records : 

API langchain request failed 4 time(s)..

Please note we have an AzureChatOpenAI endpoint and used it in the chain argument of the  langchain provider  and defined the feedback callbacks with that provider . Here is the whole error : 

 FeedbackResult(feedback_result_id='feedback_result_hash_78971a0a21dd7ff9f4284477eb48f957', record_id='record_hash_f2af4562df7046022be19265ed889b11', feedback_definition_id='feedback_definition_hash_aa08be1911c9532808078c267ce61b3d', last_ts=datetime.datetime(2024, 2, 1, 19, 16, 12, 821320), status=<FeedbackResultStatus.FAILED: 'failed'>, cost=Cost(n_requests=0, n_successful_requests=0, n_classes=0, n_tokens=0, n_stream_chunks=0, n_prompt_tokens=0, n_completion_tokens=0, cost=0.0), name='relevance', calls=[], result=None, error='Traceback (most recent call last):\n  File "/mnt/nfs/shared/arkghosh/LLM/BCS KB/notebooks/venv/lib/python3.10/site-packages/trulens_eval/feedback/feedback.py", line 542, in run\n    result_and_meta, part_cost = sync(\n  File "/mnt/nfs/shared/arkghosh/LLM/BCS KB/notebooks/venv/lib/python3.10/site-packages/trulens_eval/utils/asynchro.py", line 114, in sync\n    return loop.run_until_complete(awaitable)\n  File "/mnt/nfs/shared/arkghosh/LLM/BCS KB/notebooks/venv/lib/python3.10/site-packages/nest_asyncio.py", line 98, in run_until_complete\n    return f.result()\n  File "/opt/conda/lib/python3.10/asyncio/futures.py", line 201, in result\n    raise self._exception.with_traceback(self._exception_tb)\n  File "/opt/conda/lib/python3.10/asyncio/tasks.py", line 234, in __step\n    result = coro.throw(exc)\n  File "/mnt/nfs/shared/arkghosh/LLM/BCS KB/notebooks/venv/lib/python3.10/site-packages/trulens_eval/feedback/provider/endpoint/base.py", line 436, in atrack_all_costs_tally\n    result, cbs = await Endpoint.atrack_all_costs(\n  File "/mnt/nfs/shared/arkghosh/LLM/BCS KB/notebooks/venv/lib/python3.10/site-packages/trulens_eval/feedback/provider/endpoint/base.py", line 421, in atrack_all_costs\n    return await Endpoint._atrack_costs(thunk, with_endpoints=endpoints)\n  File "/mnt/nfs/shared/arkghosh/LLM/BCS KB/notebooks/venv/lib/python3.10/site-packages/trulens_eval/feedback/provider/endpoint/base.py", line 510, in _atrack_costs\n    result: T = await desync(thunk)\n  File "/mnt/nfs/shared/arkghosh/LLM/BCS KB/notebooks/venv/lib/python3.10/site-packages/trulens_eval/utils/asynchro.py", line 82, in desync\n    res = await asyncio.to_thread(func, *args, **kwargs)\n  File "/opt/conda/lib/python3.10/asyncio/threads.py", line 25, in to_thread\n    return await loop.run_in_executor(None, func_call)\n  File "/opt/conda/lib/python3.10/asyncio/futures.py", line 285, in __await__\n    yield self  # This tells Task to wait for completion.\n  File "/opt/conda/lib/python3.10/asyncio/tasks.py", line 304, in __wakeup\n    future.result()\n  File "/opt/conda/lib/python3.10/asyncio/futures.py", line 201, in result\n    raise self._exception.with_traceback(self._exception_tb)\n  File "/opt/conda/lib/python3.10/concurrent/futures/thread.py", line 58, in run\n    result = self.fn(*self.args, **self.kwargs)\n  File "/mnt/nfs/shared/arkghosh/LLM/BCS KB/notebooks/venv/lib/python3.10/site-packages/trulens_eval/utils/python.py", line 248, in _future_target_wrapper\n    return func(*args, **kwargs)\n  File "/mnt/nfs/shared/arkghosh/LLM/BCS KB/notebooks/venv/lib/python3.10/site-packages/trulens_eval/feedback/feedback.py", line 544, in <lambda>\n    lambda: self.imp(**ins)\n  File "/mnt/nfs/shared/arkghosh/LLM/BCS KB/notebooks/venv/lib/python3.10/site-packages/trulens_eval/feedback/provider/base.py", line 286, in relevance\n    self.endpoint.run_me(\n  File "/mnt/nfs/shared/arkghosh/LLM/BCS KB/notebooks/venv/lib/python3.10/site-packages/trulens_eval/feedback/provider/endpoint/base.py", line 272, in run_me\n    raise RuntimeError(\nRuntimeError: API langchain request failed 4 time(s).\n\nDuring handling of the above exception, another exception occurred:\n\nTraceback (most recent call last):\n  File "/mnt/nfs/shared/arkghosh/LLM/BCS KB/notebooks/venv/lib/python3.10/site-packages/trulens_eval/feedback/feedback.py", line 548, in run\n    raise RuntimeError(\nRuntimeError: Evaluation of relevance failed on inputs: \n{\'prompt\': \'<redacted>\',\n \'response\': \'To overcome the bug< redacted>, you can fix it by u\nAPI langchain request failed 4 time(s)..\n', multi_result=None))

@joshreini1 , can you please advise on my recent troubles here ? I can definitely open another issue if that is warrantd. 

THe original issue was resolved by creating virtual env. as suggested by @joshreini1  . Opened new issues for the second problem since it was not getting eyeballs.