I just tested my pickle file in this jupyter notebook and I have uploaded this in my git hub repo,
also I rebooted my app just a hit and trial …
still the problem is the same
AttributeError: 'str' object has no attribute 'transform'
AttributeError: 'str' object has no attribute 'transform'
@Rishabh_Prasad . Could you share the whole pic of the error for better understanding?
Aren’t you gettng a bunch of warnings like this in Streamlit Cloud logs?
InconsistentVersionWarning: Trying to unpickle estimator Pipeline from
version 1.3.1 when using version 1.4.1.post1. This might lead to breaking
code or invalid results. Use at your own risk. For more info please refer
to:
https://scikit-learn.org/stable/model_persistence.html#security-maintainability-limitations
yes I am getting this warning
warnings.warn(
/home/adminuser/venv/lib/python3.9/site-packages/sklearn/base.py:376: InconsistentVersionWarning: Trying to unpickle estimator ColumnTransformer from version 1.3.1 when using version 1.4.1.post1. This might lead to breaking code or invalid results. Use at your own risk. For more info please refer to:
https://scikit-learn.org/stable/model_persistence.html#security-maintainability-limitations
So now you know where the problem lies.
Yes, I was also thinking the same, Initially this was not the issue,
But I have used sklearn version 1.3.1 for all the task in my notebook.
Does streamlit cloud use the latest sklearn version?
Usually the latest available version will be installed in Streamlit Cloud unless you tell it otherwise. The warning says:
Trying to unpickle estimator Pipeline from version 1.3.1 when using version 1.4.1.post1
And Streamlit Cloud logs every package that is installed and its version.
Thank you so much streamlit community for all your time and effort, helping me out to solve my error in deploying my streamlit app.
I have finally resolved my error and have deployed my app successfully,
I just added scikit-learn == 1.3.1
in the requirements.txt files and it worked.
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.
These cookies are necessary for the website to function and cannot be switched off. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms.
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us understand how visitors move around the site and which pages are most frequently visited.
These cookies are used to record your choices and settings, maintain your preferences over time and recognize you when you return to our website. These cookies help us to personalize our content for you and remember your preferences.
These cookies may be deployed to our site by our advertising partners to build a profile of your interest and provide you with content that is relevant to you, including showing you relevant ads on other websites.