Closed dferguson992 closed 3 months ago
Thanks for reaching out @dferguson992! Some users have also reported similar issues when using the FMEval library with the newer SageMaker Studio experience. The issue seems to come from the pip package installations. One workaround for this issue would be to force reinstall the dependency packages causing the issue, which include fsspec
and pytz
from my experience, with the following commands:
%pip install --force-reinstall fsspec
%pip install --force-reinstall pytz
You may encounter errors with uninstalling a previous version of those packages because of missing files, so you may need to manually remove those old package version directories similar to below (you can find the affected directories using the filepaths of the missing files from pip's warning messages):
rm -r /opt/conda/lib/python3.10/site-packages/fsspec-2023.6.0.dist-info/
rm -r /opt/conda/lib/python3.10/site-packages/pytz-2023.3.dist-info/
The newer versions of the packages will still be installed, so you should be able to import the FactualKnowledge module in your notebook.
I've noticed that this issue does tend to come back, so a more permanent workaround would be to instead use SageMaker Studio Classic to run your notebook. The issue does not seem to affect notebooks run in SageMaker Studio Classic, so you should be able to run the FMEval library without an issue.
Thanks that seemed to work for awhile until I got to the next few cells.
Without modifying the default example, I got up to the "Run Evaluation" section where I received this error:
The stack trace ends with:
I haven't modified anything in the example, except to print the ModelRunner object confirming it is not None.
Is there a way to fix this?
The example notebooks are currently using the $model_input
placeholder, as the latest code in the main
branch of this repo have renamed the placeholder from $feature
to $model_input
. However, this change has not been released to pypi yet, so to fix this, just change $model_input
in the notebook to $feature
.
That worked! Thank you!
Importing FactualKnowledge module into my jupyter notebook on sagemaker studio gives the following: