Closed jbeno closed 4 months ago
Thanks for proposing a fix. Would you like to make a PR with it?
The scikeras tests only pass with the keras.src reference. When I removed .src, I got this:
_____________________________________________________________________________ ERROR collecting tests/test_api.py ______________________________________________________________________________
ImportError while importing test module '/Users/jim/git/scikeras/tests/test_api.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/opt/anaconda3/envs/scikeras/lib/python3.10/importlib/__init__.py:126: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
tests/test_api.py:28: in <module>
from scikeras.wrappers import KerasClassifier, KerasRegressor
scikeras/__init__.py:11: in <module>
from scikeras import _saving_utils
scikeras/_saving_utils.py:7: in <module>
from keras.saving.saving_lib import load_model, save_model
E ModuleNotFoundError: No module named 'keras.saving.saving_lib'
This made me think the problem might be in my other environment. I reinstalled keras without cache, and the import worked okay. So looks like no change to scikeras required, and this can be closed.
I'm using: scikeras 0.13.0, keras 3.2.1. While importing scikeras, I saw this error. It seems that editing _savings_utils.py to not reference ".src" allowed it to load:
Causes import error:
from keras.src.saving.saving_lib import load_model, save_model
No import error (but did not test functionality):
from keras.saving.saving_lib import load_model, save_model