{"head_branch": "master", "contributor": "keras-team", "sha_fail": "d043c7c56796b9f37e7daa74aeebace78206ae78", "sha_success": "879a1942e5aa364cf31e8d65cdf4e3720209b03f", "language": "Python", "repo_owner": "keras-team", "repo_name": "keras", "workflow_name": "Tests", "workflow_filename": "actions.yml", "workflow_path": ".github/workflows/actions.yml", "workflow": "name: Tests\n\non:\n push:\n branches: [ master ]\n pull_request:\n release:\n types: [created]\n\npermissions:\n contents: read\n\njobs:\n build:\n strategy:\n fail-fast: false\n matrix:\n python-version: [3.9]\n backend: [tensorflow, jax, torch, numpy]\n name: Run tests\n runs-on: ubuntu-latest\n env:\n PYTHON: ${{ matrix.python-version }}\n KERAS_BACKEND: ${{ matrix.backend }}\n steps:\n - uses: actions/checkout@v3\n - name: Check for changes in keras/applications\n uses: dorny/paths-filter@v2\n id: filter\n with:\n filters: |\n applications:\n - 'keras/applications/**'\n - name: Set up Python\n uses: actions/setup-python@v4\n with:\n python-version: ${{ matrix.python-version }}\n - name: Get pip cache dir\n id: pip-cache\n run: |\n python -m pip install --upgrade pip setuptools\n echo \"dir=$(pip cache dir)\" >> $GITHUB_OUTPUT\n - name: pip cache\n uses: actions/cache@v3\n with:\n path: ${{ steps.pip-cache.outputs.dir }}\n key: ${{ runner.os }}-pip-${{ hashFiles('setup.py') }}-${{ hashFiles('requirements.txt') }}\n - name: Install dependencies\n run: |\n pip install -r requirements.txt --progress-bar off --upgrade\n pip install -e \".\" --progress-bar off --upgrade\n - name: Test applications with pytest\n if: ${{ steps.filter.outputs.applications == 'true' }}\n run: |\n pytest keras/applications --cov=keras.applications\n coverage xml --include='keras/applications/*' -o apps-coverage.xml\n - name: Codecov keras.applications\n if: ${{ steps.filter.outputs.applications == 'true' }}\n uses: codecov/codecov-action@v3\n with:\n env_vars: PYTHON,KERAS_BACKEND\n flags: keras.applications,keras.applications-${{ matrix.backend }}\n files: apps-coverage.xml\n fail_ci_if_error: true\n - name: Test with pytest\n run: |\n pytest keras --ignore keras/applications --cov=keras\n coverage xml --omit='keras/applications/*' -o core-coverage.xml\n - name: Codecov keras\n uses: codecov/codecov-action@v3\n with:\n env_vars: PYTHON,KERAS_BACKEND\n flags: keras,keras-${{ matrix.backend }}\n files: core-coverage.xml\n fail_ci_if_error: true\n\n format:\n name: Check the code format\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v3\n - name: Set up Python 3.9\n uses: actions/setup-python@v4\n with:\n python-version: '3.9'\n - name: Get pip cache dir\n id: pip-cache\n run: |\n python -m pip install --upgrade pip setuptools\n echo \"dir=$(pip cache dir)\" >> $GITHUB_OUTPUT\n - name: pip cache\n uses: actions/cache@v3\n with:\n path: ${{ steps.pip-cache.outputs.dir }}\n key: ${{ runner.os }}-pip-${{ hashFiles('setup.py') }}-${{ hashFiles('requirements.txt') }}\n - name: Install dependencies\n run: |\n pip install -r requirements.txt --progress-bar off --upgrade\n pip install -e \".\" --progress-bar off --upgrade\n - name: Lint\n run: bash shell/lint.sh\n", "logs": "keras/testing/test_utils.py 11 1 4 1 87%\nkeras/trainers/__init__.py 0 0 0 0 100%\nkeras/trainers/compile_utils.py 356 54 281 39 81%\nkeras/trainers/data_adapters/__init__.py 0 0 0 0 100%\nkeras/trainers/data_adapters/array_data_adapter.py 141 19 58 11 84%\nkeras/trainers/data_adapters/data_adapter.py 13 0 0 0 100%\nkeras/trainers/data_adapters/data_adapter_utils.py 92 21 61 13 73%\nkeras/trainers/data_adapters/generator_data_adapter.py 41 3 8 3 88%\nkeras/trainers/data_adapters/py_dataset_adapter.py 252 49 80 17 76%\nkeras/trainers/data_adapters/tf_dataset_adapter.py 47 0 20 0 100%\nkeras/trainers/data_adapters/torch_data_adapter.py 46 3 10 3 89%\nkeras/trainers/epoch_iterator.py 105 13 72 13 83%\nkeras/trainers/trainer.py 193 23 89 14 84%\nkeras/utils/__init__.py 24 0 0 0 100%\nkeras/utils/argument_validation.py 43 10 26 5 78%\nkeras/utils/audio_dataset_utils.py 87 16 52 4 83%\nkeras/utils/backend_utils.py 37 6 12 3 78%\nkeras/utils/code_stats.py 40 3 34 2 91%\nkeras/utils/dataset_utils.py 286 61 202 45 74%\nkeras/utils/dtype_utils.py 25 0 16 0 100%\nkeras/utils/file_utils.py 221 52 129 23 71%\nkeras/utils/image_dataset_utils.py 91 6 48 6 90%\nkeras/utils/image_utils.py 149 73 80 13 45%\nkeras/utils/io_utils.py 34 0 10 0 100%\nkeras/utils/jax_utils.py 7 3 4 1 45%\nkeras/utils/model_visualization.py 193 169 90 0 8%\nkeras/utils/module_utils.py 32 1 6 1 95%\nkeras/utils/naming.py 34 1 8 1 95%\nkeras/utils/nest.py 42 9 18 3 77%\nkeras/utils/numerical_utils.py 58 4 26 5 89%\nkeras/utils/progbar.py 132 25 60 9 78%\nkeras/utils/python_utils.py 62 5 28 4 90%\nkeras/utils/rng_utils.py 16 1 6 3 82%\nkeras/utils/sequence_utils.py 41 8 24 6 78%\nkeras/utils/shape_utils.py 15 1 19 1 94%\nkeras/utils/summary_utils.py 212 39 116 18 77%\nkeras/utils/text_dataset_utils.py 68 4 40 5 90%\nkeras/utils/tf_utils.py 68 32 38 6 53%\nkeras/utils/timeseries_dataset_utils.py 62 4 48 5 92%\nkeras/utils/torch_utils.py 23 2 6 1 90%\nkeras/utils/traceback_utils.py 107 79 48 1 19%\nkeras/utils/tracking.py 97 10 54 5 82%\nkeras/version.py 1 0 0 0 100%\n----------------------------------------------------------------------------------------------\nTOTAL 34213 12330 13281 1443 62%\n\n=========================== short test summary info ============================\nFAILED keras/callbacks/model_checkpoint_test.py::ModelCheckpointTest::test_model_checkpoint_loading - ValueError: Arguments `target` and `output` must have the same shape. Received: target.shape=torch.Size([5, 1]), output.shape=torch.Size([5, 2])\n====== 1 failed, 2900 passed, 306 skipped, 1 xpassed in 69.52s (0:01:09) =======\n##[error]Process completed with exit code 1.\n", "diff": "diff --git a/keras/callbacks/model_checkpoint_test.py b/keras/callbacks/model_checkpoint_test.py\nindex bea73de7b8..fbc669cebc 100644\n--- a/keras/callbacks/model_checkpoint_test.py\n+++ b/keras/callbacks/model_checkpoint_test.py\n@@ -18,9 +18,9 @@ try:\n except ImportError:\n h5py = None\n \n-TRAIN_SAMPLES = 10\n-TEST_SAMPLES = 10\n-NUM_CLASSES = 2\n+TRAIN_SAMPLES = 30\n+TEST_SAMPLES = 30\n+NUM_CLASSES = 3\n INPUT_DIM = 3\n NUM_HIDDEN = 5\n BATCH_SIZE = 5\n@@ -203,7 +203,7 @@ class ModelCheckpointTest(testing.TestCase):\n model.fit(\n x_train,\n y_train,\n- batch_size=2, # 5 batches / epoch, so should backup every 3 epochs\n+ batch_size=6, # 5 batches / epoch, so should backup every 3 epochs\n validation_data=(x_test, y_test),\n callbacks=cbks,\n epochs=10,\n@@ -236,7 +236,7 @@ class ModelCheckpointTest(testing.TestCase):\n model.fit(\n x_train,\n y_train,\n- batch_size=2,\n+ batch_size=6,\n validation_data=(x_test, y_test),\n callbacks=cbks,\n epochs=10,\n@@ -288,7 +288,7 @@ class ModelCheckpointTest(testing.TestCase):\n model.fit(\n x_train,\n y_train,\n- batch_size=5,\n+ batch_size=15,\n validation_data=(x_test, y_test),\n callbacks=cbks,\n epochs=5,\n@@ -318,7 +318,7 @@ class ModelCheckpointTest(testing.TestCase):\n model.fit(\n x_train,\n y_train,\n- batch_size=5,\n+ batch_size=15,\n validation_data=(x_test, y_test),\n callbacks=cbks,\n epochs=5,\n"}