Incompatibility between SynthCity and scikit_learn 1.4? With workaround and possible fix. #248
MarkJacksonRG
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi!
I think there's an incompatibility between
synthcityand the new 1.4 version ofscikit_learn? I've added this as an issue too #249Problem
I tried running the 'load and run a tabular generator' bit from the docs and got an error.
OneHotEncoder.__init__() got an unexpected keyword 'sparse'Click to view screenshot of code and error:
The OneHotEncoder docs say
sparsewas renamed tosparse_output. The new parameter was introduced inscikit_learn1.2 and the old one removed inscikit_learn1.4.Workaround:
I fixed my local installation by downgrading scikit_learn to 1.3.2.
pip install --upgrade scikit_learn==1.3.2Possible fix?
I checked the stack trace and I think it might be possible to fix it with a one-line change. I haven't actually tried it! I'm not setup as a contributor.
Change
sparsetosparse_outputin line 63 intabular_encoder.py: I.e. this linecat_encoder_params: dict = dict(handle_unknown="ignore", sparse=False)I thought I would flag it here in case it's something the community want to fix. I think you'd need to require scikit_learn 1.2 and greater.
Thanks for the great library!
Beta Was this translation helpful? Give feedback.
All reactions