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

Update requirements.txt #7050

Merged
merged 1 commit into from Mar 24, 2023
Merged

Conversation

beliaev-maksim
Copy link
Contributor

@beliaev-maksim beliaev-maksim commented Mar 20, 2023

Hi KF team,
there was a PR #6755 which broke import of tf.keras

the issue is following:
if you have TF==2.9.3 then it requires keras>2.9
if you pin keras to 2.4.3, then it gets deleted and notebooks based on jupyter-tensorflow-full image will not be able to run notebooks where keras is imported

overall, new tensorflow versions come with supported version of keras via dependency, thus, pinning it in another file is dangerous.
also, keras as standalone module is deprecated and the migration path is to use tf.keras

It for sure should be deleted in components/example-notebook-servers/jupyter-tensorflow-full/requirements.txt

the simplest way to check:

python3 -m venv venv_tf
source venv_tf/bin/activate
pip install tensorflow==2.9.3
pip install keras==2.4.3
python -c "import tensorflow.keras"

while the same code without pinning (allowing pip to resolve dependency) works:

python3 -m venv venv_tf
source venv_tf/bin/activate
pip install tensorflow==2.9.3
python -c "import tensorflow.keras"

@google-cla
Copy link

google-cla bot commented Mar 20, 2023

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@kimwnasptd
Copy link
Member

Nice catch @beliaev-maksim!

What worries me is that we don't have a way for catching such conflicts right now. Do you have any suggestions on how to automatically catch these in the future?

/lgtm
/approve

@kimwnasptd
Copy link
Member

Let me create an issue to discuss, maybe other people in the community have some feedback as well

@google-oss-prow
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: kimwnasptd

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@google-oss-prow google-oss-prow bot merged commit 787de25 into kubeflow:master Mar 24, 2023
@beliaev-maksim beliaev-maksim deleted the patch-1 branch March 24, 2023 12:46
@beliaev-maksim
Copy link
Contributor Author

@kimwnasptd the first thing that comes into mind is an integration test on the image
however, during docker build stage we can check for the error from pip

another thing is that we can build all the images independently. It will be a bit more work on syncing, but ensure integrity.

I think it is a good idea to open an issue for the broader discussion and community involvement :) I assume we are not the first who solves this issue ;)

DomFleischmann pushed a commit to DomFleischmann/kubeflow that referenced this pull request Mar 28, 2023
google-oss-prow bot pushed a commit that referenced this pull request Mar 28, 2023
Co-authored-by: Maksim Beliaev <beliaev.m.s@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants