Thanks for developing this valuable software for the community.
However, after installing it following the instruction, i ran into an error, which seems to be sklearn relevant.
I could not figure out how to fix it after trying multiple different versions of sklearn.
Can you please help me out of this?
python make_predictions.py -h
2025-04-24 14:28:26.651427: I tensorflow/core/platform/cpu_feature_guard.cc:182] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.
To enable the following instructions: SSE4.1 SSE4.2 AVX AVX2 AVX512F AVX512_VNNI FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.
WARNING:tensorflow:SavedModel saved prior to TF 2.5 detected when loading Keras model. Please ensure that you are saving the model with model.save() or tf.keras.models.save_model(), *NOT* tf.saved_model.save(). To confirm, there should be a file named "keras_metadata.pb" in the SavedModel directory.
2025-04-24 14:28:28.537732: I tensorflow/core/common_runtime/process_util.cc:146] Creating new thread pool with default inter op setting: 2. Tune using inter_op_parallelism_threads for best performance.
/home/designer/.local/lib/python3.8/site-packages/sklearn/base.py:348: InconsistentVersionWarning: Trying to unpickle estimator OneHotEncoder from version 0.23.1 when using version 1.3.2. 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
warnings.warn(
/home/designer/.local/lib/python3.8/site-packages/sklearn/base.py:458: UserWarning: X has feature names, but OneHotEncoder was fitted without feature names
warnings.warn(
Traceback (most recent call last):
File "make_predictions.py", line 54, in <module>
muts_df = predict_from_saved_model(saved_model_dir, muts_df, DATA_MEAN, DATA_STD, pams)
File "/home/designer/sw/structuralBioinformatics/PAM_engineering/PAMmla/functions.py", line 178, in predict_from_saved_model
muts_one_hot = train_test_enc.transform(input_df).toarray()
File "/home/designer/.local/lib/python3.8/site-packages/sklearn/utils/_set_output.py", line 157, in wrapped
data_to_wrap = f(self, X, *args, **kwargs)
File "/home/designer/.local/lib/python3.8/site-packages/sklearn/preprocessing/_encoders.py", line 1027, in transform
X_int, X_mask = self._transform(
File "/home/designer/.local/lib/python3.8/site-packages/sklearn/preprocessing/_encoders.py", line 237, in _transform
self._map_infrequent_categories(X_int, X_mask, ignore_category_indices)
File "/home/designer/.local/lib/python3.8/site-packages/sklearn/preprocessing/_encoders.py", line 408, in _map_infrequent_categories
if not self._infrequent_enabled:
AttributeError: 'OneHotEncoder' object has no attribute '_infrequent_enabled'
Thanks in advance.
Hi @justin-delano @RachelSilverstein ,
Thanks for developing this valuable software for the community.
However, after installing it following the instruction, i ran into an error, which seems to be sklearn relevant.
I could not figure out how to fix it after trying multiple different versions of sklearn.
Can you please help me out of this?
Thanks in advance.