Skip to content
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

Add Warning about Python Versions for Models Stored in Tables #56

Open
db2Dean opened this issue Dec 13, 2022 · 2 comments · May be fixed by #76
Open

Add Warning about Python Versions for Models Stored in Tables #56

db2Dean opened this issue Dec 13, 2022 · 2 comments · May be fixed by #76

Comments

@db2Dean
Copy link
Contributor

db2Dean commented Dec 13, 2022

This issue is for the In DB Model Deployment and Management directory. I suggest that a note be added to the README discussing python version issues. I ran the steps in the readme and the UDF would fail with a "<class 'KeyError'>: 110" error. I created the ML model joblib and b64 string on my Mac that is running Python 3.7 and inserted the model into a table in my database. Then the UDF would fail with the indicated error. The database server is Linux running Python 3.9. I solved the problem by training the model and converting it to base64 on the database server. It should be noted that previous to this, I was getting the same error when my database was running Python 3.6. I upgraded the python version on the database server in an attempt to solve the problem.

@kdrodger
Copy link
Member

@pwharned is this interesting to you? Are you able to take a look at what Dean's reported? Thanks.

@pwharned
Copy link
Contributor

Sure thing, I will add a note and an error catch example if possible-it would be interesting if there were a way to manage multiple python installations at the database server as this would improve extendability but i believe db2 needs to be restarted when the PYTHON_PATH variable is changed. I’ll double check. You could potentially hack it with symlinks but i doubt thats advisable…

Unfortunately lots of minor versions of python introduce breaking changes especially for scientific computing languages.

pwharned added a commit to pwharned/db2-samples that referenced this issue Nov 22, 2023
Addressing issue IBM#56
@pwharned pwharned linked a pull request Nov 22, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants