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

Test Failures in the Latest Release (v3.8.0) Test Suite #20789

Open
ARforyou opened this issue Jan 20, 2025 · 0 comments
Open

Test Failures in the Latest Release (v3.8.0) Test Suite #20789

ARforyou opened this issue Jan 20, 2025 · 0 comments
Assignees
Labels

Comments

@ARforyou
Copy link

Summary
While attempting to install Keras in editable mode and execute its test suite, several tests failed. Below is a detailed account of the steps taken and the errors encountered.

Steps to Reproduce
Created a Conda environment:

bash
Copy
Edit
conda create -n keras python=3.10
conda activate keras
Cloned the Keras repository:

bash
Copy
Edit
git clone https://github.com/keras-team/keras.git
cd keras
Checked out the latest release:

bash
Copy
Edit
git fetch --tags
git checkout tags/v3.8.0
Installed the requirements:

bash
Copy
Edit
python3.10 -m pip install -r requirements.txt
./shell/api_gen.sh
Installed Keras in editable mode:

bash
Copy
Edit
python3.10 -m pip install -e .
Configured the backend:

bash
Copy
Edit
export KERAS_BACKEND="tensorflow"
Ran the test suite:

bash
Copy
Edit
python3.10 -u -m pytest --cov=keras --cov-report=html:htmlcov --cov-report=xml:coverage.xml > keras_golden_run
Observed Behavior
The test suite reported the following summary of errors:

Integration Test Failures
jax_custom_fit_test.py::test_custom_fit

Error: TypeError
CustomModel.train_step() missing 1 required positional argument: 'data'
tf_distribute_training_test.py::test_model_fit

Error: RuntimeError
Virtual devices cannot be modified after being initialized
torch_custom_fit_test.py::test_custom_fit

Error: AttributeError
'CustomModel' object has no attribute 'zero_grad'
torch_workflow_test.py::TorchWorkflowTest::test_keras_layer_in_nn_module

Error: AssertionError
0 != 2
Application Test Failures (EfficientNetV2)
Several tests failed with InvalidArgumentError, involving the inability to broadcast tensor shapes:

Examples:
applications_test.py::test_application_notop_custom_input_shape_EfficientNetV2B0_channels_first
applications_test.py::test_application_pooling_EfficientNetV2B3_channels_first
Error Message:
Unable to broadcast tensor of shape [3] to tensor of shape [1,3,1,1] [Op:BroadcastTo]
Summary of Test Results
12 failed, 12870 passed, 346 skipped, 8 xfailed, 2 xpassed
Total time: ~21 minutes
Environment Details
Python Version: 3.10
Anaconda Version: 4.10.1
OS: Ubuntu 22.04.5 LTS
Additional Notes
Editable Mode: Used pip install -e . instead of pip_build.py to install Keras.
Potential Causes:
Integration test failures may indicate issues with the Jax and PyTorch configurations.
Application test errors might involve TensorFlow device setups or input shape mismatches for EfficientNetV2 models.
Request for Assistance
I expected the test suite to pass or, at the very least, have no critical errors.

Are these test failures indicative of underlying issues that require resolution?
Should I reconfigure the backend to include Jax and PyTorch for these tests?
Are additional dependencies or configurations needed for a successful test run?
If TensorFlow is my primary backend, can I safely ignore failures related to Jax and PyTorch?
Any guidance on addressing these issues would be greatly appreciated.

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants