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

urllib.parse.quote: improper usage? #28

Closed
kdrobnyh opened this issue Apr 16, 2020 · 4 comments · Fixed by #29
Closed

urllib.parse.quote: improper usage? #28

kdrobnyh opened this issue Apr 16, 2020 · 4 comments · Fixed by #29

Comments

@kdrobnyh
Copy link
Contributor

I got a problem running the model:
ValueError: feature_names mismatch

The problem is that df_inputs in predict.py:253 has columns with wrong names, like

Diagnosis%20of%20Nephritis_%20nephrosis_%20renal%20sclerosis%20in%20the%20previous%2012%20months

This is because of use urllib.parse.quote here:
df_inputs.columns = [urllib.parse.quote(col) for col in df_inputs.columns]

Python 3.7.7 and 3.8.1, Windows 10.

@DaveDeCaprio
Copy link
Contributor

I think I might know what this is. Are you using the "xgboost" model rather than "xgboost_all_ages"?

We'd suggest using the "xgboost_all_ages" model as a workaround until we can get that addressed. The all ages model generally has better performance anyway.

@kdrobnyh
Copy link
Contributor Author

Yes, I wanted to use different models. So you use different feature names?

@DaveDeCaprio
Copy link
Contributor

I just pushed an update that fixes this issue for the xgboost model. It is the same columns. The all ages model uses a newer version of our platform that urlencodes the columns.

@kdrobnyh
Copy link
Contributor Author

Great, thank you!

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.

2 participants