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

Migrate to latest and fix code issues #5

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

patzm
Copy link

@patzm patzm commented May 8, 2024

overall fixes #4 when removing the version constraints

  • now works with latest and greatest. Removing those constraints should work:
    - python=3.7
    - tensorflow=2.6
    - numpy=1.20.3
    • fixed imports
    • added scikeras as an additional dependency to get the wrappers that were migrated there
    • most notably, now works with TensorFlow 2.16, numpy 1.26.4, scipy 1.13.0
  • fixed the signature of Loss_Vin: parameter isn't used, looks like debug code. Also removed passing it from other places.
  • fixed minor pythonic issue in Tutorial.ipynb (string comparison with == instead of is)
full `pip freeze`
absl-py==2.1.0
annotated-types==0.6.0
anyio==4.3.0
appdirs==1.4.4
appnope==0.1.4
argon2-cffi==23.1.0
argon2-cffi-bindings==21.2.0
arrow==1.3.0
asttokens==2.4.1
astunparse==1.6.3
async-lru==2.0.4
attrs==23.2.0
Babel==2.15.0
beautifulsoup4==4.12.3
black==24.4.2
bleach==6.1.0
certifi==2024.2.2
cffi==1.16.0
charset-normalizer==3.3.2
click==8.1.7
cobra==0.29.0
comm==0.2.2
contourpy==1.2.1
cycler==0.12.1
debugpy==1.8.1
decorator==5.1.1
defusedxml==0.7.1
depinfo==2.2.0
diskcache==5.6.3
exceptiongroup==1.2.1
executing==2.0.1
fastjsonschema==2.19.1
flatbuffers==24.3.25
fonttools==4.51.0
fqdn==1.5.1
future==1.0.0
gast==0.5.4
google-pasta==0.2.0
grpcio==1.63.0
h11==0.14.0
h5py==3.11.0
httpcore==1.0.5
httpx==0.27.0
idna==3.7
importlib_resources==6.4.0
ipykernel==6.29.4
ipython==8.24.0
ipywidgets==8.1.2
isoduration==20.11.0
isort==5.13.2
jedi==0.19.1
Jinja2==3.1.4
joblib==1.4.2
json5==0.9.25
jsonpointer==2.4
jsonschema==4.22.0
jsonschema-specifications==2023.12.1
jupyter==1.0.0
jupyter-console==6.6.3
jupyter-events==0.10.0
jupyter-lsp==2.2.5
jupyter_client==8.6.1
jupyter_core==5.7.2
jupyter_server==2.14.0
jupyter_server_terminals==0.5.3
jupyterlab==4.1.8
jupyterlab_pygments==0.3.0
jupyterlab_server==2.27.1
jupyterlab_widgets==3.0.10
keras==3.3.3
kiwisolver==1.4.5
libclang==18.1.1
Markdown==3.6
markdown-it-py==3.0.0
MarkupSafe==2.1.5
matplotlib==3.8.4
matplotlib-inline==0.1.7
mdurl==0.1.2
mistune==3.0.2
ml-dtypes==0.3.2
mpmath==1.3.0
mypy-extensions==1.0.0
namex==0.0.8
nbclient==0.10.0
nbconvert==7.16.4
nbformat==5.10.4
nest-asyncio==1.6.0
notebook==7.1.3
notebook_shim==0.2.4
numpy==1.26.4
opt-einsum==3.3.0
optlang==1.8.1
optree==0.11.0
overrides==7.7.0
packaging==24.0
pandas==2.2.2
pandocfilters==1.5.1
parso==0.8.4
pathspec==0.12.1
pexpect==4.9.0
pillow==10.3.0
platformdirs==4.2.1
prometheus_client==0.20.0
prompt-toolkit==3.0.43
protobuf==4.25.3
psutil==5.9.8
ptyprocess==0.7.0
pure-eval==0.2.2
pycparser==2.22
pydantic==2.7.1
pydantic_core==2.18.2
pyDOE2==1.3.0
Pygments==2.18.0
pyparsing==3.1.2
pyreadline==2.1
python-dateutil==2.9.0.post0
python-json-logger==2.0.7
python-libsbml==5.20.2
pytz==2024.1
PyYAML==6.0.1
pyzmq==26.0.3
qtconsole==5.5.2
QtPy==2.4.1
referencing==0.35.1
requests==2.31.0
rfc3339-validator==0.1.4
rfc3986-validator==0.1.1
rich==13.7.1
rpds-py==0.18.1
ruamel.yaml==0.18.6
ruamel.yaml.clib==0.2.8
scikeras==0.13.0
scikit-learn==1.4.2
scipy==1.13.0
seaborn==0.13.2
Send2Trash==1.8.3
silence_tensorflow==1.2.1
six==1.16.0
sniffio==1.3.1
soupsieve==2.5
stack-data==0.6.3
support_developer==1.0.5
swiglpk==5.0.10
sympy==1.12
tensorboard==2.16.2
tensorboard-data-server==0.7.2
tensorflow==2.16.1
tensorflow-io-gcs-filesystem==0.37.0
termcolor==2.4.0
terminado==0.18.1
threadpoolctl==3.5.0
tinycss2==1.3.0
tomli==2.0.1
tornado==6.4
traitlets==5.14.3
types-python-dateutil==2.9.0.20240316
typing_extensions==4.11.0
tzdata==2024.1
uri-template==1.3.0
urllib3==2.2.1
wcwidth==0.2.13
webcolors==1.13
webencodings==0.5.1
websocket-client==1.8.0
Werkzeug==3.0.3
widgetsnbextension==4.0.10
wrapt==1.16.0

@hites77
Copy link

hites77 commented May 11, 2024

@patzm Thanks
After installing latest version and updating to your changes, i still encounter few issues. While running the codes of the tutorial notebook, there were section of the codes that gives out the error, can you please check what might be the possible cause for that. I am attaching a text file with code section along with the error it gives.
errors.txt

Copy link
Author

@patzm patzm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ModuleNotFoundError: No module named 'keras.api._v2'

did you start with a fresh environment? Which Keras version are you running? Compare to the frozen versions I included in the fold comment of the PR.

Not sure about the other errors. But maybe we can clarify those points before.

Comment on lines -614 to -616
"if model.model_type is 'MM_QP':\n",
"if model.model_type == 'MM_QP':\n",
" Ypred, Stats = MM_QP(model, verbose=True)\n",
"if model.model_type is 'MM_LP':\n",
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if model.model_type is 'MM_QP':
    Ypred, Stats = MM_QP(model, verbose=True)
if model.model_type is 'MM_LP':
    Ypred, Stats = MM_LP(model, verbose=True)

this warning should be gone after the changes I introduced here. Are you sure you had this branch pulled and were running Tutorial.ipynb?

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 this pull request may close these issues.

local install fail
2 participants