You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
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: 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!
The text was updated successfully, but these errors were encountered:
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!
The text was updated successfully, but these errors were encountered: