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
Numpy version issues when importing load_detector from alibi_detect.saving #686
Comments
Hi @cfolan17, from the traceback it looks like the error is surfacing from the transformers package that is a dependency of ours. It would be helpful to clarify if this is issue is purely related to It would also be helpful to understand if this is actually to do with attempting to load a serialised detector (perhaps due to differences between the environment used to save the detector and the one you load it in), or is this purely an installation issue i.e. does the error occur when you simply try As for the error itself, I cannot explain why it is intermittent, but it looks similar to this issue? i.e. the already installed |
For the first clarification, I have attempted to run the script both and without installing transformers in the requirements.txt. For other workflows, I have been able to install and use the transformers in the same base container. For the second clarification, the issue only arises during the import of alibi-detect. Once the package is imported, the script is able to load the detector and make predictions off of it. I am using the current container because it is a prebuilt container provided by AWS SageMaker which has allowed me to easily customize and adapt different scripts for deployment. I could potentially create a custom container and upload it to SageMaker but I was hoping to get this to work without that option. |
Hi @cfolan17, thanks for giving the additional info. Unfortunately, I've not been able to reproduce the same error in version 1.0-1 of the sklearn image. Would you be able to share your |
I am currently having issues importing the load detector due to a NumPy being None when importing. The class below is what is used to load in the detector and provide predictions on a dataset. The code is being run on a AWS Sagemaker SKLearn Container framework version 1.0-1 for Batch Transformation.
The issue does not arise every time the container is run (About 25% of the time)
The requirements.txt file for the container includes:
alibi-detect[tensorflow]==0.10.4
markupsafe==2.0.1
werkzeug==2.0.3
importlib-metadata==5.0.0
smart-open==5.2.1
The output of the logs are:
As you can see by checking the NumPy version, version 1.22.4 is installed but is not being picked up when loading in the detector.
The text was updated successfully, but these errors were encountered: